From 22ec5c2e71503214444f736e5cfba5669df0c262 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Fri, 20 Jun 2008 05:23:35 +0000 Subject: [PATCH] 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 --- core/CoreConfig.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/core/CoreConfig.cpp b/core/CoreConfig.cpp index 58e8293d..6693f731 100644 --- a/core/CoreConfig.cpp +++ b/core/CoreConfig.cpp @@ -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);