We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f8287c5 commit 253d854Copy full SHA for 253d854
scripting/methods/methods_plugins.cpp
@@ -508,6 +508,11 @@ CPlugin * pPlugin = GetPlugin (PluginID);
508
509
pPlugin->m_bEnabled = Enabled != 0;
510
511
+ CPlugin * pSavedPlugin = m_CurrentPlugin;
512
+
513
+ // otherwise plugin won't know who itself is
514
+ m_CurrentPlugin = pPlugin;
515
516
if (pPlugin->m_bEnabled)
517
{
518
CScriptCallInfo callinfo (ON_PLUGIN_ENABLE, pPlugin->m_PluginCallbacks [ON_PLUGIN_ENABLE]);
@@ -519,6 +524,7 @@ CPlugin * pPlugin = GetPlugin (PluginID);
519
524
pPlugin->ExecutePluginScript (callinfo);
520
525
}
521
526
527
+ m_CurrentPlugin = pSavedPlugin;
522
528
523
529
return eOK;
530
} // end of CMUSHclientDoc::EnablePlugin
0 commit comments