Show only logged-in clients quit messages
authorunc0rr
Sun, 03 Apr 2011 13:34:04 +0400
changeset 5091 288dcbda3b77
parent 5090 2922455e606e
child 5092 28e0a6d2d09a
Show only logged-in clients quit messages
gameServer/Actions.hs
--- a/gameServer/Actions.hs	Sun Apr 03 13:31:33 2011 +0400
+++ b/gameServer/Actions.hs	Sun Apr 03 13:34:04 2011 +0400
@@ -127,6 +127,7 @@
 
     chan <- client's sendChan
     clNick <- client's nick
+    loggedIn <- client's logonPassed
 
     when (ri /= lobbyId) $ do
         processAction $ MoveToLobby ("quit: " `B.append` msg)
@@ -137,7 +138,7 @@
         infoM "Clients" (show ci ++ " quits: " ++ B.unpack msg)
 
     processAction $ AnswerClients [chan] ["BYE", msg]
-    processAction $ AnswerClients clientsChans ["LOBBY:LEFT", clNick, msg]
+    when loggedIn $ processAction $ AnswerClients clientsChans ["LOBBY:LEFT", clNick, msg]
 
     s <- get
     put $! s{removedClients = ci `Set.insert` removedClients s}