gameServer/HWProtoInRoomState.hs
changeset 9770 5706b637bae2
parent 9753 9579596cf471
child 9787 0da6ba2f1f93
--- a/gameServer/HWProtoInRoomState.hs	Mon Dec 09 10:59:38 2013 -0500
+++ b/gameServer/HWProtoInRoomState.hs	Mon Dec 09 23:32:57 2013 +0400
@@ -31,7 +31,11 @@
     | otherwise = do
         chans <- roomOthersChans
         cl <- thisClient
-        if isMaster cl then
+        rm <- thisRoom
+
+        if isSpecial rm then
+            return [Warning $ loc "Restricted"]
+        else if isMaster cl then
            return [
                 ModifyRoom f,
                 AnswerClients chans ("CFG" : paramName : paramStrs)]
@@ -291,7 +295,7 @@
         if illegalName newName then 
             [Warning $ loc "Illegal room name"]
         else
-        if isSpecial rm then 
+        if isSpecial rm then
             [Warning $ loc "Restricted"]
         else
         if isJust $ find (\r -> newName == name r) rs then
@@ -370,6 +374,10 @@
     cl <- thisClient
     return [ModifyRoom (\r -> r{isSpecial = True}) | isAdministrator cl]
 
+handleCmd_inRoom ["UNFIX"] = do
+    cl <- thisClient
+    return [ModifyRoom (\r -> r{isSpecial = False}) | isAdministrator cl]
+
 
 handleCmd_inRoom ["LIST"] = return [] -- for old clients (<= 0.9.17)