netserver/HWProto.hs
changeset 898 344ba7dba23d
parent 897 35d91fa3753b
child 899 36f91881e83f
--- a/netserver/HWProto.hs	Thu May 01 15:26:09 2008 +0000
+++ b/netserver/HWProto.hs	Thu May 01 15:55:03 2008 +0000
@@ -71,12 +71,14 @@
 
 handleCmd_inRoom client _ rooms _ = (client, rooms, [client], ["ERROR", "Bad command or incorrect parameter"])
 
--- state-independent comman handlers	
+-- state-independent command handlers
 handleCmd :: ClientInfo -> [ClientInfo] -> [RoomInfo] -> [String] -> (ClientInfo, [RoomInfo], [ClientInfo], [String])
 
 handleCmd client clients rooms ("QUIT":xs) =
 	if null (room client) then
 		(client, rooms, [client], ["QUIT"])
+	else if isMaster client then
+		(client, filter (\rm -> room client /= name rm) rooms, fromRoom (room client) clients, ["ROOMABANDONED"])
 	else
 		(client, rooms, fromRoom (room client) clients, ["QUIT", nick client])