1
0

Plugin messages are received and handed to plugins.

Note that MCS doesn't currently handle any channel registrations, this will come later on.
This commit is contained in:
madmaxoft
2014-01-07 17:47:05 +01:00
parent a87daa969e
commit e353f29d4a
9 changed files with 80 additions and 25 deletions

View File

@@ -1030,6 +1030,27 @@ bool cPluginManager::CallHookPlayerUsingItem(cPlayer & a_Player, int a_BlockX, i
bool cPluginManager::CallHookPluginMessage(cClientHandle & a_Client, const AString & a_Channel, const AString & a_Message)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_PLUGIN_MESSAGE);
if (Plugins == m_Hooks.end())
{
return false;
}
for (PluginList::iterator itr = Plugins->second.begin(); itr != Plugins->second.end(); ++itr)
{
if ((*itr)->OnPluginMessage(a_Client, a_Channel, a_Message))
{
return true;
}
}
return false;
}
bool cPluginManager::CallHookPluginsLoaded(void)
{
HookMap::iterator Plugins = m_Hooks.find(HOOK_PLUGINS_LOADED);