Prevent recursion in sm_ServerCommandEx (fixes #967) (#2133)

* Prevent recursion in sm_ServerCommandEx (fixes #967)

* Update core/smn_console.cpp to fix style

Co-authored-by: Erin <[email protected]>

---------

Co-authored-by: Odin Landers <[email protected]>
Co-authored-by: Erin <[email protected]>
This commit is contained in:
ojlanders
2024-04-18 11:42:37 +00:00
committed by GitHub
co-authored by Erin Odin Landers
parent 5c507cc35c
commit 6cac489fce
+4 -1
View File
@@ -979,11 +979,14 @@ static cell_t sm_ServerCommandEx(IPluginContext *pContext, const cell_t *params)
}
engine->ServerExecute();
if (!g_ShouldCatchSpew) {
g_ShouldCatchSpew = true;
engine->ServerCommand("sm_conhook_start\n");
engine->ServerCommand(buffer);
engine->ServerCommand("sm_conhook_stop\n");
} else {
engine->ServerCommand(buffer);
}
engine->ServerExecute();