Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion config.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"cfg":{"buyCommand":"!donate","secret":"","buyEnabled":true,"baseUrl":"https://plugin.tebex.io"}}
{"cfg":{"buyCommand":"!donate","secret":"","buyEnabled":true}}
2 changes: 1 addition & 1 deletion lua/commands/forcecheck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lua/commands/info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion lua/commands/secret.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
6 changes: 3 additions & 3 deletions lua/models/commandrunner.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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"])
Expand Down
3 changes: 1 addition & 2 deletions lua/models/config.lua
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ function TebexConfig:init()
cfg = {
buyEnabled = false,
secret = "",
buyCommand = "!donate",
baseUrl = "https://plugin.tebex.io"
buyCommand = "!donate"
}
}

Expand Down