Ejemplo n.º 1
0
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();
}
Ejemplo n.º 2
0
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;
}
Ejemplo n.º 3
0
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();
}
Ejemplo n.º 4
0
	void OnHandleDestroy(HandleType_t type, void *object)
	{
		IPluginIterator *iter = (IPluginIterator *)object;
		iter->Release();
	}