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