mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-16 05:07:34 +00:00
Add function to execute Rcon commands from Discord
This commit is contained in:
parent
f3aae78525
commit
4c6977bede
|
@ -84,6 +84,11 @@ function gmInte.wsPlayerSay(data)
|
||||||
gmInte.SendNet(1, data, nil)
|
gmInte.SendNet(1, data, nil)
|
||||||
end
|
end
|
||||||
|
|
||||||
|
function gmInte.wsRcon(data)
|
||||||
|
gmInte.log("Rcon Command from Discord '" .. data.command .. "' by " .. data.steamID)
|
||||||
|
game.ConsoleCommand(data.command .. "\n")
|
||||||
|
end
|
||||||
|
|
||||||
function gmInte.playerBan(data)
|
function gmInte.playerBan(data)
|
||||||
data.steam = util.SteamIDTo64(data.networkid)
|
data.steam = util.SteamIDTo64(data.networkid)
|
||||||
gmInte.post("/server/user/ban", data)
|
gmInte.post("/server/user/ban", data)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user