Replaced last occurrences of shrubbot calls with auth module

This commit is contained in:
Timo Smit 2016-09-02 14:52:34 +02:00
parent e33b9480c9
commit 06d4413b02
4 changed files with 5 additions and 5 deletions

View file

@ -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.\";")
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.\";")
return true

View file

@ -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.\";")
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.\";")
return true

View file

@ -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.\";")
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.\";")
return true

View file

@ -31,7 +31,7 @@ local userGreetings = {}
local levelGreetings = {}
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 userGreetings[stats.get(clientId, "playerGUID")] ~= nil then
@ -118,4 +118,4 @@ function greetings.onbegin(clientId, firstTime)
end
end
return greetings
return greetings