Skip to content

Commit

Permalink
fix(server/events): fix license sometimes being used instead of license2
Browse files Browse the repository at this point in the history
  • Loading branch information
D4isDAVID committed Dec 9, 2023
1 parent 9ea73cb commit 9dddda9
Showing 1 changed file with 1 addition and 9 deletions.
10 changes: 1 addition & 9 deletions server/events.lua
Original file line number Diff line number Diff line change
Expand Up @@ -59,8 +59,7 @@ end)
---@param deferrals Deferrals
local function onPlayerConnecting(name, _, deferrals)
local src = source --[[@as string]]
local license
local identifiers = GetPlayerIdentifiers(src)
local license = GetPlayerIdentifierByType(src, 'license2') or GetPlayerIdentifierByType(src, 'license')
deferrals.defer()

-- Mandatory wait
Expand All @@ -72,13 +71,6 @@ local function onPlayerConnecting(name, _, deferrals)
end
end

for _, v in pairs(identifiers) do
if string.find(v, 'license2') or string.find(v, 'license') then
license = v
break
end
end

if not license then
deferrals.done(Lang:t('error.no_valid_license'))
elseif serverConfig.checkDuplicateLicense and IsLicenseInUse(license) then
Expand Down

0 comments on commit 9dddda9

Please sign in to comment.