Skip to content

Commit 1afe061

Browse files
committed
dont use awarn if not available
1 parent db9b054 commit 1afe061

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

lua/autorun/server/cfc_auto_warn_on_commands.lua

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ function AW.warn( commandName, caller, target, reason )
9595
end
9696

9797

98-
9998
local actorUID
10099
if IsValid( caller ) then
101100
actorUID = caller:SteamID64()
102101
else
103102
actorUID = "console"
104103
end
104+
105105
if GMAudit then
106106
GMAudit.Public.CreateRecord( {
107107
type = commandName,
@@ -114,7 +114,7 @@ function AW.warn( commandName, caller, target, reason )
114114
print( "Error creating GMAudit record: " .. err )
115115
end
116116
end )
117-
else
117+
elseif awarn_warnplayerid then
118118
awarn_warnplayerid( caller, target, reason )
119119
end
120120
end

0 commit comments

Comments
 (0)