Skip to content

Commit

Permalink
Replaced last occurrences of shrubbot calls with auth module
Browse files Browse the repository at this point in the history
  • Loading branch information
Timo Smit committed Sep 2, 2016
1 parent e33b948 commit 06d4413
Show file tree
Hide file tree
Showing 4 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion luascripts/commands/admin/listaliases.lua
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion luascripts/commands/admin/plock.lua
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion luascripts/commands/admin/vmute.lua
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions luascripts/players/greetings.lua
Expand Up @@ -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
Expand Down Expand Up @@ -118,4 +118,4 @@ function greetings.onbegin(clientId, firstTime)
end
end

return greetings
return greetings

0 comments on commit 06d4413

Please sign in to comment.