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 addon.txt
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
"AddonInfo"
{
"name" "TebexGmod"
"version" "0.1"
"version" "0.2"
"up_date" "06/07/2018"
"author_name" "Tebex"
"author_email" "[email protected]"
Expand Down
2 changes: 1 addition & 1 deletion lua/tebex/commands/forcecheck.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion lua/tebex/commands/info.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
Expand Down
2 changes: 1 addition & 1 deletion lua/tebex/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[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"]
Expand Down
2 changes: 1 addition & 1 deletion lua/tebex/init.lua
Original file line number Diff line number Diff line change
Expand Up @@ -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" )
Expand Down
6 changes: 3 additions & 3 deletions lua/tebex/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 @@ -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"])
Expand Down
3 changes: 1 addition & 2 deletions lua/tebex/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.buycraft.net"
buyCommand = "!donate"
}
}

Expand Down