Skip to content

Commit 081f336

Browse files
committed
Stopped BroadcastPlugin from broadcasting to itself
1 parent 5f41472 commit 081f336

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

scripting/methods/methods_plugins.cpp

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -564,6 +564,10 @@ long CMUSHclientDoc::BroadcastPlugin(long Message, LPCTSTR Text)
564564
if (!(pPlugin->m_bEnabled)) // ignore disabled plugins
565565
continue;
566566

567+
// don't broadcast to ourselves - could cause indefinite loop
568+
if (pPlugin == pSavedPlugin)
569+
continue;
570+
567571
CScriptCallInfo callinfo (ON_PLUGIN_BROADCAST, pPlugin->m_PluginCallbacks [ON_PLUGIN_BROADCAST]);
568572
m_CurrentPlugin = pPlugin;
569573

0 commit comments

Comments
 (0)