equal
deleted
inserted
replaced
16 |
16 |
17 handleCmd_inRoom clID clients _ ["CHAT", msg] = |
17 handleCmd_inRoom clID clients _ ["CHAT", msg] = |
18 [AnswerOthersInRoom ["CHAT", clientNick, msg]] |
18 [AnswerOthersInRoom ["CHAT", clientNick, msg]] |
19 where |
19 where |
20 clientNick = nick $ clients IntMap.! clID |
20 clientNick = nick $ clients IntMap.! clID |
21 |
|
22 |
|
23 handleCmd_inRoom clID clients _ ["TEAM_CHAT", msg] = |
|
24 [AnswerOthersInRoom ["TEAM_CHAT", clientNick, msg]] |
|
25 where |
|
26 clientNick = nick $ clients IntMap.! clID |
|
27 |
|
28 |
21 |
29 handleCmd_inRoom clID clients rooms ["PART"] = |
22 handleCmd_inRoom clID clients rooms ["PART"] = |
30 [RoomRemoveThisClient "part"] |
23 [RoomRemoveThisClient "part"] |
31 where |
24 where |
32 client = clients IntMap.! clID |
25 client = clients IntMap.! clID |
193 kickClient = fromJust maybeClient |
186 kickClient = fromJust maybeClient |
194 kickID = clientUID kickClient |
187 kickID = clientUID kickClient |
195 |
188 |
196 |
189 |
197 handleCmd_inRoom clID clients _ ["TEAMCHAT", msg] = |
190 handleCmd_inRoom clID clients _ ["TEAMCHAT", msg] = |
198 if (teamsInGame client > 0) then |
191 [AnswerSameClan ["EM", engineMsg]] |
199 [AnswerSameClan ["EM", engineMsg]] |
|
200 else |
|
201 [] |
|
202 where |
192 where |
203 client = clients IntMap.! clID |
193 client = clients IntMap.! clID |
204 engineMsg = toEngineMsg $ 'b' : ((nick client) ++ "(team): " ++ msg ++ "\x20\x20") |
194 engineMsg = toEngineMsg $ 'b' : ((nick client) ++ "(team): " ++ msg ++ "\x20\x20") |
205 |
195 |
206 handleCmd_inRoom clID _ _ _ = [ProtocolError "Incorrect command (state: in room)"] |
196 handleCmd_inRoom clID _ _ _ = [ProtocolError "Incorrect command (state: in room)"] |