mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 22:07:34 +00:00
fix: kick detection
This commit is contained in:
parent
6699c9f4ae
commit
ffe83a66e4
|
@ -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)
|
Loading…
Reference in New Issue
Block a user