start rage up and peace up

This commit is contained in:
shoopea 2020-02-22 12:30:16 +08:00
parent 9123ff1799
commit d7c29d20c9
4 changed files with 37 additions and 0 deletions

5
class.go Normal file
View File

@ -0,0 +1,5 @@
package main
func addClass(objID64 int64, classifID64 int64, classID64 int64) {
return
}

View File

@ -679,6 +679,16 @@
"name": "Set Unknown Action", "name": "Set Unknown Action",
"obj_type": "msg" "obj_type": "msg"
}, },
{
"intl_id": "msg_bot_rage_up",
"name": "Rage Up Withdraw",
"obj_type": "msg"
},
{
"intl_id": "msg_bot_peace_up",
"name": "Peace Up Withdraw",
"obj_type": "msg"
},
{ {
"intl_id": "job_pillage", "intl_id": "job_pillage",
"name": "Pillage job", "name": "Pillage job",

View File

@ -144,6 +144,26 @@ func resetMsgParsingRules() error {
} }
// chats // chats
r = MessageParsingRule{
Priority: 9999,
Description: "Rage Up Withdrawal",
Rule: "^/rage_up$",
MsgTypeID64: cacheObjSubType[`msg_bot_rage_up`],
ChatID64: cfg.Bot.Mainchat,
SenderUserID64: 0,
}
rules2 = append(rules2, r)
r = MessageParsingRule{
Priority: 9999,
Description: "Peace Up Withdrawal",
Rule: "^/peace_up$",
MsgTypeID64: cacheObjSubType[`msg_bot_peace_up`],
ChatID64: cfg.Bot.Mainchat,
SenderUserID64: 0,
}
rules2 = append(rules2, r)
r = MessageParsingRule{ r = MessageParsingRule{
Priority: 1, Priority: 1,
Description: "Default Main chat", Description: "Default Main chat",

View File

@ -550,6 +550,8 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
botUserConfigPillage(m, false) botUserConfigPillage(m, false)
case cacheObjSubType[`msg_bot_shutdown`]: case cacheObjSubType[`msg_bot_shutdown`]:
botShutdown() botShutdown()
case cacheObjSubType[`msg_bot_rage_up`]:
case cacheObjSubType[`msg_bot_peace_up`]:
default: default:
//log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Unknwon message type in rule %d : %d (%d)\n%s\n", msgParsingRules[i].ID, msgParsingRules[i].MsgTypeID64, objId, m.Text) //log.Printf("SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : Unknwon message type in rule %d : %d (%d)\n%s\n", msgParsingRules[i].ID, msgParsingRules[i].MsgTypeID64, objId, m.Text)
} }