diff --git a/config.json b/config.json index b2c2790..7606f1a 100644 --- a/config.json +++ b/config.json @@ -1 +1 @@ -{"cfg":{"buyCommand":"!donate","secret":"","buyEnabled":true,"baseUrl":"https://plugin.tebex.io"}} \ No newline at end of file +{"cfg":{"buyCommand":"!donate","secret":"","buyEnabled":true}} \ No newline at end of file diff --git a/lua/commands/forcecheck.lua b/lua/commands/forcecheck.lua index 8c17ae7..0afc90d 100644 --- a/lua/commands/forcecheck.lua +++ b/lua/commands/forcecheck.lua @@ -3,7 +3,7 @@ print( "// Command tebex forcecheck //" ) Tebex.commands["forcecheck"] = function(ply, args) Tebex.warn("Checking for commands to be executed..."); - apiclient = TebexApiClient:init(config:get("baseUrl"), config:get("secret")) + apiclient = TebexApiClient:init("https://plugin.tebex.io", config:get("secret")) apiclient:get("/queue", function(response) if (response["meta"]["next_check"] > 0) then diff --git a/lua/commands/info.lua b/lua/commands/info.lua index 41cb140..5dc206e 100644 --- a/lua/commands/info.lua +++ b/lua/commands/info.lua @@ -2,7 +2,7 @@ print( "// Command tebex info //" ) Tebex.commands["info"] = function(ply, args) - apiclient = TebexApiClient:init(config:get("baseUrl"), config:get("secret")) + apiclient = TebexApiClient:init("https://plugin.tebex.io", config:get("secret")) apiclient:get("/information", function(response) TebexInformation.id = response["account"]["id"] TebexInformation.domain = response["account"]["domain"] diff --git a/lua/commands/secret.lua b/lua/commands/secret.lua index 9d77829..6178584 100644 --- a/lua/commands/secret.lua +++ b/lua/commands/secret.lua @@ -7,7 +7,7 @@ Tebex.commands["secret"] = function(ply, args) end config:set("secret", args[2]) - apiclient = TebexApiClient:init(config:get("baseUrl"), config:get("secret")) + apiclient = TebexApiClient:init("https://plugin.tebex.io", config:get("secret")) apiclient:get("/information", function(response) TebexInformation.id = response["account"]["id"] TebexInformation.domain = response["account"]["domain"] diff --git a/lua/models/commandrunner.lua b/lua/models/commandrunner.lua index 4dae82b..13a3820 100644 --- a/lua/models/commandrunner.lua +++ b/lua/models/commandrunner.lua @@ -4,7 +4,7 @@ TebexCommandRunner = {} TebexCommandRunner.deleteAfter = 3 TebexCommandRunner.doOfflineCommands = function() - apiclient = TebexApiClient:init(config:get("baseUrl"), config:get("secret")) + apiclient = TebexApiClient:init("https://plugin.tebex.io", config:get("secret")) apiclient:get("/queue/offline-commands", function(response) commands = response.commands exCount = 0 @@ -39,7 +39,7 @@ end TebexCommandRunner.doOnlineCommands = function(playerPluginId, playerName, playerId) Tebex.warn("Running online commands for " .. playerName .. " (" .. playerId .. ")"); - apiclient = TebexApiClient:init(config:get("baseUrl"), config:get("secret")) + apiclient = TebexApiClient:init("https://plugin.tebex.io", config:get("secret")) apiclient:get("/queue/online-commands/" .. playerPluginId, function(response) commands = response.commands exCount = 0 @@ -90,7 +90,7 @@ TebexCommandRunner.deleteCommands = function(commandIds) amp = "&" end - apiclient = TebexApiClient:init(config:get("baseUrl"), config:get("secret")) + apiclient = TebexApiClient:init("https://plugin.tebex.io", config:get("secret")) apiclient:delete(endpoint, function(response) end, function(body) print (body["error_code"] .. " " .. body["error_message"]) diff --git a/lua/models/config.lua b/lua/models/config.lua index 0402510..ba7d960 100644 --- a/lua/models/config.lua +++ b/lua/models/config.lua @@ -8,8 +8,7 @@ function TebexConfig:init() cfg = { buyEnabled = false, secret = "", - buyCommand = "!donate", - baseUrl = "https://plugin.tebex.io" + buyCommand = "!donate" } }