test
This commit is contained in:
parent
371c00eeb6
commit
7b9286a77f
2
msg.go
2
msg.go
@ -477,6 +477,7 @@ func parseSubTypeMessageGListAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWar
|
|||||||
|
|
||||||
re := regexp.MustCompile(`\n#(?P<Id>[0-9]+) (?P<Class1>[⚒⚗️📦🏹⚔️🛡])(?P<Class2>[⚒⚗️📦🏹⚔️🛡]{0,1})(?P<Level>[0-9]+) \[(?P<Status>.*)\] (?P<Name>[a-zA-z0-9 ]+)`)
|
re := regexp.MustCompile(`\n#(?P<Id>[0-9]+) (?P<Class1>[⚒⚗️📦🏹⚔️🛡])(?P<Class2>[⚒⚗️📦🏹⚔️🛡]{0,1})(?P<Level>[0-9]+) \[(?P<Status>.*)\] (?P<Name>[a-zA-z0-9 ]+)`)
|
||||||
for _, l := range re.FindAllString(r.ReplaceAllString(m.Text, "${Members}"), -1) {
|
for _, l := range re.FindAllString(r.ReplaceAllString(m.Text, "${Members}"), -1) {
|
||||||
|
log.Printf("parseSubTypeMessageGListAck : %s\n", l)
|
||||||
m := ChatWarsGuildMember{}
|
m := ChatWarsGuildMember{}
|
||||||
m.Name = re.ReplaceAllString(l, "${Name}")
|
m.Name = re.ReplaceAllString(l, "${Name}")
|
||||||
m.Class1 = re.ReplaceAllString(l, "${Class1}")
|
m.Class1 = re.ReplaceAllString(l, "${Class1}")
|
||||||
@ -485,7 +486,6 @@ func parseSubTypeMessageGListAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWar
|
|||||||
i, _ := strconv.ParseInt(r.ReplaceAllString(l, "${Level}"), 10, 64)
|
i, _ := strconv.ParseInt(r.ReplaceAllString(l, "${Level}"), 10, 64)
|
||||||
m.Level = int(i)
|
m.Level = int(i)
|
||||||
log.Printf("parseSubTypeMessageGListAck : %s : %s/%s [%d] => %s\n", m.Name, m.Class1, m.Class2, m.Level, m.Status)
|
log.Printf("parseSubTypeMessageGListAck : %s : %s/%s [%d] => %s\n", m.Name, m.Class1, m.Class2, m.Level, m.Status)
|
||||||
//log.Printf("parseSubTypeMessageGListAck : %s\n", l)
|
|
||||||
cwm.Members = append(cwm.Members, m)
|
cwm.Members = append(cwm.Members, m)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user