equal
deleted
inserted
replaced
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 |