# HG changeset patch # User unc0rr # Date 1277746999 -14400 # Node ID f5d28402ca1d1a478a29c8dd3e962ba33d1b020b # Parent 0ef6f5182a7599408b0957eaf0b3603c59d75110 Engine Message command diff -r 0ef6f5182a75 -r f5d28402ca1d gameServer/HWProtoInRoomState.hs --- 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