summaryrefslogtreecommitdiff
path: root/src/modules/plugins
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-09-25 16:44:33 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-09-25 16:44:33 +0000
commit27035a4a46167dc714b770c77561f14e8d0b945d (patch)
treeb67bbf56d590118aeae36bd187966666983f8631 /src/modules/plugins
parenta30011d4b7881cc9e55077ddd6b9686ce54c3343 (diff)
draft version of the dynamic accounts' removal
git-svn-id: http://svn.miranda-ng.org/main/trunk@1655 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'src/modules/plugins')
-rw-r--r--src/modules/plugins/newplugins.cpp6
-rw-r--r--src/modules/plugins/pluginopts.cpp2
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);
} } } } }