equal
deleted
inserted
replaced
53 handleCmd_inRoom ["CHAT", msg] = do |
53 handleCmd_inRoom ["CHAT", msg] = do |
54 n <- clientNick |
54 n <- clientNick |
55 s <- roomOthersChans |
55 s <- roomOthersChans |
56 return [AnswerClients s ["CHAT", n, msg]] |
56 return [AnswerClients s ["CHAT", n, msg]] |
57 |
57 |
58 handleCmd_inRoom ["PART"] = return [MoveToLobby "part"] |
58 handleCmd_inRoom ["PART"] = return [MoveToLobby "part", RegisterEvent RoomJoin] |
59 handleCmd_inRoom ["PART", msg] = return [MoveToLobby $ "part: " `B.append` msg] |
59 handleCmd_inRoom ["PART", msg] = return [MoveToLobby $ "part: " `B.append` msg, RegisterEvent RoomJoin] |
60 |
60 |
61 |
61 |
62 handleCmd_inRoom ("CFG" : paramName : paramStrs) |
62 handleCmd_inRoom ("CFG" : paramName : paramStrs) |
63 | null paramStrs = return [ProtocolError $ loc "Empty config entry"] |
63 | null paramStrs = return [ProtocolError $ loc "Empty config entry"] |
64 | otherwise = do |
64 | otherwise = do |
238 return $ AnswerClients chans ["EM", legalMsgs] |
238 return $ AnswerClients chans ["EM", legalMsgs] |
239 : [ModifyRoom (\r -> r{gameInfo = liftM |
239 : [ModifyRoom (\r -> r{gameInfo = liftM |
240 (\g -> g{ |
240 (\g -> g{ |
241 roundMsgs = if B.null nonEmptyMsgs then roundMsgs g else nonEmptyMsgs : roundMsgs g |
241 roundMsgs = if B.null nonEmptyMsgs then roundMsgs g else nonEmptyMsgs : roundMsgs g |
242 , lastFilteredTimedMsg = fromMaybe (lastFilteredTimedMsg g) lastFTMsg}) |
242 , lastFilteredTimedMsg = fromMaybe (lastFilteredTimedMsg g) lastFTMsg}) |
243 $ gameInfo r})] |
243 $ gameInfo r}), RegisterEvent EngineMessage] |
244 else |
244 else |
245 return [] |
245 return [] |
246 where |
246 where |
247 (legalMsgs, nonEmptyMsgs, lastFTMsg) = checkNetCmd msg |
247 (legalMsgs, nonEmptyMsgs, lastFTMsg) = checkNetCmd msg |
248 |
248 |