diff -r d05c7ee81134 -r 8d1896d809f1 extensions/updater/extension.cpp --- a/extensions/updater/extension.cpp Tue Feb 17 16:19:11 2009 -0500 +++ b/extensions/updater/extension.cpp Tue Feb 17 16:39:02 2009 -0500 @@ -38,6 +38,8 @@ #include #include +#define DEFAULT_UPDATE_URL "http://www.sourcemod.net/update/" + using namespace SourceHook; SmUpdater g_Updater; /**< Global singleton for extension's main interface */ @@ -46,6 +48,7 @@ IWebternet *webternet; static List update_errors; static IThreadHandle *update_thread; +static String update_url; bool SmUpdater::SDK_OnLoad(char *error, size_t maxlength, bool late) { @@ -64,6 +67,13 @@ return false; } + const char *url = smutils->GetCoreConfigValue("AutoUpdateURL"); + if (url == NULL) + { + url = DEFAULT_UPDATE_URL; + } + update_url.assign(url); + return true; } @@ -175,7 +185,7 @@ { UpdateReader ur; - ur.PerformUpdate(); + ur.PerformUpdate(update_url.c_str()); smutils->AddFrameAction(PumpUpdate, ur.DetachParts()); }