fix: kick detection

This commit is contained in:
Linventif 2024-03-13 20:39:15 +01:00
parent 6699c9f4ae
commit ffe83a66e4
No known key found for this signature in database
GPG Key ID: FAC0CA60F9AEEC24

View File

@ -15,10 +15,6 @@ end
// //
function gmInte.playerKick(data) function gmInte.playerKick(data)
if (string.StartWith(data.reason, "Kicked by ") || data.reason == "No reason provided.") then
return
end
gmInte.http.post("/players/" .. util.SteamIDTo64(data.networkid) .. "/kick", data) gmInte.http.post("/players/" .. util.SteamIDTo64(data.networkid) .. "/kick", data)
end end
@ -28,5 +24,7 @@ end
gameevent.Listen("player_disconnect") gameevent.Listen("player_disconnect")
hook.Add("player_disconnect", "gmInte:SyncKick:Disconnect", function(data) hook.Add("player_disconnect", "gmInte:SyncKick:Disconnect", function(data)
gmInte.playerKick(data) if (string.StartWith(data.reason, "Kicked by ") || data.reason == "No reason provided.") then
end) gmInte.playerKick(data)
end
end)