equal
deleted
inserted
replaced
126 (noChangeClients, noChangeRooms, answerCannotCreateRoom) |
126 (noChangeClients, noChangeRooms, answerCannotCreateRoom) |
127 else |
127 else |
128 if haveSameRoom then |
128 if haveSameRoom then |
129 (noChangeClients, noChangeRooms, answerRoomExists) |
129 (noChangeClients, noChangeRooms, answerRoomExists) |
130 else |
130 else |
131 (modifyClient client{room = newRoom, isMaster = True}, addRoom createRoom{name = newRoom, password = roomPassword, roomProto = (protocol client)}, answerJoined $ nick client) |
131 (modifyClient client{room = newRoom, isMaster = True}, addRoom createRoom{name = newRoom, password = roomPassword, roomProto = (protocol client)}, (answerJoined $ nick client) ++ (answerNotReady $ nick client)) |
132 where |
132 where |
133 haveSameRoom = isJust $ find (\room -> newRoom == name room) rooms |
133 haveSameRoom = isJust $ find (\room -> newRoom == name room) rooms |
134 |
134 |
135 handleCmd_noRoom client clients rooms ["CREATE", newRoom] = |
135 handleCmd_noRoom client clients rooms ["CREATE", newRoom] = |
136 handleCmd_noRoom client clients rooms ["CREATE", newRoom, ""] |
136 handleCmd_noRoom client clients rooms ["CREATE", newRoom, ""] |