diff -r ce5fbd98370f -r dd98869d74b4 gameServer/HWProtoInRoomState.hs --- a/gameServer/HWProtoInRoomState.hs Fri Feb 24 23:49:31 2012 +0400 +++ b/gameServer/HWProtoInRoomState.hs Sat Feb 25 22:18:08 2012 +0400 @@ -211,19 +211,24 @@ rm <- thisRoom chans <- roomClientsChans - if isMaster cl && isCorrect && (isJust $ gameInfo rm) then - return $ - SaveReplay - : ModifyRoom - (\r -> r{ - gameInfo = Nothing, - readyPlayers = 0 - } - ) - : UnreadyRoomClients - : answerRemovedTeams chans rm + if isJust $ gameInfo rm then + if isMaster cl && isCorrect then + return $ + SaveReplay + : ModifyRoom + (\r -> r{ + gameInfo = Nothing, + readyPlayers = 0 + } + ) + : UnreadyRoomClients + : answerRemovedTeams chans rm + else if not isCorrect then + return [RemoveClientTeams clId] + else + return [] else - return [RemoveClientTeams clId] + return [] where answerRemovedTeams chans = map (\t -> AnswerClients chans ["REMOVE_TEAM", t]) . leftTeams . fromJust . gameInfo isCorrect = correctly == "1"