mirror of
https://github.com/gmod-integration/lua.git
synced 2025-04-30 03:15:25 +00:00
13 lines
523 B
Lua
13 lines
523 B
Lua
function gmInte.wsSyncBan(data)
|
|
for _, ply in ipairs(player.GetAll()) do
|
|
if ply:SteamID64() == data.steam then ply:Kick(data.reason || "You have been banned from the server.") end
|
|
end
|
|
end
|
|
|
|
function gmInte.playerBan(data)
|
|
data.steamID64 = util.SteamIDTo64(data.networkid)
|
|
gmInte.http.post("/servers/:serverID/players/" .. util.SteamIDTo64(data.networkid) .. "/ban", data)
|
|
end
|
|
|
|
gameevent.Listen("server_addban")
|
|
hook.Add("server_addban", "gmInte:Player:Ban", function(data) gmInte.playerBan(data) end) |