gameServer/HWProtoInRoomState.hs
changeset 13812 1f15b0ee8e34
parent 13734 f4c8c6a174e8
child 13833 76a1d6275cd3
--- a/gameServer/HWProtoInRoomState.hs	Mon Sep 24 11:16:08 2018 -0400
+++ b/gameServer/HWProtoInRoomState.hs	Mon Sep 24 11:18:48 2018 -0400
@@ -367,7 +367,7 @@
     let sameRoom = clientRoom rnc thisClientId == clientRoom rnc newAdminId
     return $
         if (not (master || serverAdmin)) then
-            [Warning $ loc "You not the room master or a server admin!"]
+            [Warning $ loc "You're not the room master or a server admin!"]
         else if (isNothing maybeClientId) then
             [Warning $ loc "Player is not online."]
         else if (Just newAdminId == thisRoomMasterId) then
@@ -407,10 +407,12 @@
     return [AnswerClients s ["CHAT", n, B.unwords $ "/rnd" : rs], Random s rs]
 
 
-handleCmd_inRoom ["MAXTEAMS", n] = roomAdminOnly $ do
+handleCmd_inRoom ["MAXTEAMS", n] = do
     cl <- thisClient
     let m = readInt_ n
-    if m < 2 || m > cMaxTeams then
+    if not $ isMaster cl then
+        return [Warning $ loc "You're not the room master!"]
+    else if m < 2 || m > cMaxTeams then
         return [AnswerClients [sendChan cl] ["CHAT", nickServer, loc "/maxteams: specify number from 2 to 8"]]
     else
         return [ModifyRoom (\r -> r{teamsNumberLimit = m})]