1
0

Fixed OnPluginMessage hook not exiting early.

OnPluginMessage hook would call all plugins even after one returned true.
Fixes CID 43512
This commit is contained in:
Tycho 2014-04-27 12:37:08 -07:00
parent 5c46f9dd39
commit ee354a405b

View File

@ -1042,7 +1042,7 @@ bool cPluginLua::OnPluginMessage(cClientHandle & a_Client, const AString & a_Cha
cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PLUGIN_MESSAGE]; cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PLUGIN_MESSAGE];
for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr) for (cLuaRefs::iterator itr = Refs.begin(), end = Refs.end(); itr != end; ++itr)
{ {
m_LuaState.Call((int)(**itr), &a_Client, a_Channel, a_Message); m_LuaState.Call((int)(**itr), &a_Client, a_Channel, a_Message, cLuaState::Return, res);
if (res) if (res)
{ {
return true; return true;