gameServer/HWProtoInRoomState.hs
changeset 6690 46b3f4776538
parent 6541 08ed346ed341
child 6721 7dbf8a0c1f5d
--- a/gameServer/HWProtoInRoomState.hs	Thu Feb 16 16:16:59 2012 +0100
+++ b/gameServer/HWProtoInRoomState.hs	Thu Feb 16 20:32:47 2012 +0400
@@ -206,11 +206,12 @@
 
 
 handleCmd_inRoom ["ROUNDFINISHED", correctly] = do
+    clId <- asks fst
     cl <- thisClient
     rm <- thisRoom
     chans <- roomClientsChans
 
-    if isMaster cl && (isJust $ gameInfo rm) then
+    if isMaster cl && isCorrect && (isJust $ gameInfo rm) then
         return $
             SaveReplay
             : ModifyRoom
@@ -222,7 +223,7 @@
             : UnreadyRoomClients
             : answerRemovedTeams chans rm
         else
-        return []
+        return [RemoveClientTeams clId]
     where
         answerRemovedTeams chans = map (\t -> AnswerClients chans ["REMOVE_TEAM", t]) . leftTeams . fromJust . gameInfo
         isCorrect = correctly == "1"