mirror of
https://github.com/gmod-integration/lua.git
synced 2025-03-15 21:17:34 +00:00
remove import cmd
This commit is contained in:
parent
c80e5fcaca
commit
275e91c812
|
@ -6,9 +6,6 @@ local conFuncs = {
|
|||
["version"] = function()
|
||||
gmInte.log("Version: " .. gmInte.version)
|
||||
end,
|
||||
["export"] = function()
|
||||
gmInte.serverExport()
|
||||
end,
|
||||
["setting"] = function(args)
|
||||
gmInte.saveSetting(args[2], args[3])
|
||||
end,
|
||||
|
|
|
@ -24,31 +24,6 @@ function gmInte.plyValid(ply)
|
|||
return ply:IsValid() && ply:IsPlayer() && !ply:IsBot()
|
||||
end
|
||||
|
||||
function gmInte.serverExport()
|
||||
gmInte.log("Generating Token", true)
|
||||
gmInte.post(
|
||||
// Endpoint
|
||||
"",
|
||||
// Parameters
|
||||
{ request = "generate" },
|
||||
// Data
|
||||
{
|
||||
name = GetHostName(),
|
||||
ip = game.GetIPAddress(),
|
||||
port = GetConVar("hostport"):GetInt(),
|
||||
},
|
||||
// onSuccess
|
||||
function( body, length, headers, code )
|
||||
if gmInte.isCodeValid(code) then
|
||||
gmInte.log("Token Generated Successfully")
|
||||
gmInte.log("Use it with the command: /server import " .. body)
|
||||
else
|
||||
gmInte.httpError(body)
|
||||
end
|
||||
end
|
||||
)
|
||||
end
|
||||
|
||||
function gmInte.saveSetting(setting, value)
|
||||
// save this in data/gmod_integration/setting.json but first check if variable is valid
|
||||
if !gmInte.config[setting] then
|
||||
|
|
Loading…
Reference in New Issue
Block a user