diff --git a/addon.txt b/addon.txt index f3f44cf..9b81584 100644 --- a/addon.txt +++ b/addon.txt @@ -1,7 +1,7 @@ "AddonInfo" { "name" "TebexGmod" - "version" "0.1" + "version" "0.2" "up_date" "06/07/2018" "author_name" "Tebex" "author_email" "liam@tebex.co.uk" diff --git a/lua/tebex/commands/forcecheck.lua b/lua/tebex/commands/forcecheck.lua index d82443e..465cff1 100644 --- a/lua/tebex/commands/forcecheck.lua +++ b/lua/tebex/commands/forcecheck.lua @@ -3,7 +3,7 @@ Msg( "// Command tebex:forcecheck //\n" ) 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/tebex/commands/info.lua b/lua/tebex/commands/info.lua index 7ca74f6..410a7d5 100644 --- a/lua/tebex/commands/info.lua +++ b/lua/tebex/commands/info.lua @@ -2,7 +2,7 @@ Msg( "// Command tebex:info //\n" ) 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/tebex/commands/secret.lua b/lua/tebex/commands/secret.lua index 33b2f4d..6ca5099 100644 --- a/lua/tebex/commands/secret.lua +++ b/lua/tebex/commands/secret.lua @@ -7,7 +7,7 @@ Tebex.commands["secret"] = function(ply, args) end config:set("secret", args[3]) - 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/tebex/init.lua b/lua/tebex/init.lua index 6bee196..e904dea 100644 --- a/lua/tebex/init.lua +++ b/lua/tebex/init.lua @@ -22,7 +22,7 @@ if not Tebex then file.CreateDir( "tebex" ) Msg( "\n///////////////////////////////\n" ) - Msg( "// TebexGmod v 0.1 //\n" ) + Msg( "// TebexGmod v 0.2 //\n" ) Msg( "// https://www.tebex.io/ //\n" ) Msg( "///////////////////////////////\n" ) Msg( "// Loading... //\n" ) diff --git a/lua/tebex/models/commandrunner.lua b/lua/tebex/models/commandrunner.lua index d834ed0..185f0f8 100644 --- a/lua/tebex/models/commandrunner.lua +++ b/lua/tebex/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 @@ -89,7 +89,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/tebex/models/config.lua b/lua/tebex/models/config.lua index c2f78af..892295e 100644 --- a/lua/tebex/models/config.lua +++ b/lua/tebex/models/config.lua @@ -8,8 +8,7 @@ function TebexConfig:init() cfg = { buyEnabled = false, secret = "", - buyCommand = "!donate", - baseUrl = "https://plugin.buycraft.net" + buyCommand = "!donate" } }