Don't set room to lobby to quitting room master
authorunc0rr
Thu, 08 Jan 2009 22:37:03 +0000
changeset 1619 eb14d2e22e89
parent 1618 2b9cadc232ab
child 1620 5f4cd6708eb5
Don't set room to lobby to quitting room master
netserver/HWProto.hs
--- a/netserver/HWProto.hs	Thu Jan 08 22:01:09 2009 +0000
+++ b/netserver/HWProto.hs	Thu Jan 08 22:37:03 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 -> 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 -> 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
 	else
 		(noChangeClients, modifyRoom clRoom{teams = othersTeams, playersIn = (playersIn clRoom) - 1, readyPlayers = newReadyPlayers}, (answerQuit msg) ++ (answerQuitInform (nick client) msg) ++ (answerQuitLobby (nick client) msg) ++ answerRemoveClientTeams)
 	where