equal
deleted
inserted
replaced
26 | Warning String |
26 | Warning String |
27 | ByeClient String |
27 | ByeClient String |
28 | ModifyClient (ClientInfo -> ClientInfo) |
28 | ModifyClient (ClientInfo -> ClientInfo) |
29 | ModifyRoom (RoomInfo -> RoomInfo) |
29 | ModifyRoom (RoomInfo -> RoomInfo) |
30 | AddRoom String String |
30 | AddRoom String String |
|
31 | CheckRegistered |
31 | Dump |
32 | Dump |
32 |
33 |
33 type CmdHandler = Int -> Clients -> Rooms -> [String] -> [Action] |
34 type CmdHandler = Int -> Clients -> Rooms -> [String] -> [Action] |
34 |
35 |
35 |
36 |
239 rID = roomID client |
240 rID = roomID client |
240 client = clients ! clID |
241 client = clients ! clID |
241 rmTeamMsg = toEngineMsg $ 'F' : teamName |
242 rmTeamMsg = toEngineMsg $ 'F' : teamName |
242 |
243 |
243 |
244 |
|
245 processAction (clID, serverInfo, clients, rooms) (CheckRegistered) = do |
|
246 writeChan (dbQueries serverInfo) $ HasRegistered $ nick client |
|
247 return (clID, serverInfo, clients, rooms) |
|
248 where |
|
249 client = clients ! clID |
|
250 |
244 processAction (clID, serverInfo, clients, rooms) (Dump) = do |
251 processAction (clID, serverInfo, clients, rooms) (Dump) = do |
245 writeChan (sendChan $ clients ! clID) ["DUMP", show serverInfo, showTree clients, showTree rooms] |
252 writeChan (sendChan $ clients ! clID) ["DUMP", show serverInfo, showTree clients, showTree rooms] |
246 return (clID, serverInfo, clients, rooms) |
253 return (clID, serverInfo, clients, rooms) |
247 |
254 |