diff -r 7b433fafa597 -r d601b515c839 sourcemm/sourcemm.cpp --- a/sourcemm/sourcemm.cpp Tue Apr 24 20:30:17 2007 +0000 +++ b/sourcemm/sourcemm.cpp Tue Apr 24 22:07:00 2007 +0000 @@ -58,8 +58,8 @@ SourceHook::List gamedll_list; SourceHook::CallClass *g_GameDllPatch; int g_GameDllVersion = 0; -const char VSPIFACE_001[] = "ISERVERPLUGINCALLBACKS001"; -const char VSPIFACE_002[] = "ISERVERPLUGINCALLBACKS002"; +int g_VspVersion = 0; +const char VSPIFACE[] = "ISERVERPLUGINCALLBACKS"; const char GAMEINFO_PATH[] = "|gameinfo_path|"; void ClearGamedllList(); @@ -227,17 +227,18 @@ return NULL; } - /* We check these separately because we can't reply - * unless our interface version really matches. - */ - if ((strcmp(iface, VSPIFACE_002) == 0) - || strcmp(iface, VSPIFACE_001) == 0) + if (strncmp(iface, VSPIFACE, 22) == 0) { - if (ret) + g_VspVersion = atoi(&(iface[22])); + + if (g_VspVersion <= MAX_VSP_VERSION) { - *ret = IFACE_OK; + if (ret) + { + *ret = IFACE_OK; + } + return &g_VspListener; } - return &g_VspListener; } if (!gParsedGameInfo)