gameServer/HWProtoInRoomState.hs
changeset 4931 da43c36a6e92
parent 4917 8ff92bdc9f98
child 4932 f11d80bac7ed
equal deleted inserted replaced
4930:5d59bb58c365 4931:da43c36a6e92
   184 
   184 
   185 handleCmd_inRoom ["EM", msg] = do
   185 handleCmd_inRoom ["EM", msg] = do
   186     cl <- thisClient
   186     cl <- thisClient
   187     r <- thisRoom
   187     r <- thisRoom
   188     chans <- roomOthersChans
   188     chans <- roomOthersChans
   189     
   189 
   190     if (teamsInGame cl > 0) && isLegal then
   190     if (teamsInGame cl > 0) && (gameinprogress r) && isLegal then
   191         return $ (AnswerClients chans ["EM", msg]) : [ModifyRoom (\r -> r{roundMsgs = roundMsgs r |> msg}) | not isKeepAlive]
   191         return $ (AnswerClients chans ["EM", msg]) : [ModifyRoom (\r -> r{roundMsgs = roundMsgs r |> msg}) | not isKeepAlive]
   192         else
   192         else
   193         return []
   193         return []
   194     where
   194     where
   195         (isLegal, isKeepAlive) = checkNetCmd msg
   195         (isLegal, isKeepAlive) = checkNetCmd msg