equal
deleted
inserted
replaced
231 clID, |
231 clID, |
232 serverInfo, |
232 serverInfo, |
233 adjust (\cl -> cl{isMaster = True}) newMasterId clients, |
233 adjust (\cl -> cl{isMaster = True}) newMasterId clients, |
234 adjust (\r -> r{name = newRoomName}) rID rooms |
234 adjust (\r -> r{name = newRoomName}) rID rooms |
235 ) |
235 ) |
236 newRoomName = "abandoned" |
236 newRoomName = nick newMasterClient |
237 otherPlayersSet = IntSet.delete clID (playersIDs room) |
237 otherPlayersSet = IntSet.delete clID (playersIDs room) |
238 newMasterId = IntSet.findMin otherPlayersSet |
238 newMasterId = IntSet.findMin otherPlayersSet |
|
239 newMasterClient = clients ! newMasterId |
239 |
240 |
240 |
241 |
241 processAction (clID, serverInfo, clients, rooms) (AddRoom roomName roomPassword) = do |
242 processAction (clID, serverInfo, clients, rooms) (AddRoom roomName roomPassword) = do |
242 let newServerInfo = serverInfo {nextRoomID = newID} |
243 let newServerInfo = serverInfo {nextRoomID = newID} |
243 let room = newRoom{ |
244 let room = newRoom{ |