# HG changeset patch # User unc0rr # Date 1330193888 -14400 # Node ID dd98869d74b4585e4b9cd5cbf3c4e347630033ef # Parent ce5fbd98370f1c860e151104f4cc929b1f201984 Remove client's teams only when game is running and exit status is 'incorrect exit'. Frontend still sends excessive ROUND_FINISHED, so the bug is not fixed completely. 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"