This commit is contained in:
shoopea 2019-05-30 13:50:21 +08:00
parent 108b905a8b
commit 99d98cbeaf

View File

@ -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