equal
deleted
inserted
replaced
192 processAction (clID, serverInfo, clients, rooms) (RoomRemoveThisClient msg) = do |
192 processAction (clID, serverInfo, clients, rooms) (RoomRemoveThisClient msg) = do |
193 (_, _, newClients, newRooms) <- |
193 (_, _, newClients, newRooms) <- |
194 if roomID client /= 0 then |
194 if roomID client /= 0 then |
195 if isMaster client then |
195 if isMaster client then |
196 if (gameinprogress room) && (playersIn room > 1) then |
196 if (gameinprogress room) && (playersIn room > 1) then |
197 changeMaster |
197 (changeMaster >>= (\state -> foldM processAction state |
|
198 [AnswerOthersInRoom ["LEFT", nick client, msg], |
|
199 RemoveClientTeams clID])) |
198 else -- not in game |
200 else -- not in game |
199 processAction (clID, serverInfo, clients, rooms) RemoveRoom |
201 processAction (clID, serverInfo, clients, rooms) RemoveRoom |
200 else -- not master |
202 else -- not master |
201 foldM |
203 foldM |
202 processAction |
204 processAction |