fix
This commit is contained in:
parent
39f8c082b2
commit
bf4344e412
4
msg.go
4
msg.go
@ -477,13 +477,13 @@ 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)
|
//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}")
|
||||||
m.Class2 = re.ReplaceAllString(l, "${Class2}")
|
m.Class2 = re.ReplaceAllString(l, "${Class2}")
|
||||||
m.Status = re.ReplaceAllString(l, "${Status}")
|
m.Status = re.ReplaceAllString(l, "${Status}")
|
||||||
i, _ := strconv.ParseInt(r.ReplaceAllString(l, "${Level}"), 10, 64)
|
i, _ := strconv.ParseInt(re.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)
|
||||||
cwm.Members = append(cwm.Members, m)
|
cwm.Members = append(cwm.Members, m)
|
||||||
|
Loading…
Reference in New Issue
Block a user