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:
parent
5c46f9dd39
commit
ee354a405b
@ -1042,7 +1042,7 @@ bool cPluginLua::OnPluginMessage(cClientHandle & a_Client, const AString & a_Cha
|
||||
cLuaRefs & Refs = m_HookMap[cPluginManager::HOOK_PLUGIN_MESSAGE];
|
||||
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)
|
||||
{
|
||||
return true;
|
||||
|
Loading…
Reference in New Issue
Block a user