void SM_ExecuteAllConfigs() { if (g_bGotServerStart) { return; } engine->ServerCommand("exec sourcemod/sourcemod.cfg\n"); IPluginIterator *iter = g_PluginSys.GetPluginIterator(); while (iter->MorePlugins()) { CPlugin *plugin = (CPlugin *)(iter->GetPlugin()); unsigned int num = plugin->GetConfigCount(); bool can_create = true; for (unsigned int i=0; i<num; i++) { can_create = SM_ExecuteConfig(plugin, plugin->GetConfig(i), can_create); } iter->NextPlugin(); } iter->Release(); g_bGotServerStart = true; CheckAndFinalizeConfigs(); }
static cell_t GetPluginIterator(IPluginContext *pContext, const cell_t *params) { IPluginIterator *iter = scripts->GetPluginIterator(); Handle_t hndl = handlesys->CreateHandle(g_PlIter, iter, pContext->GetIdentity(), g_pCoreIdent, NULL); if (hndl == BAD_HANDLE) { iter->Release(); } return hndl; }
void SM_ConfigsExecuted_Plugin(unsigned int serial) { IPluginIterator *iter = g_PluginSys.GetPluginIterator(); while (iter->MorePlugins()) { CPlugin *plugin = (CPlugin *)(iter->GetPlugin()); if (plugin->GetSerial() == serial) { SM_DoSingleExecFwds(plugin->GetBaseContext()); break; } iter->NextPlugin(); } iter->Release(); }
void OnHandleDestroy(HandleType_t type, void *object) { IPluginIterator *iter = (IPluginIterator *)object; iter->Release(); }