fix
This commit is contained in:
parent
dacf07b53b
commit
82d6988ffd
32
rules.go
32
rules.go
@ -170,6 +170,20 @@ func resetMsgParsingRules() error {
|
||||
BotCommand: true,
|
||||
}
|
||||
rules2 = append(rules2, r)
|
||||
|
||||
if len(o.Craft.Command) > 6 && o.Craft.Command[0:4] == "/brew_" {
|
||||
fmt.Printf("Inserting %s\n", o.Code)
|
||||
r = MessageParsingRule{
|
||||
Priority: 9998,
|
||||
Description: fmt.Sprintf("Specific item brew %s", o.Code),
|
||||
Rule: fmt.Sprintf("^\\/alch_(?P<Code>%s)$", regexp.QuoteMeta(o.Code)),
|
||||
MsgTypeID64: cacheObjSubType[`msg_bot_brew_item`],
|
||||
ChatID64: 0,
|
||||
SenderUserID64: users[id],
|
||||
BotCommand: true,
|
||||
}
|
||||
rules2 = append(rules2, r)
|
||||
}
|
||||
}
|
||||
}
|
||||
muxObjItem.RUnlock()
|
||||
@ -218,24 +232,6 @@ func resetMsgParsingRules() error {
|
||||
}
|
||||
rules2 = append(rules2, r)
|
||||
|
||||
muxObjItem.RLock()
|
||||
for _, o := range objItems {
|
||||
if o.Craft != nil && o.ItemTypeID == cacheObjSubType[`item_misc`] && len(o.Craft.Command) > 6 && o.Craft.Command[0:5] == "/brew_" {
|
||||
fmt.Printf("Inserting %s\n", o.Code)
|
||||
r = MessageParsingRule{
|
||||
Priority: 9998,
|
||||
Description: fmt.Sprintf("Specific item brew %s", o.Code),
|
||||
Rule: fmt.Sprintf("^\\/alch_(?P<Code>%s)$", regexp.QuoteMeta(o.Code)),
|
||||
MsgTypeID64: cacheObjSubType[`msg_bot_brew_item`],
|
||||
ChatID64: 0,
|
||||
SenderUserID64: users[id],
|
||||
BotCommand: true,
|
||||
}
|
||||
rules2 = append(rules2, r)
|
||||
}
|
||||
}
|
||||
muxObjItem.RUnlock()
|
||||
|
||||
r = MessageParsingRule{
|
||||
Priority: 9999,
|
||||
Description: "List exchange deals on hold",
|
||||
|
Loading…
Reference in New Issue
Block a user