--- a/gameServer/HWProtoInRoomState.hs Mon Jun 28 21:41:45 2010 +0400
+++ b/gameServer/HWProtoInRoomState.hs Mon Jun 28 21:43:19 2010 +0400
@@ -183,16 +183,19 @@
enoughClans = not . null . drop 1 . group . map teamcolor . teams
-{-
-handleCmd_inRoom clID clients rooms ["EM", msg] =
- if (teamsInGame client > 0) && isLegal then
- (AnswerOthersInRoom ["EM", msg]) : [ModifyRoom (\r -> r{roundMsgs = roundMsgs r |> msg}) | not isKeepAlive]
- else
- []
+handleCmd_inRoom ["EM", msg] = do
+ cl <- thisClient
+ r <- thisRoom
+ chans <- roomOthersChans
+
+ if (teamsInGame cl > 0) && isLegal then
+ return $ (AnswerClients chans ["EM", msg]) : [ModifyRoom (\r -> r{roundMsgs = roundMsgs r |> msg}) | not isKeepAlive]
+ else
+ return []
where
- client = clients IntMap.! clID
(isLegal, isKeepAlive) = checkNetCmd msg
+{-
handleCmd_inRoom clID clients rooms ["ROUNDFINISHED"] =
if isMaster client then
[ModifyRoom