diff -r b0b0510eb82d -r b58afaadf7ae netserver/HWProto.hs --- a/netserver/HWProto.hs Thu Oct 09 15:54:09 2008 +0000 +++ b/netserver/HWProto.hs Thu Oct 09 16:03:27 2008 +0000 @@ -57,7 +57,10 @@ else if isMaster client then (noChangeClients, removeRoom (room client), answerQuit ++ answerAbandoned) -- core disconnects clients on ROOMABANDONED answer else - (noChangeClients, noChangeRooms, answerQuit ++ (answerQuitInform $ nick client)) + (noChangeClients, modifyRoom clRoom{teams = filter (\t -> teamowner t /= nick client) $ teams clRoom}, answerQuit ++ (answerQuitInform $ nick client) ++ answerRemoveClientTeams) + where + clRoom = roomByName (room client) rooms + answerRemoveClientTeams = map (\tn -> (othersInRoom, ["REMOVE_TEAM", teamname tn])) $ filter (\t -> teamowner t == nick client) $ teams clRoom -- check state and call state-dependent commmand handlers