From b783dd216780850e01c47a67c4773f367eee35cd Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sun, 23 Sep 2012 18:52:50 +0000 Subject: three disabled clists now load StdClist instead of Clist Modern git-svn-id: http://svn.miranda-ng.org/main/trunk@1636 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- src/modules/plugins/newplugins.cpp | 22 +++++++++------------- 1 file changed, 9 insertions(+), 13 deletions(-) (limited to 'src/modules/plugins') diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp index 5087afa0e1..5e3d5baa9f 100644 --- a/src/modules/plugins/newplugins.cpp +++ b/src/modules/plugins/newplugins.cpp @@ -603,26 +603,24 @@ static bool loadClistModule(TCHAR* exe, pluginEntry *p) return false; } -static pluginEntry* getCListModule(TCHAR *exe, TCHAR *slice, int useWhiteList) +static pluginEntry* getCListModule(TCHAR *exe, TCHAR *slice) { for (int i=0; i < clistPlugins.getCount(); i++) { pluginEntry *p = clistPlugins[i]; mir_sntprintf(slice, &exe[MAX_PATH] - slice, _T("\\Plugins\\%s"), p->pluginname); CharLower(p->pluginname); - if (useWhiteList && !isPluginOnWhiteList(p->pluginname)) + if ( !isPluginOnWhiteList(p->pluginname)) continue; if ( loadClistModule(exe, p)) return p; } - if ( !useWhiteList) { - MuuidReplacement& stdClist = pluginDefault[11]; - if ( LoadCorePlugin(stdClist)) { - mir_sntprintf(slice, &exe[MAX_PATH] - slice, _T("\\Core\\%s.dll"), stdClist.stdplugname); - if ( loadClistModule(exe, stdClist.pImpl)) - return stdClist.pImpl; - } + MuuidReplacement& stdClist = pluginDefault[11]; + if ( LoadCorePlugin(stdClist)) { + mir_sntprintf(slice, &exe[MAX_PATH] - slice, _T("\\Core\\%s.dll"), stdClist.stdplugname); + if ( loadClistModule(exe, stdClist.pImpl)) + return stdClist.pImpl; } return NULL; @@ -735,7 +733,7 @@ void UnloadNewPlugins(void) int LoadNewPluginsModule(void) { - int useWhiteList, i; + int i; // make full path to the plugin TCHAR exe[MAX_PATH]; @@ -765,9 +763,7 @@ int LoadNewPluginsModule(void) } } // first load the clist cos alot of plugins need that to be present at Load(void) - pluginEntry* clist = NULL; - for (useWhiteList = 1; useWhiteList >= 0 && clist == NULL; useWhiteList--) - clist = getCListModule(exe, slice, useWhiteList); + pluginEntry* clist = getCListModule(exe, slice); /* the loop above will try and get one clist DLL to work, if all fail then just bail now */ if (clist == NULL) { -- cgit v1.2.3