gameServer/Actions.hs
changeset 10056 cb9e07753802
parent 10017 de822cd3df3a
child 10057 795f5f918c8c
--- a/gameServer/Actions.hs	Wed Jan 22 23:06:50 2014 +0400
+++ b/gameServer/Actions.hs	Wed Jan 22 23:42:41 2014 +0400
@@ -221,7 +221,10 @@
     ri <- clientRoomA
     rnc <- gets roomsClients
     specialRoom <- io $ room'sM rnc isSpecial ri
-    newMasterId <- liftM (\ids -> fromMaybe (listToMaybe . reverse . filter (/= ci) $ ids) $ liftM Just delegateId) . io $ roomClientsIndicesM rnc ri
+    newMasterId <- if specialRoom then 
+        return Nothing
+        else
+        liftM (\ids -> fromMaybe (listToMaybe . reverse . filter (/= ci) $ ids) $ liftM Just delegateId) . io $ roomClientsIndicesM rnc ri
     newMaster <- io $ client'sM rnc id `DT.mapM` newMasterId
     oldMasterId <- io $ room'sM rnc masterID ri
     oldRoomName <- io $ room'sM rnc name ri