Skip to content

Commit

Permalink
hotfix
Browse files Browse the repository at this point in the history
  • Loading branch information
Blumlaut authored Dec 13, 2019
1 parent c3c6b40 commit 95e490b
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions admin_server.lua
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,7 @@ Citizen.CreateThread(function()
AddEventHandler('EasyAdmin:banPlayer', function(playerId,reason,expires,username)
if playerId ~= nil then
if DoesPlayerHavePermission(source,"easyadmin.ban") and CachedPlayers[playerId] and not DoesPlayerHavePermission(playerId,"easyadmin.immune") then
local bannedIdentifiers = CachedPlayers[playerId].identifiers
local bannedIdentifiers = CachedPlayers[playerId].identifiers or GetPlayerIdentifiers(playerId)
if expires and expires < os.time() then
expires = os.time()+expires
elseif not expires then
Expand All @@ -203,7 +203,7 @@ Citizen.CreateThread(function()
AddEventHandler('EasyAdmin:offlinebanPlayer', function(playerId,reason,expires)
if playerId ~= nil then
if DoesPlayerHavePermission(source,"easyadmin.ban") and not DoesPlayerHavePermission(playerId,"easyadmin.immune") then
local bannedIdentifiers = CachedPlayers[playerId].identifiers
local bannedIdentifiers = CachedPlayers[playerId].identifiers or GetPlayerIdentifiers(playerId)
if expires and expires < os.time() then
expires = os.time()+expires
elseif not expires then
Expand All @@ -223,7 +223,7 @@ Citizen.CreateThread(function()
if getName(source) ~= "Console" then return end
local bannedIdentifiers = GetPlayerIdentifiers(playerId)
reason = reason.. string.format(GetLocalisedText("bancheatingadd"), getName(playerId), getName(source) )
local ban = {banid = GetFreshBanId(), banididentifiers = bannedIdentifiers, banner = "Anticheat", reason = reason, expire = expires or 10444633200 }
local ban = {banid = GetFreshBanId(), identifiers = bannedIdentifiers, banner = "Anticheat", reason = reason, expire = expires or 10444633200 }

updateBlacklist( ban )
PrintDebugMessage("Console banned player "..getName(playerId,true).." for "..reason)
Expand Down

0 comments on commit 95e490b

Please sign in to comment.