Disable !balance command on ETPub

This commit is contained in:
Timo Smit 2019-01-31 11:31:37 +01:00
parent 61ac6de86c
commit 5c0c9d3cee

View file

@ -15,10 +15,14 @@
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see <http://www.gnu.org/licenses/>.
local commands = wolfa_requireModule("commands.commands")
local auth = wolfa_requireModule("auth.auth")
local balancer = wolfa_requireModule("admin.balancer")
local commands = wolfa_requireModule("commands.commands")
local settings = wolfa_requireModule("util.settings")
function commandBalance(clientId, command, action)
if action == "enable" then
if not balancer.isRunning() then
@ -48,4 +52,4 @@ function commandBalance(clientId, command, action)
return true
end
commands.addadmin("balance", commandBalance, auth.PERM_BALANCE, "either asks the players to even up or evens them by moving or shuffling players", "^2!balance ^9(^henable|disable|force^9)")
commands.addadmin("balance", commandBalance, auth.PERM_BALANCE, "either asks the players to even up or evens them by moving or shuffling players", "^2!balance ^9(^henable|disable|force^9)", nil, (settings.get("fs_game") == "etpub"))