mirror of
https://github.com/gmod-integration/lua.git
synced 2025-08-03 11:23:30 +00:00
refact: remove cmd refresh
This commit is contained in:
parent
f7dbb0250d
commit
6ceeaf1535
|
@ -3,7 +3,6 @@ local conFuncs = {
|
||||||
["set-setting"] = function(args) gmInte.saveSetting(args[2], args[3]) end,
|
["set-setting"] = function(args) gmInte.saveSetting(args[2], args[3]) end,
|
||||||
["show-settings"] = function() PrintTable(gmInte.config) end,
|
["show-settings"] = function() PrintTable(gmInte.config) end,
|
||||||
["try"] = function() gmInte.tryConfig() end,
|
["try"] = function() gmInte.tryConfig() end,
|
||||||
["refresh"] = function() gmInte.refreshSettings() end,
|
|
||||||
["get-server-id"] = function() print(gmInte.config.id || "none") end,
|
["get-server-id"] = function() print(gmInte.config.id || "none") end,
|
||||||
["export-warns"] = function() hook.Run("GmodIntegration:ExportWarns") end
|
["export-warns"] = function() hook.Run("GmodIntegration:ExportWarns") end
|
||||||
}
|
}
|
||||||
|
@ -18,7 +17,6 @@ local function cmdExecuted(ply, cmd, args)
|
||||||
print("set-setting <setting> <value>")
|
print("set-setting <setting> <value>")
|
||||||
print("show-settings")
|
print("show-settings")
|
||||||
print("try")
|
print("try")
|
||||||
print("refresh")
|
|
||||||
print("get-server-id")
|
print("get-server-id")
|
||||||
print("export-warns")
|
print("export-warns")
|
||||||
end
|
end
|
||||||
|
|
|
@ -42,12 +42,6 @@ function gmInte.testConnection(ply)
|
||||||
gmInte.http.get("/servers/:serverID", function(code, body) if ply then gmInte.SendNet("testApiConnection", body, ply) end end, function(code, body) if ply then gmInte.SendNet("testApiConnection", body, ply) end end)
|
gmInte.http.get("/servers/:serverID", function(code, body) if ply then gmInte.SendNet("testApiConnection", body, ply) end end, function(code, body) if ply then gmInte.SendNet("testApiConnection", body, ply) end end)
|
||||||
end
|
end
|
||||||
|
|
||||||
function gmInte.refreshSettings()
|
|
||||||
gmInte.config = util.JSONToTable(file.Read("gm_integration/config.json", "DATA"))
|
|
||||||
gmInte.log("Settings Refreshed")
|
|
||||||
gmInte.tryConfig()
|
|
||||||
end
|
|
||||||
|
|
||||||
function gmInte.superadminGetConfig(ply)
|
function gmInte.superadminGetConfig(ply)
|
||||||
if !ply:IsValid() || !ply:IsPlayer(ply) || !ply:gmIntIsAdmin() then return end
|
if !ply:IsValid() || !ply:IsPlayer(ply) || !ply:gmIntIsAdmin() then return end
|
||||||
gmInte.config.websocket = GWSockets && true || false
|
gmInte.config.websocket = GWSockets && true || false
|
||||||
|
|
Loading…
Reference in New Issue
Block a user