Don't accept EM message when the game isn't started
authorunc0rr
Sun, 06 Feb 2011 18:59:53 +0300
changeset 4931 da43c36a6e92
parent 4930 5d59bb58c365
child 4932 f11d80bac7ed
Don't accept EM message when the game isn't started
gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoInRoomState.hs	Sun Feb 06 13:19:00 2011 +0100
+++ b/gameServer/HWProtoInRoomState.hs	Sun Feb 06 18:59:53 2011 +0300
@@ -186,8 +186,8 @@
     cl <- thisClient
     r <- thisRoom
     chans <- roomOthersChans
-    
-    if (teamsInGame cl > 0) && isLegal then
+
+    if (teamsInGame cl > 0) && (gameinprogress r) && isLegal then
         return $ (AnswerClients chans ["EM", msg]) : [ModifyRoom (\r -> r{roundMsgs = roundMsgs r |> msg}) | not isKeepAlive]
         else
         return []