This commit is contained in:
lewez 2018-04-28 18:27:21 +00:00
parent 7bf9cd6801
commit 424bb9d3a0

View File

@ -80,12 +80,17 @@ hook.Add( "CheckPassword", "ULibBanCheck", checkBan, HOOK_LOW )
Revisions:
v2.10 - Added support for custom ban list
v2.63 - GitHub issue #40 (Make sure one cannot ban oneself as a listen server host or in single player)
]]
function ULib.ban( ply, time, reason, admin )
if not time or type( time ) ~= "number" then
time = 0
end
if ply:IsListenServerHost() then
return
end
ULib.addBan( ply:SteamID(), time, reason, ply:Name(), admin )
end