testtest
This commit is contained in:
parent
4d7f6de54d
commit
cec0421f04
3
def.go
3
def.go
@ -193,6 +193,9 @@ const (
|
|||||||
objSubTypeMessageGoArena = 333 // 📯Arena (not done)
|
objSubTypeMessageGoArena = 333 // 📯Arena (not done)
|
||||||
objSubTypeMessageTop = 334 // any /topXX (not done)
|
objSubTypeMessageTop = 334 // any /topXX (not done)
|
||||||
objSubTypeMessageMenu = 335 // main menu (not done)
|
objSubTypeMessageMenu = 335 // main menu (not done)
|
||||||
|
objSubTypeMessageBuyReq = 336 // /wtb_xx (done)
|
||||||
|
objSubTypeMessageSellReq = 337 // /wts_xx (done)
|
||||||
|
objSubTypeMessageOrderbookReq = 338 // /t_xx (done)
|
||||||
objSubTypeJobPillage = 601
|
objSubTypeJobPillage = 601
|
||||||
objSubTypeJobTribute = 602
|
objSubTypeJobTribute = 602
|
||||||
objSubTypeJobStatus = 603
|
objSubTypeJobStatus = 603
|
||||||
|
5
rules.go
5
rules.go
@ -55,7 +55,10 @@ func resetMsgParsingRules() {
|
|||||||
,(5000, ` + strconv.Itoa(objSubTypeMessageMeReq) + `, "Me request", "^🏅Me$")
|
,(5000, ` + strconv.Itoa(objSubTypeMessageMeReq) + `, "Me request", "^🏅Me$")
|
||||||
,(5000, ` + strconv.Itoa(objSubTypeMessageInventoryReq) + `, "Inventory request", "^/inv$")
|
,(5000, ` + strconv.Itoa(objSubTypeMessageInventoryReq) + `, "Inventory request", "^/inv$")
|
||||||
,(5000, ` + strconv.Itoa(objSubTypeMessageTimeReq) + `, "Time request", "^/time$")
|
,(5000, ` + strconv.Itoa(objSubTypeMessageTimeReq) + `, "Time request", "^/time$")
|
||||||
,(5000, ` + strconv.Itoa(objSubTypeMessagePledge) + `, "Time request", "^/pledge$")
|
,(5000, ` + strconv.Itoa(objSubTypeMessagePledge) + `, "Pledge", "^/pledge$")
|
||||||
|
,(5000, ` + strconv.Itoa(objSubTypeMessageBuyReq) + `, "Buy request", "^/wtb_(?P<Item>[0-9]+)_(?P<Quantity>[0-9]+)$")
|
||||||
|
,(5000, ` + strconv.Itoa(objSubTypeMessageSellReq) + `, "Sell request", "^/wts_(?P<Item>[0-9]+)_(?P<Quantity>[0-9]+)(_(?P<Price>[0-9]+)){0,1}$")
|
||||||
|
,(5000, ` + strconv.Itoa(objSubTypeMessageOrderbookReq) + `, "Orderbook request", "^/t_(?P<Item>[0-9]+)$")
|
||||||
;`)
|
;`)
|
||||||
failOnError(err, "resetMsgParsingRules : populate table msg_rules")
|
failOnError(err, "resetMsgParsingRules : populate table msg_rules")
|
||||||
}
|
}
|
||||||
|
3
sql.go
3
sql.go
@ -337,6 +337,9 @@ func initDB() {
|
|||||||
,(` + strconv.Itoa(objSubTypeMessageGoArena) + `, "go_arena", "Go arena", ` + strconv.Itoa(objTypeMessage) + `)
|
,(` + strconv.Itoa(objSubTypeMessageGoArena) + `, "go_arena", "Go arena", ` + strconv.Itoa(objTypeMessage) + `)
|
||||||
,(` + strconv.Itoa(objSubTypeMessageTop) + `, "top", "Top", ` + strconv.Itoa(objTypeMessage) + `)
|
,(` + strconv.Itoa(objSubTypeMessageTop) + `, "top", "Top", ` + strconv.Itoa(objTypeMessage) + `)
|
||||||
,(` + strconv.Itoa(objSubTypeMessageMenu) + `, "menu", "Menu", ` + strconv.Itoa(objTypeMessage) + `)
|
,(` + strconv.Itoa(objSubTypeMessageMenu) + `, "menu", "Menu", ` + strconv.Itoa(objTypeMessage) + `)
|
||||||
|
,(` + strconv.Itoa(objSubTypeMessageBuyReq) + `, "buy_req", "Sell Req", ` + strconv.Itoa(objTypeMessage) + `)
|
||||||
|
,(` + strconv.Itoa(objSubTypeMessageSellReq) + `, "sell_req", "Buy Req", ` + strconv.Itoa(objTypeMessage) + `)
|
||||||
|
,(` + strconv.Itoa(objSubTypeMessageOrderbookReq) + `, "orderbook_req", "Buy Req", ` + strconv.Itoa(objTypeMessage) + `)
|
||||||
,(` + strconv.Itoa(objSubTypeJobPillage) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(objTypeJob) + `)
|
,(` + strconv.Itoa(objSubTypeJobPillage) + `, "job_pillage", "Pillage job", ` + strconv.Itoa(objTypeJob) + `)
|
||||||
,(` + strconv.Itoa(objSubTypeJobTribute) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(objTypeJob) + `)
|
,(` + strconv.Itoa(objSubTypeJobTribute) + `, "job_tribute", "Tribute job", ` + strconv.Itoa(objTypeJob) + `)
|
||||||
,(` + strconv.Itoa(objSubTypeJobWithdrawal) + `, "job_withdraw", "Withdrawal job", ` + strconv.Itoa(objTypeJob) + `)
|
,(` + strconv.Itoa(objSubTypeJobWithdrawal) + `, "job_withdraw", "Withdrawal job", ` + strconv.Itoa(objTypeJob) + `)
|
||||||
|
@ -182,6 +182,15 @@ func SQLIdentifyMsgWorker(id int, objIds <-chan int64) {
|
|||||||
case objSubTypeMessageMenu:
|
case objSubTypeMessageMenu:
|
||||||
err = setObjSubTypeId(objId, objSubTypeMessageMenu)
|
err = setObjSubTypeId(objId, objSubTypeMessageMenu)
|
||||||
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(Menu)")
|
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(Menu)")
|
||||||
|
case objSubTypeMessageBuyReq:
|
||||||
|
err = setObjSubTypeId(objId, objSubTypeMessageBuyReq)
|
||||||
|
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(BuyReq)")
|
||||||
|
case objSubTypeMessageSellReq:
|
||||||
|
err = setObjSubTypeId(objId, objSubTypeMessageSellReq)
|
||||||
|
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(SellReq)")
|
||||||
|
case objSubTypeMessageOrderbookReq:
|
||||||
|
err = setObjSubTypeId(objId, objSubTypeMessageOrderbookReq)
|
||||||
|
logOnError(err, "SQLIdentifyMsgWorker["+strconv.Itoa(id)+"] : setObjSubTypeId(OrderbookReq)")
|
||||||
case objSubTypeMessageAuctionAnnounce:
|
case objSubTypeMessageAuctionAnnounce:
|
||||||
cwm := ChatWarsMessageAuctionAnnounce{
|
cwm := ChatWarsMessageAuctionAnnounce{
|
||||||
ObjID64: objId,
|
ObjID64: objId,
|
||||||
|
Loading…
Reference in New Issue
Block a user