# HG changeset patch # User unc0rr # Date 1341689519 -14400 # Node ID 34efdd1f230f6ca2c00e02d1e784e1ab88e407b6 # Parent 2a69f2ed9273d7ac3f67668a36fd6ed730f9c0e5 - Check ready status only after deleting player's teams (should fix the bug when you're unable to start game) - Send LEFT message after deletion of player's teams (no idea if this breaks anything, but this is more accurate behavior) diff -r 2a69f2ed9273 -r 34efdd1f230f gameServer/Actions.hs --- a/gameServer/Actions.hs Sat Jul 07 15:28:47 2012 -0400 +++ b/gameServer/Actions.hs Sat Jul 07 23:31:59 2012 +0400 @@ -210,7 +210,6 @@ ri <- clientRoomA rnc <- gets roomsClients (gameProgress, playersNum) <- io $ room'sM rnc ((isJust . gameInfo) &&& playersIn) ri - ready <- client's isReady master <- client's isMaster -- client <- client's id clNick <- client's nick @@ -218,13 +217,14 @@ if master then if gameProgress && playersNum > 1 then - mapM_ processAction [ChangeMaster, AnswerClients chans ["LEFT", clNick, msg], NoticeMessage AdminLeft, RemoveClientTeams ci] + mapM_ processAction [ChangeMaster, NoticeMessage AdminLeft, RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]] else processAction RemoveRoom else - mapM_ processAction [AnswerClients chans ["LEFT", clNick, msg], RemoveClientTeams ci] + mapM_ processAction [RemoveClientTeams ci, AnswerClients chans ["LEFT", clNick, msg]] -- when not removing room + ready <- client's isReady when (not master || (gameProgress && playersNum > 1)) . io $ do modifyRoom rnc (\r -> r{ playersIn = playersIn r - 1,