equal
deleted
inserted
replaced
32 |
32 |
33 |
33 |
34 handleCmd_lobby :: CmdHandler |
34 handleCmd_lobby :: CmdHandler |
35 |
35 |
36 |
36 |
37 handleCmd_lobby ["LIST"] = do |
37 handleCmd_lobby ["LIST"] = return [] |
38 (ci, irnc) <- ask |
|
39 let cl = irnc `client` ci |
|
40 rooms <- allRoomInfos |
|
41 let roomsInfoList = concatMap (\r -> roomInfo (clientProto cl) (maybeNick . liftM (client irnc) $ masterID r) r) . filter (\r -> (roomProto r == clientProto cl)) |
|
42 return [AnswerClients [sendChan cl] ("ROOMS" : roomsInfoList rooms)] |
|
43 |
38 |
44 handleCmd_lobby ["CHAT", msg] = do |
39 handleCmd_lobby ["CHAT", msg] = do |
45 n <- clientNick |
40 n <- clientNick |
46 s <- roomOthersChans |
41 s <- roomOthersChans |
47 return [AnswerClients s ["CHAT", n, msg], RegisterEvent LobbyChatMessage] |
42 return [AnswerClients s ["CHAT", n, msg], RegisterEvent LobbyChatMessage] |