Enable plugin system

Plugin system works and is stable.
This commit is contained in:
Kawe Mazidjatari 2023-07-20 22:00:00 +02:00
parent c1bdb54b6b
commit 319b534d62
2 changed files with 10 additions and 10 deletions

View File

@ -147,14 +147,14 @@ CClient* CServer::ConnectClient(CServer* pServer, user_creds_s* pChallenge)
CClient* pClient = v_CServer_ConnectClient(pServer, pChallenge);
//for (auto& callback : !g_pPluginSystem->GetConnectClientCallbacks())
//{
// if (!callback(pServer, pClient, pChallenge))
// {
// pClient->Disconnect(REP_MARK_BAD, "#Valve_Reject_Banned");
// return nullptr;
// }
//}
for (auto& callback : !g_pPluginSystem->GetConnectClientCallbacks())
{
if (!callback(pServer, pClient, pChallenge))
{
pClient->Disconnect(REP_MARK_BAD, "#Valve_Reject_Banned");
return nullptr;
}
}
if (pClient && sv_globalBanlist->GetBool())
{

View File

@ -107,8 +107,8 @@ bool CModAppSystemGroup::StaticCreate(CModAppSystemGroup* pModAppSystemGroup)
g_pFactory->AddFactory(INTERFACEVERSION_PLUGINSYSTEM, g_pPluginSystem);
g_pFactory->AddFactory(KEYVALUESSYSTEM_INTERFACE_VERSION, g_pKeyValuesSystem);
//InitPluginSystem(pModAppSystemGroup);
//CALL_PLUGIN_CALLBACKS(g_pPluginSystem->GetCreateCallbacks(), pModAppSystemGroup);
InitPluginSystem(pModAppSystemGroup);
CALL_PLUGIN_CALLBACKS(g_pPluginSystem->GetCreateCallbacks(), pModAppSystemGroup);
g_pModSystem->Init();