Clear player's clan info on room join
authorunc0rr
Mon, 18 Feb 2013 22:47:42 +0400
changeset 8514 896b283f41a2
parent 8513 cd85ab23f38b
child 8515 222f43420615
Clear player's clan info on room join
gameServer/Actions.hs
gameServer/HWProtoInRoomState.hs
--- a/gameServer/Actions.hs	Mon Feb 18 22:21:31 2013 +0400
+++ b/gameServer/Actions.hs	Mon Feb 18 22:47:42 2013 +0400
@@ -220,7 +220,7 @@
     rnc <- gets roomsClients
 
     io $ do
-        modifyClient rnc (\cl -> cl{teamsInGame = 0, isReady = False, isMaster = False, isInGame = False}) ci
+        modifyClient rnc (\cl -> cl{teamsInGame = 0, isReady = False, isMaster = False, isInGame = False, clientClan = Nothing}) ci
         modifyRoom rnc (\r -> r{playersIn = playersIn r + 1}) ri
         moveClientToRoom rnc ri ci
 
--- a/gameServer/HWProtoInRoomState.hs	Mon Feb 18 22:21:31 2013 +0400
+++ b/gameServer/HWProtoInRoomState.hs	Mon Feb 18 22:47:42 2013 +0400
@@ -309,7 +309,7 @@
             && isJust maybeClientId
             && (kickId /= thisClientId)
             && sameRoom
-            && ((isNothing $ gameInfo rm) || notOnly2Clans || teamsInGame kickCl = 0)
+            && ((isNothing $ gameInfo rm) || notOnly2Clans || teamsInGame kickCl == 0)
         ]