test
This commit is contained in:
parent
108b905a8b
commit
99d98cbeaf
@ -2,7 +2,6 @@ package main
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"strings"
|
"strings"
|
||||||
"time"
|
|
||||||
)
|
)
|
||||||
|
|
||||||
func clientSendCWMsg(userID64 int64, s string) {
|
func clientSendCWMsg(userID64 int64, s string) {
|
||||||
@ -15,7 +14,7 @@ func clientSendCWMsg(userID64 int64, s string) {
|
|||||||
MQTGCmdQueue <- c
|
MQTGCmdQueue <- c
|
||||||
}
|
}
|
||||||
|
|
||||||
func clientMsgMe(m ChatWarsMessageMeAck) {
|
func clientMsgMe(m *ChatWarsMessageMeAck) {
|
||||||
if _, ok := clientsQueue[m.UserID64]; ok {
|
if _, ok := clientsQueue[m.UserID64]; ok {
|
||||||
t, err := getObjMsgDate(m.ObjID64)
|
t, err := getObjMsgDate(m.ObjID64)
|
||||||
if c, ok := clientsCW[m.UserID64]; ok {
|
if c, ok := clientsCW[m.UserID64]; ok {
|
||||||
@ -24,13 +23,13 @@ func clientMsgMe(m ChatWarsMessageMeAck) {
|
|||||||
c.State = m.State
|
c.State = m.State
|
||||||
c.LastUpdate = t
|
c.LastUpdate = t
|
||||||
if cacheObjGuild[``].ObjID64 != m.GuildID64 && strings.Compare(c.Role, ``) == 0 {
|
if cacheObjGuild[``].ObjID64 != m.GuildID64 && strings.Compare(c.Role, ``) == 0 {
|
||||||
clientSendCWMsg(userID64, "/g_roles")
|
clientSendCWMsg(m.UserID64, "/g_roles")
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
c := ChatWarsClient{
|
c := ChatWarsClient{
|
||||||
GuildID64: m.GuildID64,
|
GuildID64: m.GuildID64,
|
||||||
State: state,
|
State: m.State,
|
||||||
LastUpdate: t,
|
LastUpdate: t,
|
||||||
}
|
}
|
||||||
clientsCW[m.UserID64] = &c
|
clientsCW[m.UserID64] = &c
|
||||||
|
Loading…
Reference in New Issue
Block a user