From c9e1220fb8f11d27f41b1dfd6bb5a5071cdac755 Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 30 May 2019 17:28:50 +0800 Subject: [PATCH] test --- msg.go | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/msg.go b/msg.go index cfbe7b4..d5f53aa 100644 --- a/msg.go +++ b/msg.go @@ -71,32 +71,32 @@ func parseSubTypeMessageGRolesAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Bartender}")) != 0 { s := r.ReplaceAllString(m.Text, "${Bartender}") _, i := utf8.DecodeRuneInString(s) - _, i = utf8.DecodeRuneInString(s[i:]) - cwm.BartenderID64 = getObjUserID(s[i:]) + _, j = utf8.DecodeRuneInString(s[i:]) + cwm.BartenderID64 = getObjUserID(s[i+j:]) } else { cwm.BartenderID64 = 0 } if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Commander}")) != 0 { s := r.ReplaceAllString(m.Text, "${Commander}") _, i := utf8.DecodeRuneInString(s) - _, i = utf8.DecodeRuneInString(s[i:]) - cwm.CommanderID64 = getObjUserID(s[i:]) + _, j = utf8.DecodeRuneInString(s[i:]) + cwm.CommanderID64 = getObjUserID(s[i+j:]) } else { cwm.CommanderID64 = 0 } if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Squire}")) != 0 { s := r.ReplaceAllString(m.Text, "${Squire}") _, i := utf8.DecodeRuneInString(s) - _, i = utf8.DecodeRuneInString(s[i:]) - cwm.SquireID64 = getObjUserID(s[i:]) + _, j = utf8.DecodeRuneInString(s[i:]) + cwm.SquireID64 = getObjUserID(s[i+j:]) } else { cwm.SquireID64 = 0 } if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Treasurer}")) != 0 { s := r.ReplaceAllString(m.Text, "${Treasurer}") _, i := utf8.DecodeRuneInString(s) - _, i = utf8.DecodeRuneInString(s[i:]) - cwm.TreasurerID64 = getObjUserID(s[i:]) + _, j = utf8.DecodeRuneInString(s[i:]) + cwm.TreasurerID64 = getObjUserID(s[i+j:]) } else { cwm.TreasurerID64 = 0 }