Skip to content

Commit

Permalink
tweak(Server/Classes/Player) Lowercase account check
Browse files Browse the repository at this point in the history
Currently the docs say:`Money` and `Bank`, This will currently cause an error when used, better to accept both than change the docs
  • Loading branch information
Mycroft-Studios authored Jul 8, 2024
1 parent c80916c commit 572095b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion [core]/es_extended/server/classes/player.lua
Original file line number Diff line number Diff line change
Expand Up @@ -191,8 +191,10 @@ function CreateExtendedPlayer(playerId, identifier, group, accounts, inventory,
---@param account string
---@return table | nil
function self.getAccount(account)
account = string.lower(account)
for i = 1, #self.accounts do
if self.accounts[i].name == account then
local accountName = string.lower(self.accounts[i].name)
if accountName == account then
return self.accounts[i]
end
end
Expand Down

0 comments on commit 572095b

Please sign in to comment.