diff options
Diffstat (limited to 'src/modules/plugins')
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 6 | ||||
-rw-r--r-- | src/modules/plugins/pluginopts.cpp | 2 |
2 files changed, 6 insertions, 2 deletions
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 5e3d5baa9f..667aabccfc 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -198,6 +198,7 @@ MUUID miid_chat = MIID_CHAT; MUUID miid_srmm = MIID_SRMM;
MUUID miid_clist = MIID_CLIST;
MUUID miid_database = MIID_DATABASE;
+MUUID miid_protocol = MIID_PROTOCOL;
MUUID miid_servicemode = MIID_SERVICEMODE;
static bool validInterfaceList(MUUID *piface)
@@ -337,7 +338,10 @@ void Plugin_Uninit(pluginEntry* p) int Plugin_UnloadDyn(pluginEntry* p)
{
if (p->bpi.hInst) {
- if (CallPluginEventHook(p->bpi.hInst, hOkToExitEvent, 0, 0) != 0)
+ if ( hasMuuid(p->bpi.Interfaces, miid_protocol))
+ KillProtoAccounts(p->bpi.pluginInfo->shortName);
+
+ if ( CallPluginEventHook(p->bpi.hInst, hOkToExitEvent, 0, 0) != 0)
return FALSE;
NotifyEventHooks(hevUnloadModule, (WPARAM)p->bpi.InfoEx, (LPARAM)p->bpi.hInst);
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp index 61063de605..7f1483a5b1 100644 --- a/src/modules/plugins/pluginopts.cpp +++ b/src/modules/plugins/pluginopts.cpp @@ -221,7 +221,7 @@ static LRESULT CALLBACK PluginListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LP }
}
else if (lvi.iImage == 2) {
- if (UnloadPluginDynamically(dat)) {
+ if ( UnloadPluginDynamically(dat)) {
lvi.iImage = 3;
ListView_SetItem(hwnd, &lvi);
} } } } }
|