This commit is contained in:
shoopea 2021-01-21 15:15:50 +01:00
parent ba33b32bb9
commit dacf07b53b
2 changed files with 12 additions and 0 deletions

11
bot.go
View File

@ -833,6 +833,17 @@ func botShops(m *ChatWarsMessage) {
}
func botBrewItem(m *ChatWarsMessage, r *regexp.Regexp) {
if hasUnfinishedJob(cacheObjSubType[`job_brew_item`]) {
c := TGCommand{
Type: commandReplyMsg,
Text: "Brew Item is already running",
FromMsgID64: m.ID64,
FromChatID64: m.ChatID64,
}
TGCmdQueue <- c
return
}
clt, err := getLockedIdleClient()
if err != nil {
c := TGCommand{

View File

@ -221,6 +221,7 @@ func resetMsgParsingRules() error {
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),