equal
deleted
inserted
replaced
52 |
52 |
53 handleCmd_lobby ["CREATE_ROOM", newRoom, roomPassword] |
53 handleCmd_lobby ["CREATE_ROOM", newRoom, roomPassword] |
54 | illegalName newRoom = return [Warning "Illegal room name"] |
54 | illegalName newRoom = return [Warning "Illegal room name"] |
55 | otherwise = do |
55 | otherwise = do |
56 rs <- allRoomInfos |
56 rs <- allRoomInfos |
57 (ci, irnc) <- ask |
57 cl <- thisClient |
58 let cl = irnc `client` ci |
|
59 return $ if isJust $ find (\room -> newRoom == name room) rs then |
58 return $ if isJust $ find (\room -> newRoom == name room) rs then |
60 [Warning "Room exists"] |
59 [Warning "Room exists"] |
61 else |
60 else |
62 [ |
61 [ |
63 AddRoom newRoom roomPassword, |
62 AddRoom newRoom roomPassword, |