Proper room removing when master quits
authorunc0rr
Thu, 08 Jan 2009 22:40:56 +0000
changeset 1620 5f4cd6708eb5
parent 1619 eb14d2e22e89
child 1621 d1ded2532d3f
Proper room removing when master quits
netserver/HWProto.hs
--- a/netserver/HWProto.hs	Thu Jan 08 22:37:03 2009 +0000
+++ b/netserver/HWProto.hs	Thu Jan 08 22:40:56 2009 +0000
@@ -127,7 +127,7 @@
 	if null (room client) then
 		(noChangeClients, noChangeRooms, answerQuit msg ++ (answerQuitLobby (nick client) msg) )
 	else if isMaster client then
-		(modifyRoomClients clRoom (\cl -> if isMaster cl then cl else cl{room = [], isReady = False}), removeRoom (room client), (answerQuit msg) ++ (answerQuitLobby (nick client) msg) ++ (answerAbandoned $ protocol client) ++ (answerRoomDeleted $ room client)) -- core disconnects clients on ROOMABANDONED answer
+		(modifyRoomClients clRoom (\cl -> cl{isReady = False, partRoom = True}), removeRoom (room client), (answerQuit msg) ++ (answerQuitLobby (nick client) msg) ++ (answerAbandoned $ protocol client) ++ (answerRoomDeleted $ room client)) -- core disconnects clients on ROOMABANDONED answer
 	else
 		(noChangeClients, modifyRoom clRoom{teams = othersTeams, playersIn = (playersIn clRoom) - 1, readyPlayers = newReadyPlayers}, (answerQuit msg) ++ (answerQuitInform (nick client) msg) ++ (answerQuitLobby (nick client) msg) ++ answerRemoveClientTeams)
 	where