Fixed suspicious globals (fixes #75)

This commit is contained in:
Timo Smit 2017-02-21 10:45:16 +01:00
parent 2c32671304
commit 6eeec2d20a
2 changed files with 4 additions and 0 deletions

View file

@ -57,6 +57,8 @@ end
commands.addadmin("setlevel", commandSetLevel, auth.PERM_SETLEVEL, "sets the admin level of a player", "^9[^3name|slot#^9] ^9[^3level^9]", true, (settings.get("g_standalone") == 1))
function commandSetLevel(clientId, command, victim, level)
local cmdClient
if victim == nil then
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dsetlevel usage: "..commands.getadmin("setlevel")["syntax"].."\";")

View file

@ -53,6 +53,8 @@ end
commands.addadmin("warn", commandWarn, auth.PERM_WARN, "warns a player by displaying the reason", "^9[^3name|slot#^9] ^9[^3reason^9]", true, (settings.get("g_standalone") == 1 or settings.get("g_playerHistory") == 0))
function commandWarn(clientId, command, victim, ...)
local cmdClient
if not victim or not ... then
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dwarn usage: "..commands.getadmin("warn")["syntax"].."\";")