gameServer/Actions.hs
changeset 5119 f475e10c4081
parent 5092 28e0a6d2d09a
child 5143 649d87819682
--- a/gameServer/Actions.hs	Thu Apr 07 11:30:56 2011 -0400
+++ b/gameServer/Actions.hs	Thu Apr 07 21:43:43 2011 +0400
@@ -211,7 +211,8 @@
         else
         mapM_ processAction [AnswerClients chans ["LEFT", clNick, msg], RemoveClientTeams ci]
 
-    io $ do
+    -- when not removing room
+    when (not master || (gameProgress && playersNum > 1)) . io $ do
         modifyRoom rnc (\r -> r{
                 playersIn = playersIn r - 1,
                 readyPlayers = if ready then readyPlayers r - 1 else readyPlayers r
@@ -408,7 +409,7 @@
         [
             AnswerClients [sendChan cl] ["CONNECTED", "Hedgewars server http://www.hedgewars.org/", serverVersion]
             , CheckBanned
---            , AddIP2Bans (host cl) "Reconnected too fast" (addUTCTime 10 $ connectTime cl)
+            , AddIP2Bans (host cl) "Reconnected too fast" (addUTCTime 10 $ connectTime cl)
         ]