equal
deleted
inserted
replaced
43 |
43 |
44 handleCmd_lobby clID clients rooms ["CREATE_ROOM", newRoom, roomPassword] = |
44 handleCmd_lobby clID clients rooms ["CREATE_ROOM", newRoom, roomPassword] = |
45 if haveSameRoom then |
45 if haveSameRoom then |
46 [Warning "Room exists"] |
46 [Warning "Room exists"] |
47 else |
47 else |
48 [RoomRemoveThisClient, -- leave lobby |
48 [RoomRemoveThisClient "", -- leave lobby |
49 AddRoom newRoom roomPassword, |
49 AddRoom newRoom roomPassword, |
50 AnswerThisClient ["NOT_READY", clientNick] |
50 AnswerThisClient ["NOT_READY", clientNick] |
51 ] |
51 ] |
52 where |
52 where |
53 clientNick = nick $ clients IntMap.! clID |
53 clientNick = nick $ clients IntMap.! clID |
64 else if isRestrictedJoins jRoom then |
64 else if isRestrictedJoins jRoom then |
65 [Warning "Joining restricted"] |
65 [Warning "Joining restricted"] |
66 else if roomPassword /= password jRoom then |
66 else if roomPassword /= password jRoom then |
67 [Warning "Wrong password"] |
67 [Warning "Wrong password"] |
68 else |
68 else |
69 [RoomRemoveThisClient, -- leave lobby |
69 [RoomRemoveThisClient "", -- leave lobby |
70 RoomAddThisClient rID] -- join room |
70 RoomAddThisClient rID] -- join room |
71 ++ answerNicks |
71 ++ answerNicks |
72 ++ answerReady |
72 ++ answerReady |
73 ++ [AnswerThisRoom ["NOT_READY", nick client]] |
73 ++ [AnswerThisRoom ["NOT_READY", nick client]] |
74 ++ answerFullConfig |
74 ++ answerFullConfig |