mirror of
https://github.com/WiiLink24/wfc-server.git
synced 2026-09-30 11:06:34 -05:00
GPCM: Only send logout status to authenticated friends
This commit is contained in:
@@ -239,7 +239,7 @@ func (g *GameSpySession) sendLogoutStatus() {
|
||||
ip := strconv.FormatInt(int64(int32(rawIP)), 10)
|
||||
|
||||
mutex.Lock()
|
||||
for _, storedPid := range g.FriendList {
|
||||
for _, storedPid := range g.AuthFriendList {
|
||||
sendMessageToProfileId("100", g.User.ProfileId, storedPid, "|s|0|ss|Offline|ls||ip|"+ip+"|p|0|qm|0")
|
||||
}
|
||||
mutex.Unlock()
|
||||
|
||||
@@ -122,7 +122,7 @@ func handleRequest(conn net.Conn) {
|
||||
conn.Write([]byte(payload))
|
||||
|
||||
logging.Notice(session.ModuleName, "Connection established from", conn.RemoteAddr())
|
||||
common.OnlineStatUpdate(1)
|
||||
common.OnlineStatUpdate(1)
|
||||
|
||||
// Here we go into the listening loop
|
||||
for {
|
||||
@@ -133,12 +133,12 @@ func handleRequest(conn net.Conn) {
|
||||
if errors.Is(err, io.EOF) {
|
||||
// Client closed connection, terminate.
|
||||
logging.Notice(session.ModuleName, "Client closed connection")
|
||||
common.OnlineStatUpdate(-1)
|
||||
common.OnlineStatUpdate(-1)
|
||||
return
|
||||
}
|
||||
|
||||
logging.Error(session.ModuleName, "Connection lost")
|
||||
common.OnlineStatUpdate(-1)
|
||||
common.OnlineStatUpdate(-1)
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user