GameServer: Print syntax help if calling /maxteams without argument
authorWuzzy <Wuzzy2@mail.ru>
Sat, 03 Nov 2018 15:27:27 +0100
changeset 14139 589a752c01ca
parent 14138 d6915d15b6de
child 14140 90fd4f3d01e3
GameServer: Print syntax help if calling /maxteams without argument
gameServer/HWProtoCore.hs
gameServer/HWProtoInRoomState.hs
--- a/gameServer/HWProtoCore.hs	Sat Nov 03 15:17:46 2018 +0100
+++ b/gameServer/HWProtoCore.hs	Sat Nov 03 15:27:27 2018 +0100
@@ -103,6 +103,7 @@
         h "FORCE" msg | not $ B.null msg = handleCmd_roomOnly ["VOTE", upperCase msg, "FORCE"]
                       | otherwise = handleCmd_roomOnly ["VOTE", "", "FORCE"]
         h "MAXTEAMS" n | not $ B.null n = handleCmd_roomOnly ["MAXTEAMS", n]
+                       | otherwise = handleCmd_roomOnly ["MAXTEAMS"]
 
         -- lobby-only commands
         h "STATS" _ = handleCmd_lobbyOnly ["STATS"]
--- a/gameServer/HWProtoInRoomState.hs	Sat Nov 03 15:17:46 2018 +0100
+++ b/gameServer/HWProtoInRoomState.hs	Sat Nov 03 15:27:27 2018 +0100
@@ -415,6 +415,8 @@
     else
         return [ModifyRoom (\r -> r{teamsNumberLimit = m})]
 
+handleCmd_inRoom ["MAXTEAMS"] = handleCmd_inRoom ["MAXTEAMS", ""]
+
 handleCmd_inRoom ["FIX"] = serverAdminOnly $
     return [ModifyRoom (\r -> r{isSpecial = True})]