gameServer/Actions.hs
changeset 10732 7c4f9e5e447c
parent 10460 8dcea9087d75
child 10786 712283ed86e0
--- a/gameServer/Actions.hs	Tue Dec 30 22:12:07 2014 +0300
+++ b/gameServer/Actions.hs	Tue Dec 30 22:59:15 2014 +0300
@@ -415,11 +415,12 @@
 processAction RemoveClientTeams = do
     (Just ci) <- gets clientIndex
     rnc <- gets roomsClients
+    n <- client's nick
 
     removeTeamActions <- io $ do
         rId <- clientRoomM rnc ci
         roomTeams <- room'sM rnc teams rId
-        return . Prelude.map (RemoveTeam . teamname) . Prelude.filter (\t -> teamownerId t == ci) $ roomTeams
+        return . Prelude.map (RemoveTeam . teamname) . Prelude.filter (\t -> teamowner t == n) $ roomTeams
 
     mapM_ processAction removeTeamActions