diff options
author | George Hazan <george.hazan@gmail.com> | 2012-09-25 16:44:33 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2012-09-25 16:44:33 +0000 |
commit | 27035a4a46167dc714b770c77561f14e8d0b945d (patch) | |
tree | b67bbf56d590118aeae36bd187966666983f8631 /src/modules/plugins/newplugins.cpp | |
parent | a30011d4b7881cc9e55077ddd6b9686ce54c3343 (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/newplugins.cpp')
-rw-r--r-- | src/modules/plugins/newplugins.cpp | 6 |
1 files changed, 5 insertions, 1 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);
|