added a double-run barrier to the new config code

--HG--
branch : sourcemod-1.0.x
extra : convert_revision : svn%3A39bc706e-5318-0410-9160-8a85361fbb7c/branches/sourcemod-1.0.x%402262
This commit is contained in:
David Anderson 2008-06-20 05:23:35 +00:00
parent c337bc512c
commit 22ec5c2e71

View File

@ -75,7 +75,9 @@ void Hook_ExecDispatch()
#endif
const char *arg = cmd.Arg(1);
if (arg != NULL && strcmp(arg, g_ServerCfgFile->GetString()) == 0)
if (!g_bServerExecd
&& arg != NULL
&& strcmp(arg, g_ServerCfgFile->GetString()) == 0)
{
g_bServerExecd = true;
CheckAndFinalizeConfigs();
@ -84,7 +86,8 @@ void Hook_ExecDispatch()
void CheckAndFinalizeConfigs()
{
if ((g_bServerExecd || g_ServerCfgFile == NULL) && g_bGotServerStart)
if ((g_bServerExecd || g_ServerCfgFile == NULL)
&& g_bGotServerStart)
{
/* Order is important here. We need to buffer things before we send the command out. */
g_pOnAutoConfigsBuffered->Execute(NULL);