1.1 --- a/sourcemm/sourcemm.cpp Tue Apr 24 20:30:17 2007 +0000
1.2 +++ b/sourcemm/sourcemm.cpp Tue Apr 24 22:07:00 2007 +0000
1.3 @@ -58,8 +58,8 @@
1.4 SourceHook::List<GameDllInfo *> gamedll_list;
1.5 SourceHook::CallClass<IServerGameDLL> *g_GameDllPatch;
1.6 int g_GameDllVersion = 0;
1.7 -const char VSPIFACE_001[] = "ISERVERPLUGINCALLBACKS001";
1.8 -const char VSPIFACE_002[] = "ISERVERPLUGINCALLBACKS002";
1.9 +int g_VspVersion = 0;
1.10 +const char VSPIFACE[] = "ISERVERPLUGINCALLBACKS";
1.11 const char GAMEINFO_PATH[] = "|gameinfo_path|";
1.12
1.13 void ClearGamedllList();
1.14 @@ -227,17 +227,18 @@
1.15 return NULL;
1.16 }
1.17
1.18 - /* We check these separately because we can't reply
1.19 - * unless our interface version really matches.
1.20 - */
1.21 - if ((strcmp(iface, VSPIFACE_002) == 0)
1.22 - || strcmp(iface, VSPIFACE_001) == 0)
1.23 + if (strncmp(iface, VSPIFACE, 22) == 0)
1.24 {
1.25 - if (ret)
1.26 + g_VspVersion = atoi(&(iface[22]));
1.27 +
1.28 + if (g_VspVersion <= MAX_VSP_VERSION)
1.29 {
1.30 - *ret = IFACE_OK;
1.31 + if (ret)
1.32 + {
1.33 + *ret = IFACE_OK;
1.34 + }
1.35 + return &g_VspListener;
1.36 }
1.37 - return &g_VspListener;
1.38 }
1.39
1.40 if (!gParsedGameInfo)