mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-16 05:57:35 +00:00
add player ban post
This commit is contained in:
parent
8e54250148
commit
182018797e
|
@ -18,12 +18,16 @@ end)
|
||||||
//
|
//
|
||||||
|
|
||||||
gameevent.Listen("player_connect")
|
gameevent.Listen("player_connect")
|
||||||
|
|
||||||
hook.Add("player_connect", "gmInte:Player:Connect", function(data)
|
hook.Add("player_connect", "gmInte:Player:Connect", function(data)
|
||||||
gmInte.playerConnect(data)
|
gmInte.playerConnect(data)
|
||||||
gmInte.playerFilter(data)
|
gmInte.playerFilter(data)
|
||||||
end)
|
end)
|
||||||
|
|
||||||
|
gameevent.Listen("server_addban")
|
||||||
|
hook.Add("server_addban", "gmInte:Player:Ban", function(data)
|
||||||
|
gmInte.playerBan(data)
|
||||||
|
end)
|
||||||
|
|
||||||
hook.Add("PlayerDisconnected", "gmInte:Player:Disconnect", function(ply)
|
hook.Add("PlayerDisconnected", "gmInte:Player:Disconnect", function(ply)
|
||||||
gmInte.playerDisconnected(ply)
|
gmInte.playerDisconnected(ply)
|
||||||
end)
|
end)
|
||||||
|
|
|
@ -70,6 +70,11 @@ function gmInte.playerSay(ply, text, team)
|
||||||
)
|
)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function gmInte.playerBan(data)
|
||||||
|
data.steam = util.SteamIDTo64(data.networkid)
|
||||||
|
gmInte.post("/server/user/ban", data)
|
||||||
|
end
|
||||||
|
|
||||||
function gmInte.userFinishConnect(ply)
|
function gmInte.userFinishConnect(ply)
|
||||||
if (!gmInte.plyValid(ply)) then return end
|
if (!gmInte.plyValid(ply)) then return end
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user