From 99d98cbeaf8f4d98dc46d851103aac15ba1d71df Mon Sep 17 00:00:00 2001 From: shoopea Date: Thu, 30 May 2019 13:50:21 +0800 Subject: [PATCH] test --- client.go | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/client.go b/client.go index 63c2faf..d2c622e 100644 --- a/client.go +++ b/client.go @@ -2,7 +2,6 @@ package main import ( "strings" - "time" ) func clientSendCWMsg(userID64 int64, s string) { @@ -15,7 +14,7 @@ func clientSendCWMsg(userID64 int64, s string) { MQTGCmdQueue <- c } -func clientMsgMe(m ChatWarsMessageMeAck) { +func clientMsgMe(m *ChatWarsMessageMeAck) { if _, ok := clientsQueue[m.UserID64]; ok { t, err := getObjMsgDate(m.ObjID64) if c, ok := clientsCW[m.UserID64]; ok { @@ -24,13 +23,13 @@ func clientMsgMe(m ChatWarsMessageMeAck) { c.State = m.State c.LastUpdate = t if cacheObjGuild[``].ObjID64 != m.GuildID64 && strings.Compare(c.Role, ``) == 0 { - clientSendCWMsg(userID64, "/g_roles") + clientSendCWMsg(m.UserID64, "/g_roles") } } } else { c := ChatWarsClient{ GuildID64: m.GuildID64, - State: state, + State: m.State, LastUpdate: t, } clientsCW[m.UserID64] = &c