mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-22 12:21:43 +00:00
Fixed minor bugs caused by sanitizing (refs #67)
This commit is contained in:
parent
c261a10c9f
commit
9eee8e8564
2 changed files with 3 additions and 3 deletions
|
@ -29,13 +29,13 @@ function commandRemoveWarn(clientId, cmdArguments)
|
|||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^ddewarn usage: "..commands.getadmin("dewarn")["syntax"].."\";")
|
||||
|
||||
return true
|
||||
elseif tonumber(cmdArguments[1]) == nil then
|
||||
elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then
|
||||
cmdClient = et.ClientNumberFromString(cmdArguments[1])
|
||||
else
|
||||
cmdClient = tonumber(cmdArguments[1])
|
||||
end
|
||||
|
||||
if cmdClient == -1 or cmdClient > et.trap_Cvar_Get("sv_maxclients") then
|
||||
if cmdClient == -1 then
|
||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^ddewarn: ^9no or multiple matches for '^7"..cmdArguments[1].."^9'.\";")
|
||||
|
||||
return true
|
||||
|
|
|
@ -31,7 +31,7 @@ function commandListAliases(clientId, cmdArguments)
|
|||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dlistaliases usage: "..commands.getadmin("listaliases")["syntax"].."\";")
|
||||
|
||||
return true
|
||||
elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > et.trap_Cvar_Get("sv_maxclients") then
|
||||
elseif tonumber(cmdArguments[1]) == nil or tonumber(cmdArguments[1]) > tonumber(et.trap_Cvar_Get("sv_maxclients")) then
|
||||
cmdClient = et.ClientNumberFromString(cmdArguments[1])
|
||||
else
|
||||
cmdClient = tonumber(cmdArguments[1])
|
||||
|
|
Loading…
Reference in a new issue