This commit is contained in:
shoopea 2021-01-21 15:25:16 +01:00
parent eb663243cf
commit 812c28e2cb
2 changed files with 5 additions and 1 deletions

5
job.go
View File

@ -2186,7 +2186,10 @@ func jobBrewItem(j Job) {
err = json.Unmarshal(j.Payload, &p)
logOnError(err, "jobBrewItem : Unmarshal payload")
fmt.Printf("jobBrewItem : getting in...\n")
if p.Status == 0 {
fmt.Printf("jobBrewItem : Status 0, triggering /me\n")
p.Status = 1
@ -2198,6 +2201,7 @@ func jobBrewItem(j Job) {
clientSendCWMsgDelay(j.UserID64, "/me", 0*time.Second)
return
} else if p.Status == 1 && j.Trigger != 0 {
fmt.Printf("jobBrewItem : Status 1, triggering /alch\n")
m, err := getObjMsg(j.Trigger)
logOnError(err, "jobBrewItem : getObjMsg("+strconv.FormatInt(j.Trigger, 10)+")")
if err == nil {
@ -2222,6 +2226,7 @@ func jobBrewItem(j Job) {
}
}
} else if p.Status == 2 && j.Trigger != 0 {
fmt.Printf("jobBrewItem : Status 2, computing\n")
m, err := getObjMsg(j.Trigger)
logOnError(err, "jobBrewItem : getObjMsg("+strconv.FormatInt(j.Trigger, 10)+")")
if err == nil {

View File

@ -172,7 +172,6 @@ func resetMsgParsingRules() error {
rules2 = append(rules2, r)
if len(o.Craft.Command) > 6 && o.Craft.Command[0:6] == "/brew_" {
fmt.Printf("Inserting %s\n", o.Code)
r = MessageParsingRule{
Priority: 9998,
Description: fmt.Sprintf("Specific item brew %s", o.Code),