mirror of
https://github.com/etlegacy/wolfadmin.git
synced 2024-11-25 21:51:38 +00:00
Replaced last occurrences of shrubbot calls with auth module
This commit is contained in:
parent
e33b9480c9
commit
06d4413b02
4 changed files with 5 additions and 5 deletions
|
@ -52,7 +52,7 @@ function commandListAliases(clientId, cmdArguments)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dlistaliases: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9is immune to this command.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dlistaliases: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9is immune to this command.\";")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
elseif et.G_shrubbot_level(cmdClient) > et.G_shrubbot_level(clientId) then
|
elseif auth.getlevel(cmdClient) > auth.getlevel(clientId) then
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dlistaliases: ^9sorry, but your intended victim has a higher admin level than you do.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dlistaliases: ^9sorry, but your intended victim has a higher admin level than you do.\";")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -50,7 +50,7 @@ function commandPlayerLock(clientId, cmdArguments)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dplock: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9is immune to this command.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dplock: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9is immune to this command.\";")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
elseif et.G_shrubbot_level(cmdClient) > et.G_shrubbot_level(clientId) then
|
elseif auth.getlevel(cmdClient) > auth.getlevel(clientId) then
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dplock: ^9sorry, but your intended victim has a higher admin level than you do.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dplock: ^9sorry, but your intended victim has a higher admin level than you do.\";")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -64,7 +64,7 @@ function commandVoiceMute(clientId, cmdArguments)
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dvmute: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9is immune to this command.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dvmute: ^7"..et.gentity_get(cmdClient, "pers.netname").." ^9is immune to this command.\";")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
elseif et.G_shrubbot_level(cmdClient) > et.G_shrubbot_level(clientId) then
|
elseif auth.getlevel(cmdClient) > auth.getlevel(clientId) then
|
||||||
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dvmute: ^9sorry, but your intended victim has a higher admin level than you do.\";")
|
et.trap_SendConsoleCommand(et.EXEC_APPEND, "csay "..clientId.." \"^dvmute: ^9sorry, but your intended victim has a higher admin level than you do.\";")
|
||||||
|
|
||||||
return true
|
return true
|
||||||
|
|
|
@ -31,7 +31,7 @@ local userGreetings = {}
|
||||||
local levelGreetings = {}
|
local levelGreetings = {}
|
||||||
|
|
||||||
function greetings.get(clientId)
|
function greetings.get(clientId)
|
||||||
local lvl = et.G_shrubbot_level(clientId)
|
local lvl = auth.getlevel(clientId)
|
||||||
|
|
||||||
if auth.isallowed(clientId, auth.PERM_INCOGNITO) ~= 1 then
|
if auth.isallowed(clientId, auth.PERM_INCOGNITO) ~= 1 then
|
||||||
if userGreetings[stats.get(clientId, "playerGUID")] ~= nil then
|
if userGreetings[stats.get(clientId, "playerGUID")] ~= nil then
|
||||||
|
@ -118,4 +118,4 @@ function greetings.onbegin(clientId, firstTime)
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
return greetings
|
return greetings
|
||||||
|
|
Loading…
Reference in a new issue