gameServer/HWProtoCore.hs
changeset 1879 bb114339eb4e
parent 1862 7f303aa066da
child 1928 9bf8f4f30d6b
--- a/gameServer/HWProtoCore.hs	Mon Mar 09 20:23:04 2009 +0000
+++ b/gameServer/HWProtoCore.hs	Mon Mar 09 20:47:17 2009 +0000
@@ -16,15 +16,12 @@
 handleCmd clID _ _ ["PING"] = [AnswerThisClient ["PONG"]]
 
 handleCmd clID clients rooms ("QUIT" : xs) =
-	(if isMaster client then [RemoveRoom] else removeClientTeams)
+	(if isMaster client then [RemoveRoom] else [RemoveClientTeams clID])
 	++ [ByeClient msg]
 	where
 		client = clients IntMap.! clID
 		clientNick = nick client
 		msg = if not $ null xs then head xs else ""
-		room = rooms IntMap.! (roomID client)
-		clientTeams = filter (\t -> teamowner t == nick client) $ teams room
-		removeClientTeams = map (RemoveTeam . teamname) clientTeams
 
 
 handleCmd clID clients rooms cmd =