equal
deleted
inserted
replaced
215 rm <- thisRoom |
215 rm <- thisRoom |
216 chans <- roomOthersChans |
216 chans <- roomOthersChans |
217 |
217 |
218 if teamsInGame cl > 0 && (isJust $ gameInfo rm) && (not $ B.null legalMsgs) then |
218 if teamsInGame cl > 0 && (isJust $ gameInfo rm) && (not $ B.null legalMsgs) then |
219 return $ AnswerClients chans ["EM", legalMsgs] |
219 return $ AnswerClients chans ["EM", legalMsgs] |
220 : [ModifyRoom (\r -> r{gameInfo = liftM (\g -> g{roundMsgs = nonEmptyMsgs : roundMsgs g}) $ gameInfo r}) | not $ B.null nonEmptyMsgs] |
220 : [ModifyRoom (\r -> r{gameInfo = liftM |
|
221 (\g -> g{ |
|
222 roundMsgs = if B.null nonEmptyMsgs then roundMsgs g else nonEmptyMsgs : roundMsgs g |
|
223 , lastFilteredTimedMsg = fromMaybe (lastFilteredTimedMsg g) lastFTMsg}) |
|
224 $ gameInfo r})] |
221 else |
225 else |
222 return [] |
226 return [] |
223 where |
227 where |
224 (legalMsgs, nonEmptyMsgs) = checkNetCmd msg |
228 (legalMsgs, nonEmptyMsgs, lastFTMsg) = checkNetCmd msg |
225 |
229 |
226 |
230 |
227 handleCmd_inRoom ["ROUNDFINISHED", _] = do |
231 handleCmd_inRoom ["ROUNDFINISHED", _] = do |
228 cl <- thisClient |
232 cl <- thisClient |
229 rm <- thisRoom |
233 rm <- thisRoom |