299 handleCmd_noRoom client clients rooms ["JOIN", roomName] = |
299 handleCmd_noRoom client clients rooms ["JOIN", roomName] = |
300 handleCmd_noRoom client clients rooms ["JOIN", roomName, ""] |
300 handleCmd_noRoom client clients rooms ["JOIN", roomName, ""] |
301 |
301 |
302 handleCmd_noRoom client _ _ ["CHAT_STRING", msg] = |
302 handleCmd_noRoom client _ _ ["CHAT_STRING", msg] = |
303 (noChangeClients, noChangeRooms, answerChatString (nick client) msg) |
303 (noChangeClients, noChangeRooms, answerChatString (nick client) msg) |
|
304 |
|
305 handleCmd_noRoom client _ _ ["GLOBALMSG", password, msg] = |
|
306 (noChangeClients, noChangeRooms, [answer]) |
|
307 where |
|
308 answer = \serverInfo -> |
|
309 if (not $ null password) && (adminPassword serverInfo == password) then |
|
310 (allClients, ["CHAT_STRING", nick client, msg]) |
|
311 else |
|
312 (clientOnly, ["ERROR", "Wrong password"]) |
304 |
313 |
305 handleCmd_noRoom _ _ _ _ = (noChangeClients, noChangeRooms, answerBadCmd) |
314 handleCmd_noRoom _ _ _ _ = (noChangeClients, noChangeRooms, answerBadCmd) |
306 |
315 |
307 |
316 |
308 -- 'inRoom' clients state command handlers |
317 -- 'inRoom' clients state command handlers |