2019-05-06 04:54:24 +02:00
|
|
|
package main
|
|
|
|
|
2019-05-08 12:33:52 +02:00
|
|
|
import (
|
|
|
|
"regexp"
|
|
|
|
)
|
|
|
|
|
2019-05-06 04:54:24 +02:00
|
|
|
type ChatWarsMessage struct {
|
2019-05-06 05:59:19 +02:00
|
|
|
UserID64 int64 `json:"user_id"`
|
2019-05-06 04:54:24 +02:00
|
|
|
SenderUserID64 int64 `json:"sender_user_id"`
|
|
|
|
Date int32 `json:"date"`
|
|
|
|
ID64 int64 `json:"id"`
|
|
|
|
ChatID64 int64 `json:"chat_id"`
|
|
|
|
Text string `json:"text"`
|
|
|
|
}
|
2019-05-06 05:59:19 +02:00
|
|
|
|
2019-05-07 13:15:25 +02:00
|
|
|
type MessageParsingRule struct {
|
|
|
|
ID int32
|
|
|
|
Priority int32
|
|
|
|
Description string
|
|
|
|
Rule string
|
|
|
|
MsgTypeID int32
|
2019-05-08 12:33:52 +02:00
|
|
|
re *regexp.Regexp
|
2019-05-07 13:15:25 +02:00
|
|
|
}
|
|
|
|
|
2019-05-06 05:59:19 +02:00
|
|
|
const (
|
2019-05-07 05:12:03 +02:00
|
|
|
objTypeUser = 1
|
|
|
|
objTypeGuild = 2
|
|
|
|
objTypeMessage = 3
|
|
|
|
objTypeWar = 4
|
|
|
|
objTypeWarReport = 5
|
2019-05-07 13:15:25 +02:00
|
|
|
objTypeJob = 6
|
2019-05-06 05:59:19 +02:00
|
|
|
|
2019-05-08 16:34:47 +02:00
|
|
|
objSubTypeMessageUnknown = 301
|
|
|
|
objSubTypeMessageWar = 302
|
|
|
|
objSubTypeMessageMiniWar = 303
|
|
|
|
objSubTypeMessageGuildWar = 304
|
|
|
|
objSubTypeMessageReport = 305
|
|
|
|
objSubTypeMessageGReport = 306
|
|
|
|
objSubTypeMessageQuest = 307
|
|
|
|
objSubTypeMessageFight = 308
|
|
|
|
objSubTypeMessageHero = 309
|
|
|
|
objSubTypeMessageMe = 310
|
|
|
|
objSubTypeMessageInventory = 311
|
|
|
|
objSubTypeMessagePillageInc = 312
|
|
|
|
objSubTypeMessageTributeInc = 313
|
|
|
|
objSubTypeMessagePillageAck = 314
|
|
|
|
objSubTypeMessageTributeAck = 315
|
|
|
|
objSubTypeMessageAuctionAnnounce = 316
|
|
|
|
objSubTypeJobPillage = 601
|
|
|
|
objSubTypeJobTribute = 602
|
|
|
|
objSubTypeJobStatus = 603
|
|
|
|
objSubTypeJobWithdrawal = 604
|
|
|
|
objSubTypeJobGStock = 605
|
2019-05-06 09:25:57 +02:00
|
|
|
|
|
|
|
MQGetMsgWorkers = 3
|
|
|
|
SQLCWMsgWorkers = 6
|
|
|
|
SQLIdentifyMsgWorkers = 6
|
2019-05-07 13:15:25 +02:00
|
|
|
SQLJobWorkers = 3
|
2019-05-06 05:59:19 +02:00
|
|
|
)
|