test
This commit is contained in:
parent
c9e1220fb8
commit
9868acd014
8
msg.go
8
msg.go
@ -71,7 +71,7 @@ func parseSubTypeMessageGRolesAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
|
|||||||
if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Bartender}")) != 0 {
|
if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Bartender}")) != 0 {
|
||||||
s := r.ReplaceAllString(m.Text, "${Bartender}")
|
s := r.ReplaceAllString(m.Text, "${Bartender}")
|
||||||
_, i := utf8.DecodeRuneInString(s)
|
_, i := utf8.DecodeRuneInString(s)
|
||||||
_, j = utf8.DecodeRuneInString(s[i:])
|
_, j := utf8.DecodeRuneInString(s[i:])
|
||||||
cwm.BartenderID64 = getObjUserID(s[i+j:])
|
cwm.BartenderID64 = getObjUserID(s[i+j:])
|
||||||
} else {
|
} else {
|
||||||
cwm.BartenderID64 = 0
|
cwm.BartenderID64 = 0
|
||||||
@ -79,7 +79,7 @@ func parseSubTypeMessageGRolesAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
|
|||||||
if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Commander}")) != 0 {
|
if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Commander}")) != 0 {
|
||||||
s := r.ReplaceAllString(m.Text, "${Commander}")
|
s := r.ReplaceAllString(m.Text, "${Commander}")
|
||||||
_, i := utf8.DecodeRuneInString(s)
|
_, i := utf8.DecodeRuneInString(s)
|
||||||
_, j = utf8.DecodeRuneInString(s[i:])
|
_, j := utf8.DecodeRuneInString(s[i:])
|
||||||
cwm.CommanderID64 = getObjUserID(s[i+j:])
|
cwm.CommanderID64 = getObjUserID(s[i+j:])
|
||||||
} else {
|
} else {
|
||||||
cwm.CommanderID64 = 0
|
cwm.CommanderID64 = 0
|
||||||
@ -87,7 +87,7 @@ func parseSubTypeMessageGRolesAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
|
|||||||
if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Squire}")) != 0 {
|
if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Squire}")) != 0 {
|
||||||
s := r.ReplaceAllString(m.Text, "${Squire}")
|
s := r.ReplaceAllString(m.Text, "${Squire}")
|
||||||
_, i := utf8.DecodeRuneInString(s)
|
_, i := utf8.DecodeRuneInString(s)
|
||||||
_, j = utf8.DecodeRuneInString(s[i:])
|
_, j := utf8.DecodeRuneInString(s[i:])
|
||||||
cwm.SquireID64 = getObjUserID(s[i+j:])
|
cwm.SquireID64 = getObjUserID(s[i+j:])
|
||||||
} else {
|
} else {
|
||||||
cwm.SquireID64 = 0
|
cwm.SquireID64 = 0
|
||||||
@ -95,7 +95,7 @@ func parseSubTypeMessageGRolesAck(m *ChatWarsMessage, r *regexp.Regexp) (*ChatWa
|
|||||||
if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Treasurer}")) != 0 {
|
if strings.Compare(`[unassigned]`, r.ReplaceAllString(m.Text, "${Treasurer}")) != 0 {
|
||||||
s := r.ReplaceAllString(m.Text, "${Treasurer}")
|
s := r.ReplaceAllString(m.Text, "${Treasurer}")
|
||||||
_, i := utf8.DecodeRuneInString(s)
|
_, i := utf8.DecodeRuneInString(s)
|
||||||
_, j = utf8.DecodeRuneInString(s[i:])
|
_, j := utf8.DecodeRuneInString(s[i:])
|
||||||
cwm.TreasurerID64 = getObjUserID(s[i+j:])
|
cwm.TreasurerID64 = getObjUserID(s[i+j:])
|
||||||
} else {
|
} else {
|
||||||
cwm.TreasurerID64 = 0
|
cwm.TreasurerID64 = 0
|
||||||
|
Loading…
Reference in New Issue
Block a user