Skip to content

Commit

Permalink
Update ranks.lua
Browse files Browse the repository at this point in the history
  • Loading branch information
NubTheFatMan authored Feb 4, 2022
1 parent 1063d99 commit dabb9d0
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions lua/nadmin/shared/core/ranks.lua
Original file line number Diff line number Diff line change
Expand Up @@ -82,9 +82,11 @@ function nadmin:RegisterPerm(tbl)
end

function nadmin:FindRank(id)
if istable(nadmin.ranks[id]) then return nadmin.ranks[id] end
for i, rank in pairs(nadmin.ranks) do
if string.lower(id) == string.lower(rank.title) then return rank end
if isstring(id) then
if istable(nadmin.ranks[id]) then return nadmin.ranks[id] end
for i, rank in pairs(nadmin.ranks) do
if string.lower(id) == string.lower(rank.title) then return rank end
end
end
return nadmin.null_rank
end
Expand All @@ -105,4 +107,4 @@ function nadmin:DefaultRankUpdated()
end
end
return nadmin.null_rank
end
end

0 comments on commit dabb9d0

Please sign in to comment.