Skip to content

Commit

Permalink
Updater improvements
Browse files Browse the repository at this point in the history
  • Loading branch information
DoctorMcKay committed Nov 5, 2012
1 parent 3941b98 commit 88b63b9
Show file tree
Hide file tree
Showing 42 changed files with 173 additions and 106 deletions.
5 changes: 2 additions & 3 deletions anyteleporter.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,11 @@
{
"Version"
{
"Latest" "1.2.0"
"Latest" "1.3.0"
}

"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Plugin now uses SourceMod 1.5's TF2_OnPlayerTeleport forward"
"Notes" " - TeleportCheck extension no longer required"
"Notes" " - Actually added Updater support"
}

"Files"
Expand Down
8 changes: 2 additions & 6 deletions automatic_steam_update.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,11 @@
{
"Version"
{
"Latest" "1.9.0"
"Latest" "1.9.1"
}

"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Added auto_steam_update_hud_text_x_pos cvar"
"Notes" " - Added auto_steam_update_hud_text_y_pos cvar"
"Notes" " - Added auto_steam_update_hud_text_red cvar"
"Notes" " - Added auto_steam_update_hud_text_green cvar"
"Notes" " - Added auto_steam_update_hud_text_blue cvar"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
5 changes: 2 additions & 3 deletions backpack-tf.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
{
"Version"
{
"Latest" "1.5.0"
"Latest" "1.5.1"
}
"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Added new Halloween Unusual effects"
"Notes" " - Improved Updater integration"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
5 changes: 2 additions & 3 deletions chatcolors.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
{
"Version"
{
"Latest" "1.8.0"
"Latest" "1.8.1"
}
"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Changed update URL to SVN repository"
"Notes" " - Plugin now properly fails to load when Simple Chat Processor is not installed, and gives the URL where you can download it"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
4 changes: 2 additions & 2 deletions chatcolorstogglemodule.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
{
"Version"
{
"Latest" "1.4.2"
"Latest" "1.4.3"
}
"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Changed update URL to SVN repository"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
4 changes: 2 additions & 2 deletions game_desc_override.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"Version"
{
"Latest" "1.1.2"
"Latest" "1.1.3"
}

"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Changed update URL to SVN repository"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
4 changes: 2 additions & 2 deletions humiliationglow.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
{
"Version"
{
"Latest" "1.1.1"
"Latest" "1.1.2"
}
"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Changed update URL to SVN repository"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
4 changes: 2 additions & 2 deletions itemserver.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,10 +4,10 @@
{
"Version"
{
"Latest" "1.1.1"
"Latest" "1.1.2"
}
"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Changed update URL to SVN repository"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
4 changes: 2 additions & 2 deletions mutecheck.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,11 @@
{
"Version"
{
"Latest" "1.9.1"
"Latest" "1.9.2"
}

"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Changed update URL to SVN repository"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
Binary file modified plugins/anyteleporter.smx
Binary file not shown.
Binary file modified plugins/auto_steam_update.smx
Binary file not shown.
Binary file modified plugins/backpack-tf.smx
Binary file not shown.
Binary file modified plugins/custom-chatcolors-toggle.smx
Binary file not shown.
Binary file modified plugins/custom-chatcolors.smx
Binary file not shown.
Binary file modified plugins/humiliationglow.smx
Binary file not shown.
Binary file modified plugins/itemserver.smx
Binary file not shown.
Binary file modified plugins/mutecheck.smx
Binary file not shown.
Binary file modified plugins/rainbowize.smx
Binary file not shown.
Binary file modified plugins/shutdowncountdown.smx
Binary file not shown.
Binary file modified plugins/st_gamedesc_override.smx
Binary file not shown.
Binary file modified plugins/teamscores.smx
Binary file not shown.
Binary file modified plugins/tidykick.smx
Binary file not shown.
Binary file modified plugins/votekick_switcher.smx
Binary file not shown.
5 changes: 2 additions & 3 deletions rainbowize.txt
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,10 @@
{
"Version"
{
"Latest" "1.5.0"
"Latest" "1.5.1"
}
"Notes" "Find a list of my plugins (and links to their threads) at www.doctormckay.com. Changes:"
"Notes" " - Updated update URL to SVN repository"
"Notes" " - Plugin now properly fails to load if Simple Chat Processor is not installed, and displays a link to download it"
"Notes" " - Updater improvements"
}

"Files"
Expand Down
33 changes: 31 additions & 2 deletions scripting/anyteleporter.sp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#undef REQUIRE_PLUGIN
#include <updater>

#define UPDATE_URL "http://public-plugins.doctormckay.com/latest/anyteleporter.txt"
#define PLUGIN_VERSION "1.2.0"
#define UPDATE_URL "http://hg.doctormckay.com/public-plugins/raw/default/anyteleporter.txt"
#define PLUGIN_VERSION "1.3.0"

public Plugin:myinfo =
{
Expand Down Expand Up @@ -54,4 +54,33 @@ public Action:TF2_OnPlayerTeleport(client, teleporter, &bool:result) {
result = true;
return Plugin_Changed;
}
}

/////////////////////////////////

public OnAllPluginsLoaded() {
new Handle:convar;
if(LibraryExists("updater")) {
Updater_AddPlugin(UPDATE_URL);
new String:newVersion[10];
Format(newVersion, sizeof(newVersion), "%sA", PLUGIN_VERSION);
convar = CreateConVar("anyteleporter_version", newVersion, "AnyTeleporter Version", FCVAR_DONTRECORD|FCVAR_NOTIFY|FCVAR_CHEAT);
} else {
convar = CreateConVar("anyteleporter_version", PLUGIN_VERSION, "AnyTeleporter Version", FCVAR_DONTRECORD|FCVAR_NOTIFY|FCVAR_CHEAT);
}
HookConVarChange(convar, Callback_VersionConVarChanged);
}

public Callback_VersionConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) {
ResetConVar(convar);
}

public OnLibraryAdded(const String:name[]) {
if(StrEqual(name, "updater")) {
Updater_AddPlugin(UPDATE_URL);
}
}

public Updater_OnPluginUpdated() {
ReloadPlugin();
}
16 changes: 9 additions & 7 deletions scripting/auto_steam_update.sp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#undef REQUIRE_PLUGIN
#tryinclude <updater>

#define UPDATE_URL "http://public-plugins.doctormckay.com/latest/automatic_steam_update.txt"
#define PLUGIN_VERSION "1.9.0"
#define UPDATE_URL "http://hg.doctormckay.com/public-plugins/raw/default/automatic_steam_update.txt"
#define PLUGIN_VERSION "1.9.1"

#define ALERT_SOUND "ui/system_message_alert.wav"

Expand Down Expand Up @@ -238,11 +238,7 @@ public OnAllPluginsLoaded() {
}

public Callback_VersionConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) {
decl String:defaultValue[32];
GetConVarDefault(convar, defaultValue, sizeof(defaultValue));
if(!StrEqual(newValue, defaultValue)) {
SetConVarString(convar, defaultValue);
}
ResetConVar(convar);
}

public Action:Updater_OnPluginDownloading() {
Expand All @@ -252,6 +248,12 @@ public Action:Updater_OnPluginDownloading() {
return Plugin_Continue;
}

public OnLibraryAdded(const String:name[]) {
if(StrEqual(name, "updater")) {
Updater_AddPlugin(UPDATE_URL);
}
}

public Updater_OnPluginUpdated() {
ReloadPlugin();
}
4 changes: 2 additions & 2 deletions scripting/backpack-tf.sp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#undef REQUIRE_PLUGIN
#include <updater>

#define UPDATE_URL "http://public-plugins.doctormckay.com/latest/backpack-tf.txt"
#define PLUGIN_VERSION "1.5.0"
#define UPDATE_URL "http://hg.doctormckay.com/public-plugins/raw/default/backpack-tf.txt"
#define PLUGIN_VERSION "1.5.1"
#define BACKPACK_TF_URL "http://backpack.tf/api/IGetPrices/v2/"
#define STEAM_URL "http://www.doctormckay.com/steamapi/itemnames.php" // please don't use this page for anything besides this plugin, I don't want my server to crash... code used to generate it is here: http://pastebin.com/8Ps7Xt ... don't make me limit requests to this page by IP... I will do it if necessary
#define ITEM_EARBUDS "143"
Expand Down
16 changes: 9 additions & 7 deletions scripting/custom-chatcolors-toggle.sp
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,8 @@
#undef REQUIRE_PLUGIN
#include <updater>

#define UPDATE_URL "http://public-plugins.doctormckay.com/latest/chatcolorstogglemodule.txt"
#define PLUGIN_VERSION "1.4.2"
#define UPDATE_URL "http://hg.doctormckay.com/public-plugins/raw/default/chatcolorstogglemodule.txt"
#define PLUGIN_VERSION "1.4.3"

public Plugin:myinfo = {
name = "[Source 2009] Custom Chat Colors Toggle Module",
Expand Down Expand Up @@ -176,11 +176,7 @@ public OnAllPluginsLoaded() {
}

public Callback_VersionConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) {
decl String:defaultValue[32];
GetConVarDefault(convar, defaultValue, sizeof(defaultValue));
if(!StrEqual(newValue, defaultValue)) {
SetConVarString(convar, defaultValue);
}
ResetConVar(convar);
}

public Action:Updater_OnPluginDownloading() {
Expand All @@ -190,6 +186,12 @@ public Action:Updater_OnPluginDownloading() {
return Plugin_Continue;
}

public OnLibraryAdded(const String:name[]) {
if(StrEqual(name, "updater")) {
Updater_AddPlugin(UPDATE_URL);
}
}

public Updater_OnPluginUpdated() {
ReloadPlugin();
}
16 changes: 9 additions & 7 deletions scripting/custom-chatcolors.sp
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
#undef REQUIRE_PLUGIN
#include <updater>

#define UPDATE_URL "http://public-plugins.doctormckay.com/latest/chatcolors.txt"
#define PLUGIN_VERSION "1.8.0"
#define UPDATE_URL "http://hg.doctormckay.com/public-plugins/raw/default/chatcolors.txt"
#define PLUGIN_VERSION "1.8.1"

public Plugin:myinfo = {
name = "[Source 2009] Custom Chat Colors",
Expand Down Expand Up @@ -397,11 +397,7 @@ public OnAllPluginsLoaded() {
}

public Callback_VersionConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) {
decl String:defaultValue[32];
GetConVarDefault(convar, defaultValue, sizeof(defaultValue));
if(!StrEqual(newValue, defaultValue)) {
SetConVarString(convar, defaultValue);
}
ResetConVar(convar);
}

public Action:Updater_OnPluginDownloading() {
Expand All @@ -411,6 +407,12 @@ public Action:Updater_OnPluginDownloading() {
return Plugin_Continue;
}

public OnLibraryAdded(const String:name[]) {
if(StrEqual(name, "updater")) {
Updater_AddPlugin(UPDATE_URL);
}
}

public Updater_OnPluginUpdated() {
ReloadPlugin();
}
16 changes: 9 additions & 7 deletions scripting/humiliationglow.sp
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
#undef REQUIRE_PLUGIN
#include <updater>

#define UPDATE_URL "http://public-plugins.doctormckay.com/latest/humiliationglow.txt"
#define PLUGIN_VERSION "1.1.1"
#define UPDATE_URL "http://hg.doctormckay.com/public-plugins/raw/default/humiliationglow.txt"
#define PLUGIN_VERSION "1.1.2"

public Plugin:myinfo = {
name = "[TF2] Humiliation Glow",
Expand Down Expand Up @@ -68,11 +68,7 @@ public OnAllPluginsLoaded() {
}

public Callback_VersionConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) {
decl String:defaultValue[32];
GetConVarDefault(convar, defaultValue, sizeof(defaultValue));
if(!StrEqual(newValue, defaultValue)) {
SetConVarString(convar, defaultValue);
}
ResetConVar(convar);
}

public Action:Updater_OnPluginDownloading() {
Expand All @@ -82,6 +78,12 @@ public Action:Updater_OnPluginDownloading() {
return Plugin_Continue;
}

public OnLibraryAdded(const String:name[]) {
if(StrEqual(name, "updater")) {
Updater_AddPlugin(UPDATE_URL);
}
}

public Updater_OnPluginUpdated() {
ReloadPlugin();
}
16 changes: 9 additions & 7 deletions scripting/itemserver.sp
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@
#undef REQUIRE_PLUGIN
#include <updater>

#define UPDATE_URL "http://public-plugins.doctormckay.com/latest/itemserver.txt"
#define PLUGIN_VERSION "1.1.1"
#define UPDATE_URL "http://hg.doctormckay.com/public-plugins/raw/default/itemserver.txt"
#define PLUGIN_VERSION "1.1.2"

public Plugin:myinfo = {
name = "[TF2] Local Item Server",
Expand Down Expand Up @@ -206,11 +206,7 @@ public OnAllPluginsLoaded() {
}

public Callback_VersionConVarChanged(Handle:convar, const String:oldValue[], const String:newValue[]) {
decl String:defaultValue[32];
GetConVarDefault(convar, defaultValue, sizeof(defaultValue));
if(!StrEqual(newValue, defaultValue)) {
SetConVarString(convar, defaultValue);
}
ResetConVar(convar);
}

public Action:Updater_OnPluginDownloading() {
Expand All @@ -220,6 +216,12 @@ public Action:Updater_OnPluginDownloading() {
return Plugin_Continue;
}

public OnLibraryAdded(const String:name[]) {
if(StrEqual(name, "updater")) {
Updater_AddPlugin(UPDATE_URL);
}
}

public Updater_OnPluginUpdated() {
ReloadPlugin();
}
Loading

0 comments on commit 88b63b9

Please sign in to comment.