Put isstring check earlier in admin check (#88)

This commit is contained in:
Redox 2022-09-15 01:45:25 +02:00 committed by GitHub
parent 0b155920bb
commit 2ec73c3e58
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -150,12 +150,12 @@ function ULib.addBan( steamid, time, reason, name, admin )
local admin_name
if admin then
if not IsValid(admin) then
if isstring(admin) then
admin_name = admin
elseif not IsValid(admin) then
admin_name = "(Console)"
elseif admin:IsPlayer() then
admin_name = string.format("%s(%s)", admin:Name(), admin:SteamID())
elseif isstring(admin) then
admin_name = admin
end
end