# HG changeset patch # User unc0rr # Date 1231454456 0 # Node ID 5f4cd6708eb5d0f239c7d562a89f1ed38cf69485 # Parent eb14d2e22e8933d5d537f9f51c35fb58704a2fd6 Proper room removing when master quits diff -r eb14d2e22e89 -r 5f4cd6708eb5 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