gameServer/HWProtoInRoomState.hs
changeset 2381 959da8402cac
parent 2352 7eaf82cf0890
child 2403 6c5d504af2ba
equal deleted inserted replaced
2380:603965eca22b 2381:959da8402cac
   138 		room = rooms IntMap.! (roomID client)
   138 		room = rooms IntMap.! (roomID client)
   139 		enoughClans = not $ null $ drop 1 $ group $ map teamcolor $ teams room
   139 		enoughClans = not $ null $ drop 1 $ group $ map teamcolor $ teams room
   140 
   140 
   141 
   141 
   142 handleCmd_inRoom clID clients rooms ["EM", msg] =
   142 handleCmd_inRoom clID clients rooms ["EM", msg] =
   143 	if (teamsInGame client > 0) && (isLegalNetCommand msg) then
   143 	if (teamsInGame client > 0) && isLegal then
   144 		[ModifyRoom (\r -> r{roundMsgs = roundMsgs r |> msg}),
   144 		(AnswerOthersInRoom ["EM", msg]) : [ModifyRoom (\r -> r{roundMsgs = roundMsgs r |> msg}) | not isKeepAlive]
   145 		AnswerOthersInRoom ["EM", msg]]
       
   146 	else
   145 	else
   147 		[]
   146 		[]
   148 	where
   147 	where
   149 		client = clients IntMap.! clID
   148 		client = clients IntMap.! clID
       
   149 		(isLegal, isKeepAlive) = checkNetCmd msg
   150 
   150 
   151 handleCmd_inRoom clID clients rooms ["ROUNDFINISHED"] =
   151 handleCmd_inRoom clID clients rooms ["ROUNDFINISHED"] =
   152 	if isMaster client then
   152 	if isMaster client then
   153 		[ModifyRoom
   153 		[ModifyRoom
   154 				(\r -> r{
   154 				(\r -> r{