gameServer/HWProtoInRoomState.hs
changeset 13731 f4c8c6a174e8
parent 13714 e241c9efd217
child 13851 76a1d6275cd3
--- a/gameServer/HWProtoInRoomState.hs	Fri Aug 31 23:49:32 2018 +0200
+++ b/gameServer/HWProtoInRoomState.hs	Sat Sep 01 00:05:55 2018 +0200
@@ -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})]