equal
deleted
inserted
replaced
161 onLoginFinished client clients = |
161 onLoginFinished client clients = |
162 if (null $ nick client) || (protocol client == 0) then |
162 if (null $ nick client) || (protocol client == 0) then |
163 [] |
163 [] |
164 else |
164 else |
165 (answerClientOnly $ ["LOBBY:JOINED"] ++ (map nick $ clients)) ++ |
165 (answerClientOnly $ ["LOBBY:JOINED"] ++ (map nick $ clients)) ++ |
166 (answerOthersRoom ["LOBBY:JOINED", nick client]) |
166 (answerOthersRoom ["LOBBY:JOINED", nick client]) ++ |
|
167 (answerServerMessage client clients) |
167 |
168 |
168 handleCmd_noInfo :: CmdHandler |
169 handleCmd_noInfo :: CmdHandler |
169 handleCmd_noInfo client clients _ ["NICK", newNick] = |
170 handleCmd_noInfo client clients _ ["NICK", newNick] = |
170 if not . null $ nick client then |
171 if not . null $ nick client then |
171 (noChangeClients, noChangeRooms, answerNickChosen) |
172 (noChangeClients, noChangeRooms, answerNickChosen) |
190 |
191 |
191 |
192 |
192 -- 'noRoom' clients state command handlers |
193 -- 'noRoom' clients state command handlers |
193 handleCmd_noRoom :: CmdHandler |
194 handleCmd_noRoom :: CmdHandler |
194 handleCmd_noRoom client clients rooms ["LIST"] = |
195 handleCmd_noRoom client clients rooms ["LIST"] = |
195 (noChangeClients, noChangeRooms, answerServerMessage client clients ++ (answerRoomsList $ concatMap roomInfo $ sameProtoRooms)) |
196 (noChangeClients, noChangeRooms, (answerRoomsList $ concatMap roomInfo $ sameProtoRooms)) |
196 where |
197 where |
197 roomInfo room = [ |
198 roomInfo room = [ |
198 name room, |
199 name room, |
199 (show $ playersIn room) ++ "(" ++ (show $ length $ teams room) ++ ")", |
200 (show $ playersIn room) ++ "(" ++ (show $ length $ teams room) ++ ")", |
200 show $ gameinprogress room |
201 show $ gameinprogress room |