update shop main ack
This commit is contained in:
parent
0a30d6f309
commit
bd23ca0cf3
@ -1890,7 +1890,7 @@
|
||||
{
|
||||
"prio": 5000,
|
||||
"descn": "Shop main ack",
|
||||
"rule": "^Welcome, to the (?P<Name>[a-zA-Z0-9 -]+) #(?P<Number>[0-9]+)\\.\\n(?P<User>.+) (?P<Mana>[0-9]+)\\/(?P<ManaTotal>[0-9]+)💧the (?P<Class>.+) from (?P<Castle>.+)\\n(?s:.*)$",
|
||||
"rule": "^Welcome, to the (?P<Name>[a-zA-Z0-9 -]+) #(?P<Number>[0-9]+)\\.\\n(?P<User>.+) (?P<Mana>[0-9]+)\\/(?P<ManaTotal>[0-9]+)💧the (?P<Class>.+) from (?P<Castle>.+)\\n\\n(?P<Fees>.*)\\n\\n(the (?P<Guru>.*) Guru\\n\\n){0,1}.* is (?P<Status>(open|closed))\\.\\n(?s:.*)$",
|
||||
"msg_type": "msg_shop_main_ack",
|
||||
"chat_id": 0,
|
||||
"user_id": 0
|
||||
|
3
def.go
3
def.go
@ -376,6 +376,9 @@ type ChatWarsMessageShopMainAck struct {
|
||||
ManaTotal string `json:"mana_total"`
|
||||
Class string `json:"class"`
|
||||
Castle string `json:"castle"`
|
||||
Fees string `json:"fees"`
|
||||
Guru string `json:"guru"`
|
||||
Status string `json:"status"`
|
||||
}
|
||||
|
||||
type MessageParsingRule struct {
|
||||
|
6
msg.go
6
msg.go
@ -309,6 +309,9 @@ func parseSubTypeMessageShopMainAck(m *ChatWarsMessage, r *regexp.Regexp) (*Chat
|
||||
cwm.ManaTotal = r.ReplaceAllString(m.Text, "${ManaTotal}")
|
||||
cwm.Class = r.ReplaceAllString(m.Text, "${Class}")
|
||||
cwm.Castle = r.ReplaceAllString(m.Text, "${Castle}")
|
||||
cwm.Fees = r.ReplaceAllString(m.Text, "${Fees}")
|
||||
cwm.Guru = r.ReplaceAllString(m.Text, "${Guru}")
|
||||
cwm.Status = r.ReplaceAllString(m.Text, "${Status}")
|
||||
|
||||
log.Printf("parseSubTypeMessageShopMainAck : Name : %s\n", cwm.Name)
|
||||
log.Printf("parseSubTypeMessageShopMainAck : Number : %s\n", cwm.Number)
|
||||
@ -317,6 +320,9 @@ func parseSubTypeMessageShopMainAck(m *ChatWarsMessage, r *regexp.Regexp) (*Chat
|
||||
log.Printf("parseSubTypeMessageShopMainAck : ManaTotal : %s\n", cwm.ManaTotal)
|
||||
log.Printf("parseSubTypeMessageShopMainAck : Class : %s\n", cwm.Class)
|
||||
log.Printf("parseSubTypeMessageShopMainAck : Castle : %s\n", cwm.Castle)
|
||||
log.Printf("parseSubTypeMessageShopMainAck : Fees : %s\n", cwm.Fees)
|
||||
log.Printf("parseSubTypeMessageShopMainAck : Guru : %s\n", cwm.Guru)
|
||||
log.Printf("parseSubTypeMessageShopMainAck : Status : %s\n", cwm.Status)
|
||||
|
||||
return &cwm, nil
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user