summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2012-07-03 21:47:03 +0000
committerGeorge Hazan <george.hazan@gmail.com>2012-07-03 21:47:03 +0000
commite412759d7e551e3fc4dc4be6e1fae1cd4f308868 (patch)
tree00ed12238ba8b3735ddf95cf9e79c48d7c411c78
parent0f95cbb4a9f1c9a613dccb9d53f5ddb50a8cadd7 (diff)
no more PLUGININFOEX::replacesDefaultModule, that old & nasty clutch
since now all Myranda plugins are binary incompatible with Miranda's git-svn-id: http://svn.miranda-ng.org/main/trunk@743 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
-rw-r--r--include/m_plugins.h41
-rw-r--r--include/newpluginapi.h7
-rw-r--r--plugins/AVS/main.cpp1
-rw-r--r--plugins/AddContactPlus/main.cpp1
-rw-r--r--plugins/Alarms/alarms.cpp3
-rw-r--r--plugins/AssocMgr/main.cpp1
-rw-r--r--plugins/AuthState/main.cpp3
-rw-r--r--plugins/AutoRun/main.cpp1
-rw-r--r--plugins/AutoShutdown/main.c191
-rw-r--r--plugins/BASS_interface/Main.cpp1
-rw-r--r--plugins/BasicHistory/BasicHistory.cpp6
-rw-r--r--plugins/Boltun/boltun.cpp1
-rw-r--r--plugins/BossKeyPlus/BossKey.cpp1
-rw-r--r--plugins/BuddyExpectator/BuddyExpectator.cpp1
-rw-r--r--plugins/CSList/cslist.h1
-rw-r--r--plugins/ChangeKeyboardLayout/main.cpp4
-rw-r--r--plugins/Chat/main.cpp1
-rw-r--r--plugins/ClientChangeNotify/ClientChangeNotify.cpp1
-rw-r--r--plugins/Clist_classic/init.cpp4
-rw-r--r--plugins/Clist_modern/init.cpp4
-rw-r--r--plugins/Clist_mw/init.cpp20
-rw-r--r--plugins/Clist_nicer/SRC/init.cpp4
-rw-r--r--plugins/Clist_nicer/skineditor/main.cpp1
-rw-r--r--plugins/Console/init.cpp1
-rw-r--r--plugins/ContactsPlus/main.cpp3
-rw-r--r--plugins/CountryFlags/main.cpp1
-rw-r--r--plugins/CryptoPP/base16.cpp8
-rw-r--r--plugins/CryptoPP/base16.h2
-rw-r--r--plugins/CryptoPP/base64.cpp11
-rw-r--r--plugins/CryptoPP/base64.h2
-rw-r--r--plugins/CryptoPP/commonheaders.cpp6
-rw-r--r--plugins/CryptoPP/commonheaders.h2
-rw-r--r--plugins/CryptoPP/cpp_gpgw.cpp4
-rw-r--r--plugins/CryptoPP/cpp_gzip.cpp4
-rw-r--r--plugins/CryptoPP/cpp_keys.cpp2
-rw-r--r--plugins/CryptoPP/cpp_pgpw.cpp2
-rw-r--r--plugins/CryptoPP/cpp_rsau.h2
-rw-r--r--plugins/CryptoPP/cpp_svcs.cpp5
-rw-r--r--plugins/CryptoPP/cryptopp.h4
-rw-r--r--plugins/CyrTranslit/main.cpp3
-rw-r--r--plugins/CyrTranslit/plugin.h1
-rw-r--r--plugins/Db3x/init.cpp1
-rw-r--r--plugins/Db3x_mmap/init.cpp1
-rw-r--r--plugins/Db_autobackups/main.cpp3
-rw-r--r--plugins/Dbx_mmap_SA/Import_SA/main.cpp3
-rw-r--r--plugins/Dbx_mmap_SA/init.cpp3
-rw-r--r--plugins/Dbx_tree/init.cpp3
-rw-r--r--plugins/ExtraIcons/extraicons.cpp3
-rw-r--r--plugins/FTPFileYM/ftpfile.cpp3
-rw-r--r--plugins/FavContacts/src/main.cpp3
-rw-r--r--plugins/FileAsMessage/main.cpp1
-rw-r--r--plugins/FingerPrintModPlus/src/fingerprint.cpp1
-rw-r--r--plugins/FirstRun/main.cpp8
-rw-r--r--plugins/FlashAvatars/cflash.cpp1
-rw-r--r--plugins/FloatingContacts/main.cpp1
-rw-r--r--plugins/Folders/folders.cpp1
-rw-r--r--plugins/FreeImage/Miranda/main.cpp1
-rw-r--r--plugins/Gender/main.cpp3
-rw-r--r--plugins/HistoryLinkListPlus/linklist.cpp6
-rw-r--r--plugins/HistorySweeperLight/main.cpp1
-rw-r--r--plugins/IEView/ieview_main.cpp1
-rw-r--r--plugins/IgnoreState/main.cpp1
-rw-r--r--plugins/Import/main.cpp3
-rw-r--r--plugins/KeyboardNotify/main.cpp3
-rw-r--r--plugins/LangMan/main.cpp1
-rw-r--r--plugins/ListeningTo/listeningto.cpp3
-rw-r--r--plugins/MenuItemEx/main.cpp19
-rw-r--r--plugins/MetaContacts/meta_main.cpp1
-rw-r--r--plugins/MirOTR/MirOTR/dllmain.cpp33
-rw-r--r--plugins/ModernOpt/main.cpp1
-rw-r--r--plugins/NewAwaySysMod/AwaySys.cpp13
-rw-r--r--plugins/NewEventNotify/main.cpp1
-rw-r--r--plugins/NewXstatusNotify/main.cpp1
-rw-r--r--plugins/Nudge/main.cpp3
-rw-r--r--plugins/PackUpdater/Src/PackUpdater.cpp1
-rw-r--r--plugins/Popup/src/config.cpp1
-rw-r--r--plugins/ProfileManager/pmanagerEx.cpp7
-rw-r--r--plugins/QuickMessages/main.cpp1
-rw-r--r--plugins/QuickReplies/quickreplies.cpp1
-rw-r--r--plugins/Rate/main.cpp6
-rw-r--r--plugins/RecentContacts/RecentContacts.cpp3
-rw-r--r--plugins/SRMM/srmm.cpp1
-rw-r--r--plugins/Scriver/srmm.cpp1
-rw-r--r--plugins/SecureIM/commonheaders.cpp2
-rw-r--r--plugins/SeenPlugin/main.cpp1
-rw-r--r--plugins/SendScreenshotPlus/Main.cpp3
-rw-r--r--plugins/Sessions/Src/Main.cpp1
-rw-r--r--plugins/SimpleAR/Src/Main.cpp1
-rw-r--r--plugins/SimpleStatusMsg/main.cpp1
-rw-r--r--plugins/SmileyAdd/main.cpp3
-rw-r--r--plugins/SpellChecker/spellchecker.cpp7
-rw-r--r--plugins/SplashScreen/src/main.cpp1
-rw-r--r--plugins/StatusPlugins/AdvancedAutoAway/main.cpp1
-rw-r--r--plugins/StatusPlugins/KeepStatus/main.cpp1
-rw-r--r--plugins/StatusPlugins/StartupStatus/main.cpp1
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp1
-rw-r--r--plugins/Svc_crshdmp/crshdmp.cpp3
-rw-r--r--plugins/Svc_dbepp/main.cpp1
-rw-r--r--plugins/Svc_vi/main.cpp6
-rw-r--r--plugins/TabSRMM/src/srmm.cpp1
-rw-r--r--plugins/TipperYM/tipper.cpp3
-rw-r--r--plugins/TooltipNotify/src/main.cpp3
-rw-r--r--plugins/TopToolBar/main.cpp3
-rw-r--r--plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp1
-rw-r--r--plugins/Updater/updater.cpp21
-rw-r--r--plugins/UserGuide/main.cpp8
-rw-r--r--plugins/UserInfoEx/init.cpp1
-rw-r--r--plugins/UserInfoEx/svc_email.cpp7
-rw-r--r--plugins/Variables/main.cpp1
-rw-r--r--plugins/Variables/variables.cpp4
-rw-r--r--plugins/W7UI/main.cpp3
-rw-r--r--plugins/WhenWasIt/WhenWasIt.cpp1
-rw-r--r--plugins/WhoUsesMyFiles/wumfplug.c1
-rw-r--r--plugins/YAPP/popups2.cpp3
-rw-r--r--plugins/ZeroNotification/main.cpp11
-rw-r--r--plugins/mTextControl/src/main.cpp1
-rw-r--r--plugins/testplugin/testplug.c9
-rw-r--r--protocols/AimOscar/aim.cpp3
-rw-r--r--protocols/FacebookRM/main.cpp3
-rw-r--r--protocols/GTalkExt/GTalkExt.cpp3
-rw-r--r--protocols/Gadu-Gadu/gg.c1
-rw-r--r--protocols/IRCG/main.cpp1
-rw-r--r--protocols/IcqOscarJ/init.cpp3
-rw-r--r--protocols/JabberG/jabber.cpp1
-rw-r--r--protocols/MRA/Mra.cpp3
-rw-r--r--protocols/MSN/msn.cpp8
-rw-r--r--protocols/NewsAggregator/Src/NewsAggregator.cpp1
-rw-r--r--protocols/Omegle/main.cpp3
-rw-r--r--protocols/Quotes/Forex.cpp3
-rw-r--r--protocols/Twitter/main.cpp5
-rw-r--r--protocols/Weather/weather.cpp1
-rw-r--r--protocols/YAMN/main.cpp2
-rw-r--r--protocols/Yahoo/main.cpp21
-rw-r--r--src/core/modules.cpp50
-rw-r--r--src/modules/options/options.cpp2
-rw-r--r--src/modules/plugins/newplugins.cpp114
-rw-r--r--src/modules/plugins/pluginopts.cpp24
-rw-r--r--src/modules/plugins/plugins.h16
-rw-r--r--src/modules/protocols/protocols.cpp2
139 files changed, 481 insertions, 420 deletions
diff --git a/include/m_plugins.h b/include/m_plugins.h
index 95657cd1bb..a416295c2e 100644
--- a/include/m_plugins.h
+++ b/include/m_plugins.h
@@ -39,47 +39,6 @@ typedef struct PLUGIN_DB_ENUM {
} PLUGIN_DB_ENUM;
#define MS_PLUGINS_ENUMDBPLUGINS "Plugins/DbEnumerate"
-
-//#define DEFMOD_PROTOCOLICQ 1 //removed from v0.3 alpha
-//#define DEFMOD_PROTOCOLMSN 2 //removed from v0.1.2.0+
-#define DEFMOD_UIFINDADD 3
-#define DEFMOD_UIUSERINFO 4
-#define DEFMOD_SRMESSAGE 5
-#define DEFMOD_SRURL 6
-#define DEFMOD_SREMAIL 7
-#define DEFMOD_SRAUTH 8
-#define DEFMOD_SRFILE 9
-#define DEFMOD_UIHELP 10
-#define DEFMOD_UIHISTORY 11
-//#define DEFMOD_RNDCHECKUPD 12 //removed from v0.3.1 alpha
-//#define DEFMOD_RNDICQIMPORT 13 //removed from v0.3 alpha
-#define DEFMOD_RNDAUTOAWAY 14
-#define DEFMOD_RNDUSERONLINE 15
-//#define DEFMOD_RNDCRYPT 16 // v0.1.0.1-v0.1.2.0
-#define DEFMOD_SRAWAY 17 // v0.1.0.1+
-#define DEFMOD_RNDIGNORE 18 // v0.1.0.1+
-#define DEFMOD_UIVISIBILITY 19 // v0.1.1.0+, options page only
-#define DEFMOD_UICLUI 20 // v0.1.1.0+
-//#define DEFMOD_UIPLUGINOPTS 21 // removed from 0.4.0.1
-//#define DEFMOD_PROTOCOLNETLIB 22 // removed from 0.8.0.5
-#define DEFMOD_RNDIDLE 23 // v0.3.4a+
-#define DEFMOD_CLISTALL 24 // v0.3.4a+ (2004/09/28)
-#define DEFMOD_DB 25 // v0.3.4.3+ (2004/10/11)
-//#define DEFMOD_FONTSERVICE 26 // v0.7.0+ (2006/11/17)
-#define DEFMOD_UPDATENOTIFY 27
-#define DEFMOD_SSL 28 // v0.8.0+
-#define DEFMOD_HIGHEST 28
-
-//plugins/getdisabledefaultarray
-//gets an array of the modules that the plugins report they want to replace
-//wParam=lParam=0
-//returns a pointer to an array of INT_PTR, with elements 1 or 0 indexed by the
-//DEFMOD_ constants. 1 to signify that the default module shouldn't be loaded.
-//this is primarily for use by the core's module initialiser, but could also
-//be used by modules that are doing naughty things that are very
-//feature-dependent
-#define MS_PLUGINS_GETDISABLEDEFAULTARRAY "Plugins/GetDisableDefaultArray"
-
#endif // M_PLUGINS_H__
diff --git a/include/newpluginapi.h b/include/newpluginapi.h
index e27855e34b..1f66cdc090 100644
--- a/include/newpluginapi.h
+++ b/include/newpluginapi.h
@@ -50,7 +50,6 @@ typedef struct _MUUID {
/* Replaceable internal modules interface ids */
#define MIID_HISTORY {0x5ca0cbc1, 0x999a, 0x4ea2, {0x8b, 0x44, 0xf8, 0xf6, 0x7d, 0x7f, 0x8e, 0xbe}}
-#define MIID_UIFINDADD {0xb22c528d, 0x6852, 0x48eb, {0xa2, 0x94, 0x0e, 0x26, 0xa9, 0x16, 0x12, 0x13}}
#define MIID_UIUSERINFO {0x570b931c, 0x9af8, 0x48f1, {0xad, 0x9f, 0xc4, 0x49, 0x8c, 0x61, 0x8a, 0x77}}
#define MIID_SRURL {0x5192445c, 0xf5e8, 0x46c0, {0x8f, 0x9e, 0x2b, 0x6d, 0x43, 0xe5, 0xc7, 0x53}}
#define MIID_SRAUTH {0x377780b9, 0x2b3b, 0x405b, {0x9f, 0x36, 0xb3, 0xc4, 0x87, 0x8e, 0x6f, 0x33}}
@@ -112,11 +111,7 @@ typedef struct PLUGININFOEX_tag
char *copyright;
char *homepage;
BYTE flags; // right now the only flag, UNICODE_AWARE, is recognized here
- int replacesDefaultModule; //one of the DEFMOD_ constants in m_plugins.h or zero
- //if non-zero, this will supress the loading of the specified built-in module
- //with the implication that this plugin provides back-end-compatible features
- /*********** WILL BE DEPRECATED in 0.8 * *************/
- MUUID uuid; // Not required until 0.8.
+ MUUID uuid; // plugin's unique identifier
}
PLUGININFOEX;
diff --git a/plugins/AVS/main.cpp b/plugins/AVS/main.cpp
index 984c7e3e05..eb690a3b9b 100644
--- a/plugins/AVS/main.cpp
+++ b/plugins/AVS/main.cpp
@@ -104,7 +104,6 @@ PLUGININFOEX pluginInfoEx = {
"Copyright 2000-2012 Miranda-IM project",
"http://www.miranda-im.org",
UNICODE_AWARE,
- 0,
// {E00F1643-263C-4599-B84B-053E5C511D29}
{ 0xe00f1643, 0x263c, 0x4599, { 0xb8, 0x4b, 0x5, 0x3e, 0x5c, 0x51, 0x1d, 0x29 } }
};
diff --git a/plugins/AddContactPlus/main.cpp b/plugins/AddContactPlus/main.cpp
index e7c33cb9e0..56d8b0ad1b 100644
--- a/plugins/AddContactPlus/main.cpp
+++ b/plugins/AddContactPlus/main.cpp
@@ -36,7 +36,6 @@ PLUGININFOEX pluginInfo = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
// {6471D451-2FE0-4ee2-850E-9F84F3C0D187}
{ 0x6471d451, 0x2fe0, 0x4ee2, { 0x85, 0xe, 0x9f, 0x84, 0xf3, 0xc0, 0xd1, 0x87 } }
};
diff --git a/plugins/Alarms/alarms.cpp b/plugins/Alarms/alarms.cpp
index 27a5c53a97..c9305afce2 100644
--- a/plugins/Alarms/alarms.cpp
+++ b/plugins/Alarms/alarms.cpp
@@ -38,8 +38,7 @@ PLUGININFOEX pluginInfo={
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
{ 0x4dd7762b, 0xd612, 0x4f84, { 0xaa, 0x86, 0x6, 0x8f, 0x17, 0x85, 0x9b, 0x6d } } // {4DD7762B-D612-4f84-AA86-068F17859B6D}
};
diff --git a/plugins/AssocMgr/main.cpp b/plugins/AssocMgr/main.cpp
index 9e81a0b74b..e6095c25c4 100644
--- a/plugins/AssocMgr/main.cpp
+++ b/plugins/AssocMgr/main.cpp
@@ -36,7 +36,6 @@ PLUGININFOEX pluginInfo={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
// {52685CD7-0EC7-44c1-A1A6-381612418202}
{0x52685cd7,0xec7,0x44c1,{0xa1,0xa6,0x38,0x16,0x12,0x41,0x82,0x2}}
};
diff --git a/plugins/AuthState/main.cpp b/plugins/AuthState/main.cpp
index ba37eeeb3d..0f168c0fe1 100644
--- a/plugins/AuthState/main.cpp
+++ b/plugins/AuthState/main.cpp
@@ -56,8 +56,7 @@ PLUGININFOEX pluginInfo={
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
{0xdace7d41, 0xdfa9, 0x4772, {0x89, 0xae, 0xa5, 0x9a, 0x61, 0x53, 0xe6, 0xb2}}
/* DACE7D41-DFA9-4772-89AE-A59A6153E6B2 */
};
diff --git a/plugins/AutoRun/main.cpp b/plugins/AutoRun/main.cpp
index 624a58d131..36eebd47f2 100644
--- a/plugins/AutoRun/main.cpp
+++ b/plugins/AutoRun/main.cpp
@@ -15,7 +15,6 @@ PLUGININFOEX pluginInfoEx=
"Copyright © 2002-2007 Sergey V. Gershovich a.k.a. Jazzy$",
"http://miranda-im.org/download/index.php?action=viewfile&id=285",
UNICODE_AWARE,
- 0,
MIID_AUTORUN
};
diff --git a/plugins/AutoShutdown/main.c b/plugins/AutoShutdown/main.c
new file mode 100644
index 0000000000..d8122bcfac
--- /dev/null
+++ b/plugins/AutoShutdown/main.c
@@ -0,0 +1,191 @@
+/*
+
+'AutoShutdown'-Plugin for Miranda IM
+
+Copyright 2004-2007 H. Herkenrath
+
+This program is free software; you can redistribute it and/or
+modify it under the terms of the GNU General Public License
+as published by the Free Software Foundation; either version 2
+of the License, or (at your option) any later version.
+
+This program is distributed in the hope that it will be useful,
+but WITHOUT ANY WARRANTY; without even the implied warranty of
+MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+GNU General Public License for more details.
+
+You should have received a copy of the GNU General Public License
+along with this program (Shutdown-License.txt); if not, write to the Free Software
+Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
+*/
+
+#include "common.h"
+#include "version.h"
+
+HINSTANCE hInst;
+PLUGINLINK *pluginLink;
+struct MM_INTERFACE mmi;
+static HANDLE hHookModulesLoaded;
+HANDLE hActiveIcon,hInactiveIcon;
+
+PLUGININFOEX pluginInfo={
+ sizeof(PLUGININFOEX),
+ "AutoShutdown",
+ PLUGIN_VERSION,
+#if defined(_DEBUG)
+ "Development build not intended for release. ("__DATE__")",
+#else
+ "Adds the possibility to shutdown the computer when a specified event occurs.", /* autotranslated */
+#endif
+ "H. Herkenrath",
+ PLUGIN_EMAIL, /* @ will be set later */
+ "© 2004-2007 H. Herkenrath",
+ PLUGIN_WEBSITE,
+ UNICODE_AWARE,
+#if defined(_UNICODE)
+ // {9DE24579-5C5C-49aa-80E8-4D38E4344E63}
+ {0x9de24579,0x5c5c,0x49aa,{0x80,0xe8,0x4d,0x38,0xe4,0x34,0x4e,0x63}},
+#else
+ // {7C0DD208-94D8-4283-879A-E6F86135B826}
+ {0x7c0dd208,0x94d8,0x4283,{0x87,0x9a,0xe6,0xf8,0x61,0x35,0xb8,0x26}}
+#endif
+};
+static const MUUID interfaces[]={MIID_SHUTDOWN,MIID_LAST};
+
+BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,void *pReserved)
+{
+ UNREFERENCED_PARAMETER(pReserved);
+ if(fdwReason==DLL_PROCESS_ATTACH)
+ /* Do not call this function from a DLL that is linked to the static C run-time library (CRT).
+ * The static CRT requires DLL_THREAD_ATTACH and DLL_THREAD_DETATCH notifications to function properly. */
+ DisableThreadLibraryCalls(hInst=hinstDLL);
+ return TRUE;
+}
+
+static void InstallFile(const TCHAR *pszFileName,const TCHAR *pszDestSubDir)
+{
+ TCHAR szFileFrom[MAX_PATH+1],szFileTo[MAX_PATH+1],*p;
+ HANDLE hFile;
+
+ if(!GetModuleFileName(hInst,szFileFrom,SIZEOF(szFileFrom)-lstrlen(pszFileName)))
+ return;
+ p=_tcsrchr(szFileFrom,_T('\\'));
+ if(p!=NULL) *(++p)=0;
+ lstrcat(szFileFrom,pszFileName); /* buffer safe */
+
+ hFile=CreateFile(szFileFrom,0,FILE_SHARE_READ,0,OPEN_EXISTING,0,0);
+ if(hFile==INVALID_HANDLE_VALUE) return;
+ CloseHandle(hFile);
+
+ if(!GetModuleFileName(NULL,szFileTo,SIZEOF(szFileTo)-lstrlen(pszDestSubDir)-lstrlen(pszFileName)))
+ return;
+ p=_tcsrchr(szFileTo,_T('\\'));
+ if(p!=NULL) *(++p)=0;
+ lstrcat(szFileTo,pszDestSubDir); /* buffer safe */
+ CreateDirectory(szFileTo,NULL);
+ lstrcat(szFileTo,pszFileName); /* buffer safe */
+
+ if(!MoveFile(szFileFrom,szFileTo) && GetLastError()==ERROR_ALREADY_EXISTS) {
+ DeleteFile(szFileTo);
+ MoveFile(szFileFrom,szFileTo);
+ }
+}
+
+static int ShutdownModulesLoaded(WPARAM wParam,LPARAM lParam)
+{
+ UNREFERENCED_PARAMETER(wParam);
+ UNREFERENCED_PARAMETER(lParam);
+ if(ServiceExists("DBEditorpp/RegisterSingleModule"))
+ CallService("DBEditorpp/RegisterSingleModule",(WPARAM)"AutoShutdown",0);
+ /* merged thundershutdown plugin */
+ if(GetModuleHandleA("tshutdown.dll")) {
+ DBWriteContactSettingByte(NULL,"PluginDisable","tshutdown.dll",1);
+ DBWriteContactSettingByte(NULL,"AutoShutdown","WeatherShutdown",1);
+ }
+ return 0;
+}
+
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+__declspec(dllexport) const PLUGININFO* MirandaPluginInfo(DWORD mirandaVersion)
+{
+ if(mirandaVersion<PLUGIN_MAKE_VERSION(0,1,0,1)) return NULL;
+ pluginInfo.cbSize=sizeof(PLUGININFO); /* needed as v0.6 does equality check */
+ /* email obfuscated, made .rdata writable */
+ pluginInfo.authorEmail[PLUGIN_EMAIL_ATT_POS-1]='@';
+ return (PLUGININFO*)&pluginInfo; /* header is the same */
+}
+
+__declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
+{
+ UNREFERENCED_PARAMETER(mirandaVersion);
+ pluginInfo.cbSize=sizeof(PLUGININFOEX);
+ /* email obfuscated, made .rdata writable */
+ pluginInfo.authorEmail[PLUGIN_EMAIL_ATT_POS-1]='@';
+ return &pluginInfo;
+}
+
+__declspec(dllexport) const MUUID* MirandaPluginInterfaces(void)
+{
+ return interfaces;
+}
+
+__declspec(dllexport) int Load(PLUGINLINK *link)
+{
+ INITCOMMONCONTROLSEX icc;
+ pluginLink=link;
+
+ /* existance of MS_SYSTEM_GETVERSION and MS_LANGPACK_TRANSLATESTRING
+ * is checked in MirandaPluginInfo().
+ * Not placed in MirandaPluginInfo() to avoid MessageBoxes on plugin options.
+ * Using ANSI as LANG_UNICODE might not be supported. */
+ if(CallService(MS_SYSTEM_GETVERSION,0,0)<NEEDED_MIRANDA_VERSION) {
+ char szText[256];
+ mir_snprintf(szText,sizeof(szText),Translate("The AutoShutdown plugin can not be loaded. It requires Miranda IM %hs or later."),NEEDED_MIRANDA_VERSION_STR);
+ MessageBoxA(NULL,szText,Translate("AutoShutdown Plugin"),MB_OK|MB_ICONERROR|MB_SETFOREGROUND|MB_TOPMOST|MB_TASKMODAL);
+ return 1;
+ }
+ if(!ServiceExists(MS_DB_CONTACT_GETSETTING_STR)) return 1; /* dbx3x v0.5.1.0 */
+ if(mir_getMMI(&mmi)) return 1;
+ icc.dwSize=sizeof(icc);
+ icc.dwICC=ICC_DATE_CLASSES|ICC_UPDOWN_CLASS|ICC_PROGRESS_CLASS;
+ if(!InitCommonControlsEx(&icc)) return 1;
+
+ if(InitFrame()) return 1; /* before icons */
+
+ /* shared */
+ IcoLib_AddIconRes("AutoShutdown_Header",TranslateT("Automatic Shutdown"),TranslateT("Header"),hInst,IDI_HEADER,TRUE);
+ hActiveIcon=IcoLib_AddIconRes("AutoShutdown_Active",TranslateT("Automatic Shutdown"),TranslateT("Active"),hInst,IDI_ACTIVE,FALSE);
+ hInactiveIcon=IcoLib_AddIconRes("AutoShutdown_Inactive",TranslateT("Automatic Shutdown"),TranslateT("Inactive"),hInst,IDI_INACTIVE,FALSE);
+
+ InitShutdownSvc();
+ InitWatcher(); /* before InitSettingsDlg() */
+ InitSettingsDlg();
+ InitOptions();
+
+ /* installation */
+ InstallFile(_T("Shutdown-Readme.txt"),_T("Docs\\"));
+ InstallFile(_T("Shutdown-License.txt"),_T("Docs\\"));
+ InstallFile(_T("Shutdown-SDK.zip"),_T("Docs\\"));
+ InstallFile(_T("countdown.wav"),_T("Sounds\\"));
+ hHookModulesLoaded=HookEvent(ME_SYSTEM_MODULESLOADED,ShutdownModulesLoaded);
+ return 0;
+}
+
+__declspec(dllexport) int Unload(void)
+{
+ UnhookEvent(hHookModulesLoaded);
+
+ UninitOptions();
+ UninitSettingsDlg(); /* before UninitWatcher() */
+ UninitWatcher(); /* before UninitFrame() */
+ UninitFrame();
+ UninitShutdownSvc();
+ return 0;
+}
+
+#ifdef __cplusplus
+}
+#endif
diff --git a/plugins/BASS_interface/Main.cpp b/plugins/BASS_interface/Main.cpp
index 7dfb902cb4..46e1b050e9 100644
--- a/plugins/BASS_interface/Main.cpp
+++ b/plugins/BASS_interface/Main.cpp
@@ -17,7 +17,6 @@ PLUGININFOEX pluginInfo={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_BASSINT
};
diff --git a/plugins/BasicHistory/BasicHistory.cpp b/plugins/BasicHistory/BasicHistory.cpp
index 89d15167cd..e28278e68b 100644
--- a/plugins/BasicHistory/BasicHistory.cpp
+++ b/plugins/BasicHistory/BasicHistory.cpp
@@ -46,9 +46,10 @@ bool g_SmileyAddAvail = false;
char* metaContactProto = NULL;
const IID IID_ITextDocument={0x8CC497C0, 0xA1DF, 0x11ce, {0x80, 0x98, 0x00, 0xAA, 0x00, 0x47, 0xBE, 0x5D}};
-#define MODULE "BasicHistory"
+#define MODULE "BasicHistory"
-PLUGININFOEX pluginInfo={
+PLUGININFOEX pluginInfo =
+{
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
@@ -58,7 +59,6 @@ PLUGININFOEX pluginInfo={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- DEFMOD_UIHISTORY,
MIID_BASICHISTORY
};
diff --git a/plugins/Boltun/boltun.cpp b/plugins/Boltun/boltun.cpp
index 9e4881c080..52e140d509 100644
--- a/plugins/Boltun/boltun.cpp
+++ b/plugins/Boltun/boltun.cpp
@@ -67,7 +67,6 @@ PLUGININFOEX pluginInfo={
"© 2003-2008 Alexander S. Kiselev A.K.A. KAS, Valentin Pavlyuchenko",
"http://miranda-im.org",
UNICODE_AWARE,
- 0,
// {488C5C84-56DA-434F-96F1-B18900DEF760}
{ 0x488c5c84, 0x56da, 0x434f, { 0x96, 0xf1, 0xb1, 0x89, 0x0, 0xde, 0xf7, 0x60 } }
};
diff --git a/plugins/BossKeyPlus/BossKey.cpp b/plugins/BossKeyPlus/BossKey.cpp
index 1f115858b1..e19c7bc094 100644
--- a/plugins/BossKeyPlus/BossKey.cpp
+++ b/plugins/BossKeyPlus/BossKey.cpp
@@ -67,7 +67,6 @@ static PLUGININFOEX pluginInfo = {
__COPYRIGHTS,
__FL,
UNICODE_AWARE,
- 0,
//4fac353d-0a36-44a4-9064-6759c53ae782
{0x4fac353d, 0x0a36, 0x44a4, { 0x90, 0x64, 0x67, 0x59, 0xc5, 0x3a, 0xe7, 0x82 }}
};
diff --git a/plugins/BuddyExpectator/BuddyExpectator.cpp b/plugins/BuddyExpectator/BuddyExpectator.cpp
index 3e7daed480..ab10cf03cb 100644
--- a/plugins/BuddyExpectator/BuddyExpectator.cpp
+++ b/plugins/BuddyExpectator/BuddyExpectator.cpp
@@ -70,7 +70,6 @@ PLUGININFOEX pluginInfo = {
"© 2005 Anar Ibragimoff, © 2006 Scott Ellis, © 2007-2009 Alexander Turyak",
"http://thief.miranda.im",
UNICODE_AWARE,
- 0,
{0xddf8aec9, 0x7d37, 0x49af, {0x9d, 0x22, 0xbb, 0xbc, 0x92, 0x0e, 0x6f, 0x05}} //{DDF8AEC9-7D37-49AF-9D22-BBBC920E6F05}
};
diff --git a/plugins/CSList/cslist.h b/plugins/CSList/cslist.h
index b2cffb6549..5365b75774 100644
--- a/plugins/CSList/cslist.h
+++ b/plugins/CSList/cslist.h
@@ -636,7 +636,6 @@ PLUGININFOEX pluginInfoEx =
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
PLUGIN_GUUID
};
diff --git a/plugins/ChangeKeyboardLayout/main.cpp b/plugins/ChangeKeyboardLayout/main.cpp
index 039554a019..5cda47443b 100644
--- a/plugins/ChangeKeyboardLayout/main.cpp
+++ b/plugins/ChangeKeyboardLayout/main.cpp
@@ -21,9 +21,9 @@ PLUGININFOEX pluginInfoEx = {
"Yasnovidyashii@gmail.com",
"© 2006-2009 Mikhail Yur'ev",
"http://lemnews.com/forum/viewtopic.php?t = 1493",
- 0, //not transient
UNICODE_AWARE, //doesn't replace anything built-in
- {0xc5ef53a8, 0x80d4, 0x4ce9, { 0xb3, 0x41, 0xec, 0x90, 0xd3, 0xec, 0x91, 0x56 }} //{c5ef53a8-80d4-4ce9-b341-ec90d3ec9156}
+ // {c5ef53a8-80d4-4ce9-b341-ec90d3ec9156}
+ {0xc5ef53a8, 0x80d4, 0x4ce9, { 0xb3, 0x41, 0xec, 0x90, 0xd3, 0xec, 0x91, 0x56 }}
};
LPCTSTR ptszKeybEng = _T("`1234567890- = \\qwertyuiop[]asdfghjkl;'zxcvbnm,./~!@#$%^&*()_+|QWERTYUIOP{}ASDFGHJKL:\"ZXCVBNM<>?");
diff --git a/plugins/Chat/main.cpp b/plugins/Chat/main.cpp
index 4a2963ee08..ef631c5508 100644
--- a/plugins/Chat/main.cpp
+++ b/plugins/Chat/main.cpp
@@ -60,7 +60,6 @@ PLUGININFOEX pluginInfo = {
"© 2003-2010 Miranda team",
"http://miranda-im.org/",
UNICODE_AWARE,
- 0,
{0x9d6c3213, 0x2b4, 0x4fe1, { 0x92, 0xe6, 0x52, 0x6d, 0xe2, 0x4f, 0x8d, 0x65 }} //{9D6C3213-02B4-4fe1-92E6-526DE24F8D65}
};
diff --git a/plugins/ClientChangeNotify/ClientChangeNotify.cpp b/plugins/ClientChangeNotify/ClientChangeNotify.cpp
index e8b3d07819..3318c3ec92 100644
--- a/plugins/ClientChangeNotify/ClientChangeNotify.cpp
+++ b/plugins/ClientChangeNotify/ClientChangeNotify.cpp
@@ -48,7 +48,6 @@ PLUGININFOEX pluginInfo = {
"© 2006-2008 Chervov Dmitry",
"http://deathdemon.int.ru/",
UNICODE_AWARE,
- 0,
// {B68A8906-748B-435d-930E-21CC6E8F3B3F}
{0xb68a8906, 0x748b, 0x435d, {0x93, 0xe, 0x21, 0xcc, 0x6e, 0x8f, 0x3b, 0x3f}}
};
diff --git a/plugins/Clist_classic/init.cpp b/plugins/Clist_classic/init.cpp
index 5af2c3b339..3e497d1739 100644
--- a/plugins/Clist_classic/init.cpp
+++ b/plugins/Clist_classic/init.cpp
@@ -66,8 +66,8 @@ PLUGININFOEX pluginInfo = {
"Copyright 2000-2008 Miranda IM project",
"http://www.miranda-im.org",
UNICODE_AWARE,
- DEFMOD_CLISTALL,
- {0x240a91dc, 0x9464, 0x457a, { 0x97, 0x87, 0xff, 0x1e, 0xa8, 0x8e, 0x77, 0xe3 }} //{240A91DC-9464-457a-9787-FF1EA88E77E3}
+ //{240A91DC-9464-457a-9787-FF1EA88E77E3}
+ {0x240a91dc, 0x9464, 0x457a, { 0x97, 0x87, 0xff, 0x1e, 0xa8, 0x8e, 0x77, 0xe3 }}
};
extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion)
diff --git a/plugins/Clist_modern/init.cpp b/plugins/Clist_modern/init.cpp
index fc2b6627bf..e803300569 100644
--- a/plugins/Clist_modern/init.cpp
+++ b/plugins/Clist_modern/init.cpp
@@ -66,8 +66,8 @@ PLUGININFOEX pluginInfo = {
"Copyright 2000-2010 Miranda-IM project",
"http://miranda-im.org/development",
UNICODE_AWARE,
- DEFMOD_CLISTALL,
- {0x43909b6, 0xaad8, 0x4d82, { 0x8e, 0xb5, 0x9f, 0x64, 0xcf, 0xe8, 0x67, 0xcd }} //{043909B6-AAD8-4d82-8EB5-9F64CFE867CD}
+ //{043909B6-AAD8-4d82-8EB5-9F64CFE867CD}
+ {0x43909b6, 0xaad8, 0x4d82, { 0x8e, 0xb5, 0x9f, 0x64, 0xcf, 0xe8, 0x67, 0xcd }}
};
static const MUUID interfaces[] = {MIID_CLIST, MIID_LAST};
diff --git a/plugins/Clist_mw/init.cpp b/plugins/Clist_mw/init.cpp
index 41197e501e..2bec98ea31 100644
--- a/plugins/Clist_mw/init.cpp
+++ b/plugins/Clist_mw/init.cpp
@@ -85,8 +85,8 @@ PLUGININFOEX pluginInfo = {
"Copyright 2000-2010 Miranda-IM project ["__DATE__" "__TIME__"]",
"http://www.miranda-im.org",
UNICODE_AWARE,
- DEFMOD_CLISTALL,
- {0x2a417ab9, 0x16f2, 0x472d, { 0x9a, 0xe3, 0x41, 0x51, 0x3, 0xc7, 0x8a, 0x64 }} //{2A417AB9-16F2-472d-9AE3-415103C78A64}
+ //{2A417AB9-16F2-472d-9AE3-415103C78A64}
+ {0x2a417ab9, 0x16f2, 0x472d, { 0x9a, 0xe3, 0x41, 0x51, 0x3, 0xc7, 0x8a, 0x64 }}
};
BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserved)
@@ -112,21 +112,13 @@ int LoadCLCModule(void);
int LoadCLUIModule();
int InitSkinHotKeys();
-static int systemModulesLoaded(WPARAM wParam, LPARAM lParam)
+static int OnModulesLoaded(WPARAM wParam, LPARAM lParam)
{
- __try {
- int *disableDefaultModule = 0;
- disableDefaultModule = (int*)CallService(MS_PLUGINS_GETDISABLEDEFAULTARRAY,0,0);
- if (!disableDefaultModule[DEFMOD_UICLUI]) if ( LoadCLUIModule()) return 1;
- }
- __except (exceptFunction(GetExceptionInformation()))
- {
- return 0;
- }
+ if ( LoadCLUIModule())
+ return 1;
InitSkinHotKeys();
RegisterCListFonts();
-
return 0;
}
@@ -216,7 +208,7 @@ LBL_Error:
rc = LoadContactListModule();
if (rc == 0) rc = LoadCLCModule();
- HookEvent(ME_SYSTEM_MODULESLOADED, systemModulesLoaded);
+ HookEvent(ME_SYSTEM_MODULESLOADED, OnModulesLoaded);
BGModuleLoad();
OutputDebugStringA("CListInitialise ClistMW...Done\r\n");
diff --git a/plugins/Clist_nicer/SRC/init.cpp b/plugins/Clist_nicer/SRC/init.cpp
index cef1931bc4..0454d0d36a 100644
--- a/plugins/Clist_nicer/SRC/init.cpp
+++ b/plugins/Clist_nicer/SRC/init.cpp
@@ -111,8 +111,8 @@ PLUGININFOEX pluginInfo =
"Copyright 2000-2010 Miranda-IM project",
"http://www.miranda-im.org",
UNICODE_AWARE,
- DEFMOD_CLISTALL,
- {0x8f79b4ee, 0xeb48, 0x4a03, { 0x87, 0x3e, 0x27, 0xbe, 0x6b, 0x7e, 0x9a, 0x25 }} //{8F79B4EE-EB48-4a03-873E-27BE6B7E9A25}
+ // {8F79B4EE-EB48-4a03-873E-27BE6B7E9A25}
+ {0x8f79b4ee, 0xeb48, 0x4a03, { 0x87, 0x3e, 0x27, 0xbe, 0x6b, 0x7e, 0x9a, 0x25 }}
};
diff --git a/plugins/Clist_nicer/skineditor/main.cpp b/plugins/Clist_nicer/skineditor/main.cpp
index f01fa15cd0..de1996f2f5 100644
--- a/plugins/Clist_nicer/skineditor/main.cpp
+++ b/plugins/Clist_nicer/skineditor/main.cpp
@@ -36,7 +36,6 @@ PLUGININFOEX pluginInfo = {
"Copyright 2000-2006 Miranda-IM project",
"http://www.miranda-im.org",
UNICODE_AWARE,
- 0,
{0x21948c89, 0xb549, 0x4c9d, { 0x8b, 0x4f, 0x3f, 0x37, 0x26, 0xec, 0x6b, 0x4b }}
};
diff --git a/plugins/Console/init.cpp b/plugins/Console/init.cpp
index 4742253c44..58943d2c6a 100644
--- a/plugins/Console/init.cpp
+++ b/plugins/Console/init.cpp
@@ -37,7 +37,6 @@ PLUGININFOEX pluginInfoEx={
__PLUGIN_RIGHTS,
__PLUGIN_URL,
UNICODE_AWARE,
- 0,
MIID_CONSOLE
};
diff --git a/plugins/ContactsPlus/main.cpp b/plugins/ContactsPlus/main.cpp
index 172d17be53..fff3770566 100644
--- a/plugins/ContactsPlus/main.cpp
+++ b/plugins/ContactsPlus/main.cpp
@@ -59,8 +59,7 @@ PLUGININFOEX pluginInfo = {
"jokusoftware@miranda-im.org",
"(C) 2004-2008 Joe Kucera, Original Code (C) 2002 Dominus Procellarum",
"http://addons.miranda-im.org/details.php?action=viewfile&id=1253",
- UNICODE_AWARE, //no flags by default
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
{0x0324785E, 0x74CE, 0x4600, {0xB7, 0x81, 0x85, 0x17, 0x73, 0xB3, 0xEF, 0xC5 } } // {0324785E-74CE-4600-B781-851773B3EFC5}
};
diff --git a/plugins/CountryFlags/main.cpp b/plugins/CountryFlags/main.cpp
index ac35c5ef57..1f3e80ba04 100644
--- a/plugins/CountryFlags/main.cpp
+++ b/plugins/CountryFlags/main.cpp
@@ -35,7 +35,6 @@ static PLUGININFOEX pluginInfo={
"© 2006-2007 H. Herkenrath",
PLUGIN_WEBSITE,
UNICODE_AWARE,
- 0,
// {68C36842-3D95-4f4a-AB81-014D6593863B}
{0x68c36842,0x3d95,0x4f4a,{0xab,0x81,0x1,0x4d,0x65,0x93,0x86,0x3b}}
};
diff --git a/plugins/CryptoPP/base16.cpp b/plugins/CryptoPP/base16.cpp
index 110eea0a9c..ace113ff76 100644
--- a/plugins/CryptoPP/base16.cpp
+++ b/plugins/CryptoPP/base16.cpp
@@ -18,7 +18,7 @@ char *base16encode(const char *inBuffer, int count) {
}
-char *base16decode(const char *inBuffer, int *count) {
+char *base16decode(const char *inBuffer, size_t *count) {
char *outBuffer = (char *) malloc(*count);
BYTE *outBufferPtr = (BYTE *) outBuffer;
@@ -54,9 +54,9 @@ char *base16decode(const char *inBuffer, int *count) {
}
-char *base16decode(const char *inBuffer) {
-
- int count = (int)strlen(inBuffer);
+char *base16decode(const char *inBuffer)
+{
+ size_t count = strlen(inBuffer);
return base16decode(inBuffer, &count);
}
diff --git a/plugins/CryptoPP/base16.h b/plugins/CryptoPP/base16.h
index f5f368ebaa..2a2c18c42a 100644
--- a/plugins/CryptoPP/base16.h
+++ b/plugins/CryptoPP/base16.h
@@ -44,7 +44,7 @@ static const byte asciiToBin16[] =
static const byte binToAscii16[] = "0123456789ABCDEF";
char *base16encode(const char *, const int);
-char *base16decode(const char *, int *);
+char *base16decode(const char *, size_t *);
char *base16decode(const char *);
#define encode16(data) binToAscii16[data]
diff --git a/plugins/CryptoPP/base64.cpp b/plugins/CryptoPP/base64.cpp
index 1a752bc507..7495dd234f 100644
--- a/plugins/CryptoPP/base64.cpp
+++ b/plugins/CryptoPP/base64.cpp
@@ -1,7 +1,8 @@
#include "commonheaders.h"
-string base64encode(const string buf) {
+string base64encode(const string buf)
+{
string out;
char *base64 = base64encode(buf.data(), buf.length());
out.assign(base64);
@@ -42,7 +43,7 @@ char *base64encode(const char *inBuffer, const int count) {
string base64decode(const string buf) {
string out;
- int len = buf.length();
+ size_t len = buf.length();
char *plain = base64decode(buf.data(), &len);
out.assign(plain,len);
free(plain);
@@ -52,7 +53,7 @@ string base64decode(const string buf) {
string base64decode(const char *buf) {
string out;
- int len = strlen(buf);
+ size_t len = strlen(buf);
char *plain = base64decode(buf, &len);
out.assign(plain,len);
free(plain);
@@ -60,14 +61,14 @@ string base64decode(const char *buf) {
}
-char *base64decode(const char *inBuffer, int *count) {
+char *base64decode(const char *inBuffer, size_t *count) {
int srcIndex = 0, destIndex = 0;
char *outBuffer = (char *) malloc(*count);
while(srcIndex < *count) {
BYTE c0, c1, c2 = 0, c3 = 0;
- const int delta = *count - srcIndex;
+ const size_t delta = *count - srcIndex;
c0 = decode64(inBuffer[srcIndex++]);
c1 = decode64(inBuffer[srcIndex++]);
if (delta > 2) {
diff --git a/plugins/CryptoPP/base64.h b/plugins/CryptoPP/base64.h
index b0756276a3..1024ecbbd7 100644
--- a/plugins/CryptoPP/base64.h
+++ b/plugins/CryptoPP/base64.h
@@ -45,7 +45,7 @@ static const byte asciiToBin64[] =
static const byte binToAscii64[] = "ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789+/";
char *base64encode(const char *, const int);
-char *base64decode(const char *, int *);
+char *base64decode(const char *, size_t *);
string base64encode(const string);
string base64decode(const string);
diff --git a/plugins/CryptoPP/commonheaders.cpp b/plugins/CryptoPP/commonheaders.cpp
index 426b7ada54..395da89d5f 100644
--- a/plugins/CryptoPP/commonheaders.cpp
+++ b/plugins/CryptoPP/commonheaders.cpp
@@ -24,7 +24,7 @@ PLUGININFOEX pluginInfoEx = {
"baloo@bk.ru",
"© 2006-09 Baloo",
"http://miranda-im.org/download/details.php?action=viewfile&id=2669",
- 0, 0,
+ 0,
MIID_CRYPTOPP
};
@@ -58,8 +58,8 @@ void ExtractFile( char *FileName, int ResType, int ResId )
}
-int rtrim(LPCSTR str) {
- int len = strlen(str);
+size_t rtrim(LPCSTR str) {
+ size_t len = strlen(str);
LPSTR ptr = (LPSTR)str+len-1;
while( len ) {
diff --git a/plugins/CryptoPP/commonheaders.h b/plugins/CryptoPP/commonheaders.h
index 5e2215ea3c..fee4216694 100644
--- a/plugins/CryptoPP/commonheaders.h
+++ b/plugins/CryptoPP/commonheaders.h
@@ -89,7 +89,7 @@ extern CRITICAL_SECTION localQueueMutex;
extern CRITICAL_SECTION localContextMutex;
void ExtractFile(char*,int,int);
-int rtrim(LPCSTR);
+size_t rtrim(LPCSTR);
#if defined(_DEBUG) || defined(NETLIB_LOG)
extern HANDLE hNetlibUser;
diff --git a/plugins/CryptoPP/cpp_gpgw.cpp b/plugins/CryptoPP/cpp_gpgw.cpp
index 5107b27ac7..0ef3d77626 100644
--- a/plugins/CryptoPP/cpp_gpgw.cpp
+++ b/plugins/CryptoPP/cpp_gpgw.cpp
@@ -240,7 +240,7 @@ LPSTR __cdecl gpg_encode(HANDLE context, LPCSTR szPlainMsg)
LPSTR szUtfMsg;
if ( ptr->mode & MODE_GPG_ANSI ) {
LPWSTR wszMsg = utf8decode(szPlainMsg);
- int wlen = wcslen(wszMsg)+1;
+ size_t wlen = wcslen(wszMsg)+1;
szUtfMsg = (LPSTR) alloca(wlen);
WideCharToMultiByte(CP_ACP, 0, wszMsg, -1, szUtfMsg, wlen, 0, 0);
}
@@ -261,7 +261,7 @@ LPSTR __cdecl gpg_decode(HANDLE context, LPCSTR szEncMsg)
if (szOldMsg) {
if ( !is_7bit_string(szOldMsg) && !is_utf8_string(szOldMsg) ) {
- int slen = strlen(szOldMsg)+1;
+ size_t slen = strlen(szOldMsg)+1;
LPWSTR wszMsg = (LPWSTR) alloca(slen*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wszMsg, slen*sizeof(WCHAR));
szNewMsg = _strdup(utf8encode(wszMsg));
diff --git a/plugins/CryptoPP/cpp_gzip.cpp b/plugins/CryptoPP/cpp_gzip.cpp
index c819779677..36a4ae7e20 100644
--- a/plugins/CryptoPP/cpp_gzip.cpp
+++ b/plugins/CryptoPP/cpp_gzip.cpp
@@ -1,7 +1,7 @@
#include "commonheaders.h"
// gzip data
-BYTE *cpp_gzip(BYTE *pData, int nLen, int& nCompressedLen) {
+BYTE *cpp_gzip(BYTE *pData, size_t nLen, size_t& nCompressedLen) {
string zipped;
Gzip gzip(new StringSink(zipped),5); // 1 is fast, 9 is slow
@@ -16,7 +16,7 @@ BYTE *cpp_gzip(BYTE *pData, int nLen, int& nCompressedLen) {
}
// gunzip data
-BYTE *cpp_gunzip(BYTE *pCompressedData, int nCompressedLen, int& nLen) {
+BYTE *cpp_gunzip(BYTE *pCompressedData, size_t nCompressedLen, size_t& nLen) {
string unzipped;
Gunzip gunzip(new StringSink(unzipped));
diff --git a/plugins/CryptoPP/cpp_keys.cpp b/plugins/CryptoPP/cpp_keys.cpp
index b21da13ada..b216eb6a2f 100644
--- a/plugins/CryptoPP/cpp_keys.cpp
+++ b/plugins/CryptoPP/cpp_keys.cpp
@@ -73,7 +73,7 @@ int __cdecl cpp_init_keyb(HANDLE context, LPCSTR key) {
pCNTX ptr = get_context_on_id(context); if (!ptr) return 0;
pSIMDATA p = (pSIMDATA) cpp_alloc_pdata(ptr);
- int clen = rtrim(key);
+ size_t clen = rtrim(key);
ptr->features = 0;
LPSTR pub_binary;
diff --git a/plugins/CryptoPP/cpp_pgpw.cpp b/plugins/CryptoPP/cpp_pgpw.cpp
index a42e84c366..8633690009 100644
--- a/plugins/CryptoPP/cpp_pgpw.cpp
+++ b/plugins/CryptoPP/cpp_pgpw.cpp
@@ -258,7 +258,7 @@ LPSTR __cdecl pgp_decode(HANDLE context, LPCSTR szEncMsg)
if (szOldMsg) {
if ( !is_7bit_string(szOldMsg) && !is_utf8_string(szOldMsg) ) {
- int slen = strlen(szOldMsg)+1;
+ size_t slen = strlen(szOldMsg)+1;
LPWSTR wszMsg = (LPWSTR) alloca(slen*sizeof(WCHAR));
MultiByteToWideChar(CP_ACP, 0, szOldMsg, -1, wszMsg, slen*sizeof(WCHAR));
szNewMsg = _strdup(utf8encode(wszMsg));
diff --git a/plugins/CryptoPP/cpp_rsau.h b/plugins/CryptoPP/cpp_rsau.h
index 0e30629079..bc45a248c5 100644
--- a/plugins/CryptoPP/cpp_rsau.h
+++ b/plugins/CryptoPP/cpp_rsau.h
@@ -30,7 +30,7 @@ public:
}
};
- u_int count() { return data.size(); };
+ size_t count() { return data.size(); };
bool exist(u_char t) { return (data.find(t) != data.end()); };
string get(u_char t) { return data[t]; };
void put(u_char t, string& v) { data[t]=v; };
diff --git a/plugins/CryptoPP/cpp_svcs.cpp b/plugins/CryptoPP/cpp_svcs.cpp
index 2b99003a2a..e2a1dd9053 100644
--- a/plugins/CryptoPP/cpp_svcs.cpp
+++ b/plugins/CryptoPP/cpp_svcs.cpp
@@ -10,8 +10,7 @@ LPSTR __cdecl cpp_encrypt(pCNTX ptr, LPCSTR szPlainMsg)
pSIMDATA p = (pSIMDATA) ptr->pdata;
BYTE dataflag = 0;
- int clen,slen;
- slen = strlen(szPlainMsg);
+ size_t clen, slen = strlen(szPlainMsg);
LPSTR szMsg;
if (ptr->features & FEATURES_GZIP) {
@@ -69,7 +68,7 @@ LPSTR __cdecl cpp_decrypt(pCNTX ptr, LPCSTR szEncMsg)
ptr->error = ERROR_SEH;
pSIMDATA p = (pSIMDATA) ptr->pdata;
- int clen = strlen(szEncMsg);
+ size_t clen = strlen(szEncMsg);
if (ptr->features & FEATURES_BASE64)
ciphered = base64decode(szEncMsg,&clen);
diff --git a/plugins/CryptoPP/cryptopp.h b/plugins/CryptoPP/cryptopp.h
index 8648d7ba31..b2d3867f2c 100644
--- a/plugins/CryptoPP/cryptopp.h
+++ b/plugins/CryptoPP/cryptopp.h
@@ -168,8 +168,8 @@ extern HINSTANCE g_hInst;
pCNTX get_context_on_id(int);
pCNTX get_context_on_id(HANDLE);
void cpp_free_keys(pCNTX);
-BYTE *cpp_gzip(BYTE*,int,int&);
-BYTE *cpp_gunzip(BYTE*,int,int&);
+BYTE *cpp_gzip(BYTE*,size_t,size_t&);
+BYTE *cpp_gunzip(BYTE*,size_t,size_t&);
string cpp_zlibc(string&);
string cpp_zlibd(string&);
diff --git a/plugins/CyrTranslit/main.cpp b/plugins/CyrTranslit/main.cpp
index 6d9249733b..49761dc305 100644
--- a/plugins/CyrTranslit/main.cpp
+++ b/plugins/CyrTranslit/main.cpp
@@ -33,8 +33,7 @@ PLUGININFOEX pluginInfoEx={
PLG_COPYRIGHT,
PLG_HOMEPAGE,
PLG_FLAGS,
- PLG_REPLACESDEFMODULE,
- MIID_V_CYRTRANSLIT,
+ MIID_V_CYRTRANSLIT
};
//------------------------------------------------------------------------------
diff --git a/plugins/CyrTranslit/plugin.h b/plugins/CyrTranslit/plugin.h
index 48310a1a3a..866ec60bb8 100644
--- a/plugins/CyrTranslit/plugin.h
+++ b/plugins/CyrTranslit/plugin.h
@@ -57,7 +57,6 @@
#define PLG_COPYRIGHT "© 2005-2009 ValeraVi, Ivan Krechetov"
#define PLG_HOMEPAGE "http://www.vi-soft.com.ua"
#define PLG_FLAGS 0 /*UNICODE_AWARE, will be set dynamically*/
-#define PLG_REPLACESDEFMODULE 0 /*doesn't replace anything built-in*/
#define MIID_V_CYRTRANSLIT {0xbcec0bd7, 0xca59, 0x44b2, {0x9a, 0x14, 0x3a, 0x14, 0x98, 0x0f, 0x52, 0x4a}}
diff --git a/plugins/Db3x/init.cpp b/plugins/Db3x/init.cpp
index dfbb290b98..63f752beb6 100644
--- a/plugins/Db3x/init.cpp
+++ b/plugins/Db3x/init.cpp
@@ -37,7 +37,6 @@ static PLUGININFOEX pluginInfo = {
"Copyright 2000-2011 Miranda IM project",
"",
UNICODE_AWARE,
- DEFMOD_DB,
{0x1394a3ab, 0x2585, 0x4196, { 0x8f, 0x72, 0xe, 0xae, 0xc2, 0x45, 0xe, 0x11 }} //{1394A3AB-2585-4196-8F72-0EAEC2450E11}
};
diff --git a/plugins/Db3x_mmap/init.cpp b/plugins/Db3x_mmap/init.cpp
index 50beb170e3..dd9e9a36db 100644
--- a/plugins/Db3x_mmap/init.cpp
+++ b/plugins/Db3x_mmap/init.cpp
@@ -37,7 +37,6 @@ static PLUGININFOEX pluginInfo = {
"Copyright 2000-2011 Miranda IM project",
"",
UNICODE_AWARE,
- DEFMOD_DB,
{0xf7a6b27c, 0x9d9c, 0x4a42, { 0xbe, 0x86, 0xa4, 0x48, 0xae, 0x10, 0x91, 0x61 }} //{F7A6B27C-9D9C-4a42-BE86-A448AE109161}
};
diff --git a/plugins/Db_autobackups/main.cpp b/plugins/Db_autobackups/main.cpp
index 7107b167b9..c52b3ad199 100644
--- a/plugins/Db_autobackups/main.cpp
+++ b/plugins/Db_autobackups/main.cpp
@@ -20,8 +20,7 @@ PLUGININFOEX pluginInfo={
"chaos.persei@gmail.com",
__COPYRIGHTS,
"http://mods.mirandaim.ru/",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
// Generate your own unique id for your plugin.
// Do not use this UUID!
// Use uuidgen.exe to generate the uuuid
diff --git a/plugins/Dbx_mmap_SA/Import_SA/main.cpp b/plugins/Dbx_mmap_SA/Import_SA/main.cpp
index c86d29f6c6..2d0a4f5e26 100644
--- a/plugins/Dbx_mmap_SA/Import_SA/main.cpp
+++ b/plugins/Dbx_mmap_SA/Import_SA/main.cpp
@@ -56,8 +56,7 @@ PLUGININFOEX pluginInfo = {
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE,
- 0, //{2D77A746-00A6-4343-BFC5-F808CDD772EA}
+ UNICODE_AWARE, //{2D77A746-00A6-4343-BFC5-F808CDD772EA}
{0x2d77a746, 0xa6, 0x4343, { 0xbf, 0xc5, 0xf8, 0x8, 0xcd, 0xd7, 0x72, 0xea }}
};
diff --git a/plugins/Dbx_mmap_SA/init.cpp b/plugins/Dbx_mmap_SA/init.cpp
index 2517b3efab..30c1254c16 100644
--- a/plugins/Dbx_mmap_SA/init.cpp
+++ b/plugins/Dbx_mmap_SA/init.cpp
@@ -40,8 +40,7 @@ PLUGININFOEX pluginInfo = {
"Copyright 2000-2011 Miranda IM project, FYR, chaos.persei, induction, nullbie",
"http://dbmmapmod.googlecode.com/",
UNICODE_AWARE,
- DEFMOD_DB,
- // {28FF9B91-3E4D-4f1c-B47C-C641B037FF40}
+ // {28FF9B91-3E4D-4f1c-B47C-C641B037FF40}
{ 0x28ff9b91, 0x3e4d, 0x4f1c, { 0xb4, 0x7c, 0xc6, 0x41, 0xb0, 0x37, 0xff, 0x40 } }
};
diff --git a/plugins/Dbx_tree/init.cpp b/plugins/Dbx_tree/init.cpp
index 6844fa83c8..fc3c088146 100644
--- a/plugins/Dbx_tree/init.cpp
+++ b/plugins/Dbx_tree/init.cpp
@@ -42,8 +42,7 @@ static PLUGININFOEX gPluginInfoEx = {
gCopyright,
"http://www-user.tu-chemnitz.de/~kunmi/?dbx_tree&lang=en",
UNICODE_AWARE,
- DEFMOD_DB,
- gGUID
+ gGUID
};
extern "C" __declspec(dllexport) DATABASELINK* DatabasePluginInfo(void * Reserved)
diff --git a/plugins/ExtraIcons/extraicons.cpp b/plugins/ExtraIcons/extraicons.cpp
index dccfa023dc..8142e5f35b 100644
--- a/plugins/ExtraIcons/extraicons.cpp
+++ b/plugins/ExtraIcons/extraicons.cpp
@@ -30,8 +30,7 @@ PLUGININFOEX pluginInfo = {
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
{ 0x112f7d30, 0xcd19, 0x4c74, { 0xa0, 0x3b, 0xbf, 0xbb, 0x76, 0xb7, 0x5b, 0xc4 } } // {112F7D30-CD19-4c74-A03BBFBB76B75BC4}
};
diff --git a/plugins/FTPFileYM/ftpfile.cpp b/plugins/FTPFileYM/ftpfile.cpp
index 0bcac128cb..18ef6e7acf 100644
--- a/plugins/FTPFileYM/ftpfile.cpp
+++ b/plugins/FTPFileYM/ftpfile.cpp
@@ -64,8 +64,7 @@ static PLUGININFOEX pluginInfoEx =
"yaho@miranda-easy.net",
"Copyright © 2007-2010 Jan Holub",
"http://miranda-easy.net/mods.php",
- UNICODE_AWARE,
- 0,
+ UNICODE_AWARE,
MIID_FTPFILE
};
diff --git a/plugins/FavContacts/src/main.cpp b/plugins/FavContacts/src/main.cpp
index bd53299f63..d1bfd4ee2a 100644
--- a/plugins/FavContacts/src/main.cpp
+++ b/plugins/FavContacts/src/main.cpp
@@ -37,8 +37,7 @@ PLUGININFOEX pluginInfo = {
"nullbie@gmail.com",
"Copyright 2007-2009 Victor Pavlychko",
"http://nullbie.miranda.im/",
- UNICODE_AWARE,
- 0, // replace internal version (if any)
+ UNICODE_AWARE, // replace internal version (if any)
// {CE2C0401-F9E0-40d7-8E95-1A4197D7AB04}
{ 0xce2c0401, 0xf9e0, 0x40d7, { 0x8e, 0x95, 0x1a, 0x41, 0x97, 0xd7, 0xab, 0x4 } }
};
diff --git a/plugins/FileAsMessage/main.cpp b/plugins/FileAsMessage/main.cpp
index b797c53b9b..61dfdb512b 100644
--- a/plugins/FileAsMessage/main.cpp
+++ b/plugins/FileAsMessage/main.cpp
@@ -11,7 +11,6 @@ PLUGININFOEX pluginInfo =
"Copyright (c) 2004, Denis Stanishevskiy",
PLUGIN_URL,
UNICODE_AWARE,
- 0,
// {34B5A402-1B79-4246-B041-43D0B590AE2C}
{ 0x34b5a402, 0x1b79, 0x4246, { 0xb0, 0x41, 0x43, 0xd0, 0xb5, 0x90, 0xae, 0x2c } }
};
diff --git a/plugins/FingerPrintModPlus/src/fingerprint.cpp b/plugins/FingerPrintModPlus/src/fingerprint.cpp
index 7c447cedfe..3c6c035b07 100644
--- a/plugins/FingerPrintModPlus/src/fingerprint.cpp
+++ b/plugins/FingerPrintModPlus/src/fingerprint.cpp
@@ -114,7 +114,6 @@ PLUGININFOEX pluginInfoEx = {
__LEGAL_COPYRIGHT_STRING,
"http://code.google.com/p/fingerprintmod/",
UNICODE_AWARE,
- 0,
MIID_THIS_PLUGIN
};
diff --git a/plugins/FirstRun/main.cpp b/plugins/FirstRun/main.cpp
index d11d1da31f..cbe3b18f9d 100644
--- a/plugins/FirstRun/main.cpp
+++ b/plugins/FirstRun/main.cpp
@@ -14,12 +14,8 @@ PLUGININFOEX pluginInfo={
"yasnovidyashii@gmail.com",
"© 2008 Mikhail Yuriev",
"http://miranda-im.org/",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
- // Generate your own unique id for your plugin.
- // Do not use this UUID!
- // Use uuidgen.exe to generate the uuuid
- MIID_FIRSTRUN
+ UNICODE_AWARE,
+ MIID_FIRSTRUN
};
int ModulesLoaded(WPARAM wParam,LPARAM lParam)
diff --git a/plugins/FlashAvatars/cflash.cpp b/plugins/FlashAvatars/cflash.cpp
index d334dee339..a645972e08 100644
--- a/plugins/FlashAvatars/cflash.cpp
+++ b/plugins/FlashAvatars/cflash.cpp
@@ -43,7 +43,6 @@ PLUGININFOEX pluginInfo = {
"Copyright 2000-2009 Miranda-IM project",
"http://www.miranda-im.org",
UNICODE_AWARE,
- 0,
// {72765A6F-B017-42f1-B30F-5E0941273A3F}
{ 0x72765a6f, 0xb017, 0x42f1, { 0xb3, 0xf, 0x5e, 0x9, 0x41, 0x27, 0x3a, 0x3f } }
};
diff --git a/plugins/FloatingContacts/main.cpp b/plugins/FloatingContacts/main.cpp
index 3ba51d5111..f51e1f6d34 100644
--- a/plugins/FloatingContacts/main.cpp
+++ b/plugins/FloatingContacts/main.cpp
@@ -156,7 +156,6 @@ PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_FLTCONT
};
diff --git a/plugins/Folders/folders.cpp b/plugins/Folders/folders.cpp
index 419e5f8a10..867f3e8713 100644
--- a/plugins/Folders/folders.cpp
+++ b/plugins/Folders/folders.cpp
@@ -45,7 +45,6 @@ PLUGININFOEX pluginInfo = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
{0x2f129563, 0x2c7d, 0x4a9a, {0xb9, 0x48, 0x97, 0xdf, 0xcc, 0x0a, 0xfd, 0xd7}} //{2f129563-2c7d-4a9a-b948-97dfcc0afdd7}
}; //not used
diff --git a/plugins/FreeImage/Miranda/main.cpp b/plugins/FreeImage/Miranda/main.cpp
index 74bfd38a7b..70f60c02cc 100644
--- a/plugins/FreeImage/Miranda/main.cpp
+++ b/plugins/FreeImage/Miranda/main.cpp
@@ -55,7 +55,6 @@ static const PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
// {7C070F7C-459E-46b7-8E6D-BC6EFAA22F78}
{ 0x7c070f7c, 0x459e, 0x46b7, { 0x8e, 0x6d, 0xbc, 0x6e, 0xfa, 0xa2, 0x2f, 0x78 } }
};
diff --git a/plugins/Gender/main.cpp b/plugins/Gender/main.cpp
index 04069c9525..4b992cf007 100644
--- a/plugins/Gender/main.cpp
+++ b/plugins/Gender/main.cpp
@@ -57,8 +57,7 @@ sizeof(PLUGININFOEX),
"thief@miranda.im",
"2006-2011 Alexander Turyak",
"http://thief.miranda.im/",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
{0xfb1c17e0, 0x77fc, 0x45a7, {0x9c, 0x8b, 0xe2, 0xbe, 0xf4, 0xf5, 0x6b, 0x28}} /* FB1C17E0-77FC-45A7-9C8B-E2BEF4F56B28 */
};
diff --git a/plugins/HistoryLinkListPlus/linklist.cpp b/plugins/HistoryLinkListPlus/linklist.cpp
index 5d216ff7ce..6de2a4a1e9 100644
--- a/plugins/HistoryLinkListPlus/linklist.cpp
+++ b/plugins/HistoryLinkListPlus/linklist.cpp
@@ -34,9 +34,9 @@ PLUGININFOEX pluginInfo = {
"gureedo@gmail.com",
"© 2010-2011 gureedo",
"http://www.miranda-im.org",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
- { 0xDA0B09F5, 0x9C66, 0x488C, { 0xAE, 0x37, 0x8A, 0x5F, 0x19, 0x1C, 0x90, 0x79 } } // {DA0B09F5-9C66-488C-AE37-8A5F191C9079}
+ UNICODE_AWARE,
+ // {DA0B09F5-9C66-488C-AE37-8A5F191C9079}
+ { 0xDA0B09F5, 0x9C66, 0x488C, { 0xAE, 0x37, 0x8A, 0x5F, 0x19, 0x1C, 0x90, 0x79 } }
};
BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
diff --git a/plugins/HistorySweeperLight/main.cpp b/plugins/HistorySweeperLight/main.cpp
index f4c21b8b79..c6f8b427ac 100644
--- a/plugins/HistorySweeperLight/main.cpp
+++ b/plugins/HistorySweeperLight/main.cpp
@@ -39,7 +39,6 @@ static PLUGININFOEX pluginInfoEx =
"© 2002-2003 Sergey V. Gershovich a.k.a. Jazzy$, 2006-2009 Boris Krasnovskiy, 2010, 2011 tico-tico",
"",
UNICODE_AWARE,
- 0,
MIID_HISTORYSWEEPERLIGHT
};
diff --git a/plugins/IEView/ieview_main.cpp b/plugins/IEView/ieview_main.cpp
index 59b66d6cb5..1325e269b5 100644
--- a/plugins/IEView/ieview_main.cpp
+++ b/plugins/IEView/ieview_main.cpp
@@ -43,7 +43,6 @@ PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
{0x0495171b, 0x7137, 0x4ded, {0x97, 0xf8, 0xce, 0x6f, 0xed, 0x67, 0xd6, 0x91}}
};
diff --git a/plugins/IgnoreState/main.cpp b/plugins/IgnoreState/main.cpp
index 69840f4e3b..7f2407a84c 100644
--- a/plugins/IgnoreState/main.cpp
+++ b/plugins/IgnoreState/main.cpp
@@ -54,7 +54,6 @@ PLUGININFOEX pluginInfo={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
{0xa6872bcd, 0xf2a1, 0x41b8, {0xb2, 0xf1, 0xdd, 0x7c, 0xec, 0x05, 0x57, 0x34}}
// a6872bcd-f2a1-41b8-b2f1-dd7cec055734
};
diff --git a/plugins/Import/main.cpp b/plugins/Import/main.cpp
index 4818007477..65d139e5c5 100644
--- a/plugins/Import/main.cpp
+++ b/plugins/Import/main.cpp
@@ -59,8 +59,7 @@ PLUGININFOEX pluginInfo = {
"info@miranda-im.org",
"© 2000-2010 Martin Öberg, Richard Hughes, Dmitry Kuzkin, George Hazan",
"http://www.miranda-im.org",
- UNICODE_AWARE,
- 0, //{2D77A746-00A6-4343-BFC5-F808CDD772EA}
+ UNICODE_AWARE, //{2D77A746-00A6-4343-BFC5-F808CDD772EA}
{0x2d77a746, 0xa6, 0x4343, { 0xbf, 0xc5, 0xf8, 0x8, 0xcd, 0xd7, 0x72, 0xea }}
};
diff --git a/plugins/KeyboardNotify/main.cpp b/plugins/KeyboardNotify/main.cpp
index 6535acdfd8..e71fe8feab 100644
--- a/plugins/KeyboardNotify/main.cpp
+++ b/plugins/KeyboardNotify/main.cpp
@@ -315,8 +315,7 @@ PLUGININFOEX pluginInfo={
"tioduke@yahoo.ca",
"© 2002-2003 M.Öberg, 2004 Std, 2005-2008 TioDuke",
"http://addons.miranda-im.org/",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
MIID_KBDNOTIFY //{119D7288-2050-448d-9900-D86AC70426BF}
};
diff --git a/plugins/LangMan/main.cpp b/plugins/LangMan/main.cpp
index dad4afeac0..ea7f4f7354 100644
--- a/plugins/LangMan/main.cpp
+++ b/plugins/LangMan/main.cpp
@@ -37,7 +37,6 @@ static PLUGININFOEX pluginInfo = {
"© 2005-2007 H. Herkenrath",
PLUGIN_WEBSITE,
UNICODE_AWARE,
- 0,
// {D4BDD1EB-56F1-4a87-A187-67246EE919A2}
{0xd4bdd1eb, 0x56f1, 0x4a87, {0xa1, 0x87, 0x67, 0x24, 0x6e, 0xe9, 0x19, 0xa2}},
};
diff --git a/plugins/ListeningTo/listeningto.cpp b/plugins/ListeningTo/listeningto.cpp
index 2ce9c8ecc5..a1359bea59 100644
--- a/plugins/ListeningTo/listeningto.cpp
+++ b/plugins/ListeningTo/listeningto.cpp
@@ -45,8 +45,7 @@ PLUGININFOEX pluginInfo={
"",
"© 2006-2009 Ricardo Pescuma Domenecci",
"http://pescuma.org/miranda/listeningto",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
{ 0xf981f3f5, 0x35a, 0x444f, { 0x98, 0x92, 0xca, 0x72, 0x2c, 0x19, 0x5a, 0xda } } // {F981F3F5-035A-444f-9892-CA722C195ADA}
};
diff --git a/plugins/MenuItemEx/main.cpp b/plugins/MenuItemEx/main.cpp
index 0f3e2d4e27..78d1c6c0b9 100644
--- a/plugins/MenuItemEx/main.cpp
+++ b/plugins/MenuItemEx/main.cpp
@@ -97,16 +97,15 @@ static const ii[] = {
PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
- MODULENAME,
- __VERSION_DWORD,
- __DESC,
- __AUTHORS,
- __EMAIL,
- __COPYRIGHTS,
- __WEB __PLUGIN_ID_STR,
- UNICODE_AWARE,
- 0,
- MIID_MENUEX
+ MODULENAME,
+ __VERSION_DWORD,
+ __DESC,
+ __AUTHORS,
+ __EMAIL,
+ __COPYRIGHTS,
+ __WEB __PLUGIN_ID_STR,
+ UNICODE_AWARE,
+ MIID_MENUEX
};
struct ModSetLinkLinkItem { // code from dbe++ plugin by Bio
diff --git a/plugins/MetaContacts/meta_main.cpp b/plugins/MetaContacts/meta_main.cpp
index 4c7abebee2..1605ec6129 100644
--- a/plugins/MetaContacts/meta_main.cpp
+++ b/plugins/MetaContacts/meta_main.cpp
@@ -101,7 +101,6 @@ PLUGININFOEX pluginInfo={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
{ 0x4c4a27cf, 0x5e64, 0x4242, { 0xa3, 0x32, 0xb9, 0x8b, 0x8, 0x24, 0x3e, 0x89 } } // {4C4A27CF-5E64-4242-A332-B98B08243E89}
};
diff --git a/plugins/MirOTR/MirOTR/dllmain.cpp b/plugins/MirOTR/MirOTR/dllmain.cpp
index 0e7e818194..1428f248c7 100644
--- a/plugins/MirOTR/MirOTR/dllmain.cpp
+++ b/plugins/MirOTR/MirOTR/dllmain.cpp
@@ -21,8 +21,7 @@ PLUGININFOEX pluginInfo={
AUTHOR_MAIL,
LEGAL_COPYRIGHT_LONG,
HOMEPAGE,
- UNICODE_AWARE, // not transient
- 0, // doesn't replace anything built-in
+ UNICODE_AWARE,
MIID_OTRPLUGIN // ANSI and Unicode have different IDs
};
@@ -50,7 +49,7 @@ DLLFUNC PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
if(ServiceExists(MS_MC_GETPROTOCOLNAME))
g_metaproto = (char *)CallService(MS_MC_GETPROTOCOLNAME, 0, 0);
-
+
// DISABLED UPDATE CHECK FOR NOW
/*
if(ServiceExists(MS_UPDATE_REGISTER)) {
@@ -66,15 +65,15 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
update.szBetaChangelogURL = "http://code.google.com/p/mirotr/source/list";
update.szUpdateURL = UPDATER_AUTOREGISTER;
-
- // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
+
+ // these are the three lines that matter - the archive, the page containing the version string, and the text (or data)
// before the version that we use to locate it on the page
// (note that if the update URL and the version URL point to standard file listing entries, the backend xml
// data will be used to check for updates rather than the actual web page - this is not true for beta urls)
update.szBetaUpdateURL = "http://www.progandy.co.cc/mirotr/download.php"; // redirection script to current release on GoogleCode
update.szBetaVersionURL = "http://www.progandy.co.cc/mirotr/version.txt";
update.pbBetaVersionPrefix = "MirOTR version: ";
-
+
update.cpbBetaVersionPrefix = strlen(update.pbBetaVersionPrefix);
CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
@@ -86,7 +85,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
lib_cs_lock();
otr_user_state = otrl_userstate_create();
lib_cs_unlock();
-
+
// this calls ReadPrivkeyFiles (above) to set filename values (also called on ME_FOLDERS_PATH_CHANGED)
InitOptions();
@@ -107,7 +106,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
if (!options.bHaveSRMMIcons) {
MessageBox(0, _T("OTR Info"), _T("Your SRMM plugin does not support status icons. Not all OTR-functions are available!"), 0x30);
}
-
+
// HookEvent(ME_OPT_INITIALISE, OptInit);
// hook setting changed to monitor status
@@ -125,7 +124,7 @@ int NewContact(WPARAM wParam, LPARAM lParam) {
// add filter
HANDLE hContact = (HANDLE)wParam;
CallService( MS_PROTO_ADDTOCONTACT, ( WPARAM )hContact, ( LPARAM )MODULENAME );
-
+
return 0;
}
@@ -136,7 +135,7 @@ DLLFUNC int Load(void)
mir_getLP( &pluginInfo );
/* for timezones
mir_getTMI(&tmi); */
-
+
CallService(MS_DB_SETSETTINGRESIDENT, TRUE, (LPARAM)(MODULENAME "/TrustLevel"));
/////////////
@@ -151,12 +150,12 @@ DLLFUNC int Load(void)
if(DBGetContactSettingByte(0, MODULENAME, "FilterOrderFix", 0) != 2) {
HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
while ( hContact != NULL ) {
- CallService( MS_PROTO_REMOVEFROMCONTACT, ( WPARAM )hContact, ( LPARAM )MODULENAME );
+ CallService( MS_PROTO_REMOVEFROMCONTACT, ( WPARAM )hContact, ( LPARAM )MODULENAME );
hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
- }
+ }
DBWriteContactSettingByte(0, MODULENAME, "FilterOrderFix", 2);
}
-
+
// add us as a filter to all contacts
HANDLE hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDFIRST, 0, 0 );
char *proto;
@@ -165,21 +164,21 @@ DLLFUNC int Load(void)
// do not add filter to a chatoom
if ( !(proto && DBGetContactSettingByte(hContact, proto, "ChatRoom", 0)) )
- CallService( MS_PROTO_ADDTOCONTACT, ( WPARAM )hContact, ( LPARAM )MODULENAME );
+ CallService( MS_PROTO_ADDTOCONTACT, ( WPARAM )hContact, ( LPARAM )MODULENAME );
hContact = ( HANDLE )CallService( MS_DB_CONTACT_FINDNEXT,( WPARAM )hContact, 0 );
- }
+ }
HookEvent(ME_DB_CONTACT_ADDED, NewContact);
// create our services
CreateProtoServiceFunction(MODULENAME, PSS_MESSAGE, SVC_OTRSendMessage);
CreateProtoServiceFunction(MODULENAME, PSS_MESSAGE"W", SVC_OTRSendMessageW);
CreateProtoServiceFunction(MODULENAME, PSR_MESSAGE, SVC_OTRRecvMessage);
-
+
// hook modules loaded for updater support
HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
-
+
return 0;
}
diff --git a/plugins/ModernOpt/main.cpp b/plugins/ModernOpt/main.cpp
index 97d97aa77f..303f69f032 100644
--- a/plugins/ModernOpt/main.cpp
+++ b/plugins/ModernOpt/main.cpp
@@ -15,7 +15,6 @@ PLUGININFOEX pluginInfoEx = {
"é 2009 Victor Pavlychko, George Hazan",
"http://www.miranda-im.org",
UNICODE_AWARE,
- 0,
{ 0x621f886b, 0xa7f6, 0x457f, { 0x9d, 0x62, 0x8e, 0xe8, 0x4c, 0x27, 0x59, 0x93 }} // {621f886b-a7f6-457f-9d62-8ee84c275993}
};
diff --git a/plugins/NewAwaySysMod/AwaySys.cpp b/plugins/NewAwaySysMod/AwaySys.cpp
index 83c27a139d..5b87094143 100644
--- a/plugins/NewAwaySysMod/AwaySys.cpp
+++ b/plugins/NewAwaySysMod/AwaySys.cpp
@@ -91,7 +91,6 @@ PLUGININFOEX pluginInfo = {
"© 2010 NightFox; © 2005-2007 Chervov Dmitry; © 2004-2005 Iksaif; © 2002-2003 Goblineye Entertainment",
"http://MyiEd.org/packs",
UNICODE_AWARE,
- DEFMOD_SRAWAY, // mwawawawa.
{0xb2dd9270, 0xce5e, 0x11df, {0xbd, 0x3d, 0x8, 0x0, 0x20, 0xc, 0x9a, 0x66}}
};
@@ -978,17 +977,9 @@ int MirandaLoaded(WPARAM wParam, LPARAM lParam)
update.szComponentName = pluginInfo.shortName;
update.pbVersion = (BYTE*)CreateVersionString(my_make_version(PRODUCTVER), szVersion);
update.cpbVersion = strlen((char*)update.pbVersion);
- update.szUpdateURL = "http://myied.org/packs/NAS"
-
- "W"
-
- ".zip";
+ update.szUpdateURL = "http://myied.org/packs/NASW.zip";
update.szVersionURL = "http://myied.org/packs/NAS/updaterinfo.php";
- update.pbVersionPrefix = (BYTE*)"New Away System Mod"
-
- " Unicode"
-
- " version ";
+ update.pbVersionPrefix = (BYTE*)"New Away System Mod";
update.cpbVersionPrefix = strlen((char*)update.pbVersionPrefix);
CallService(MS_UPDATE_REGISTER, 0, (WPARAM)&update);
diff --git a/plugins/NewEventNotify/main.cpp b/plugins/NewEventNotify/main.cpp
index db28bf7fa0..3cf67e39b6 100644
--- a/plugins/NewEventNotify/main.cpp
+++ b/plugins/NewEventNotify/main.cpp
@@ -46,7 +46,6 @@ PLUGININFOEX pluginInfo = {
"GNU GPL",
"http://addons.miranda-im.org/details.php?action=viewfile&id=3637",
UNICODE_AWARE,
- 0,
{0x3503D584, 0x6234, 0x4BEF, {0xA5, 0x53, 0x6C, 0x1B, 0x9C, 0xD4, 0x71, 0xF2 } } // {3503D584-6234-4BEF-A553-6C1B9CD471F2}
};
diff --git a/plugins/NewXstatusNotify/main.cpp b/plugins/NewXstatusNotify/main.cpp
index 1500d75401..1837bd03f9 100644
--- a/plugins/NewXstatusNotify/main.cpp
+++ b/plugins/NewXstatusNotify/main.cpp
@@ -55,7 +55,6 @@ PLUGININFOEX pluginInfoEx = {
"© 2001-2004 Luca Santarelli, 2005-2007 Vasilich, 2007-2011 yaho",
"http://miranda-easy.net/mods.php",
UNICODE_AWARE,
- DEFMOD_RNDUSERONLINE,
MIID_NXSN
};
diff --git a/plugins/Nudge/main.cpp b/plugins/Nudge/main.cpp
index 1bb2e5b876..dd6912bf6f 100644
--- a/plugins/Nudge/main.cpp
+++ b/plugins/Nudge/main.cpp
@@ -30,8 +30,7 @@ PLUGININFOEX pluginInfo={
"francois.mean@skynet.be, Sylvain.gougouzian@gmail.com, wishmaster51@googlemail.com",
"copyright to the miranda community",
"http://addons.miranda-im.org/", // www
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
{ 0xe47cc215, 0xd28, 0x462d, { 0xa0, 0xf6, 0x3a, 0xe4, 0x44, 0x3d, 0x29, 0x26 } } // {E47CC215-0D28-462D-A0F6-3AE4443D2926}
};
diff --git a/plugins/PackUpdater/Src/PackUpdater.cpp b/plugins/PackUpdater/Src/PackUpdater.cpp
index 203f30d050..1d58853c1c 100644
--- a/plugins/PackUpdater/Src/PackUpdater.cpp
+++ b/plugins/PackUpdater/Src/PackUpdater.cpp
@@ -35,7 +35,6 @@ PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
//{29517BE5-779A-48e5-8950-CB4DE1D43172}
{0x29517be5, 0x779a, 0x48e5, {0x89, 0x50, 0xcb, 0x4d, 0xe1, 0xd4, 0x31, 0x72}}
};
diff --git a/plugins/Popup/src/config.cpp b/plugins/Popup/src/config.cpp
index dd3c683c13..e7908f1099 100644
--- a/plugins/Popup/src/config.cpp
+++ b/plugins/Popup/src/config.cpp
@@ -68,7 +68,6 @@ PLUGININFOEX pluginInfoEx =
POPUP_COPYRIGHT,
POPUP_WEBPAGE,
UNICODE_AWARE,
- 0,
POPUP_UUID
};
diff --git a/plugins/ProfileManager/pmanagerEx.cpp b/plugins/ProfileManager/pmanagerEx.cpp
index 627b026b2d..be6bfb8c0f 100644
--- a/plugins/ProfileManager/pmanagerEx.cpp
+++ b/plugins/ProfileManager/pmanagerEx.cpp
@@ -36,13 +36,8 @@ PLUGININFOEX pluginInfo={
"woobind@ukr.net",
"© 2008 - 2010 Roman Gemini",
"http://code.google.com/p/alfamar/",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
- // Generate your own unique id for your plugin.
- // Do not use this UUID!
- // Use uuidgen.exe to generate the uuuid
+ UNICODE_AWARE,
{0x7eeeb55e, 0x9d83, 0x4e1a, { 0xa1, 0x2f, 0x8f, 0x13, 0xf1, 0xa1, 0x24, 0xfb } }
-
};
extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion)
diff --git a/plugins/QuickMessages/main.cpp b/plugins/QuickMessages/main.cpp
index 536512c8ea..d0a4070cf7 100644
--- a/plugins/QuickMessages/main.cpp
+++ b/plugins/QuickMessages/main.cpp
@@ -47,7 +47,6 @@ PLUGININFOEX pluginInfo = {
"© 2008 Danil Mozhar",
"http://miranda.radicaled.ru/index.php?plugin=3",
UNICODE_AWARE,
- 0,
// {37ED754B-6CF9-40ed-9EB6-0FEF8E822475}
{ 0x37ed754b, 0x6cf9, 0x40ed, { 0x9e, 0xb6, 0xf, 0xef, 0x8e, 0x82, 0x24, 0x75 } }
};
diff --git a/plugins/QuickReplies/quickreplies.cpp b/plugins/QuickReplies/quickreplies.cpp
index af850c4b82..063ef0c8d3 100644
--- a/plugins/QuickReplies/quickreplies.cpp
+++ b/plugins/QuickReplies/quickreplies.cpp
@@ -35,7 +35,6 @@ PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
// {A6A031B6-D32F-4842-98C6-EC716C576B77}
{0xa6a031b6, 0xd32f, 0x4842, {0x98, 0xc6, 0xec, 0x71, 0x6c, 0x57, 0x6b, 0x77}}
};
diff --git a/plugins/Rate/main.cpp b/plugins/Rate/main.cpp
index 760d324b84..1c4c9816a5 100644
--- a/plugins/Rate/main.cpp
+++ b/plugins/Rate/main.cpp
@@ -68,11 +68,9 @@ PLUGININFOEX pluginInfo={
"kostia@ngs.ru",
"© 2006-2009 Kostia Romanov, based on AuthState by Alexander Turyak",
"http://kildor.miranda.im/",
- UNICODE_AWARE, // is not unicode
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
+ // 45230488-977b-405b-856d-ea276d7083b7
{0x45230488, 0x977b, 0x405b, {0x85, 0x6d, 0xea, 0x27, 0x6d, 0x70, 0x83, 0xb7}}
-/* 45230488-977b-405b-856d-ea276d7083b7 */
-
};
extern "C" BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
diff --git a/plugins/RecentContacts/RecentContacts.cpp b/plugins/RecentContacts/RecentContacts.cpp
index ccea08b33b..b2dfc76e9e 100644
--- a/plugins/RecentContacts/RecentContacts.cpp
+++ b/plugins/RecentContacts/RecentContacts.cpp
@@ -45,8 +45,7 @@ PLUGININFOEX pluginInfo =
"kostia@ngs.ru",
"© 2005 ValeraVi, © 2009 Kildor",
"http://kildor.miranda.im",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
{ 0x0e5f3b9d, 0xebcd, 0x44d7, {0x93, 0x74, 0xd8, 0xe5, 0xd8, 0x8d, 0xf4, 0xe3}}
/* 0e5f3b9d-ebcd-44d7-9374-d8e5d88df4e3 */
};
diff --git a/plugins/SRMM/srmm.cpp b/plugins/SRMM/srmm.cpp
index 9fa71527ff..124798e1b9 100644
--- a/plugins/SRMM/srmm.cpp
+++ b/plugins/SRMM/srmm.cpp
@@ -38,7 +38,6 @@ PLUGININFOEX pluginInfo = {
"Copyright 2000-2012 Miranda IM project",
"http://www.miranda-im.org",
UNICODE_AWARE,
- DEFMOD_SRMESSAGE, // replace internal version (if any)
{0x657fe89b, 0xd121, 0x40c2, { 0x8a, 0xc9, 0xb9, 0xfa, 0x57, 0x55, 0xb3, 0xc }} //{657FE89B-D121-40c2-8AC9-B9FA5755B30C}
};
diff --git a/plugins/Scriver/srmm.cpp b/plugins/Scriver/srmm.cpp
index ef02512975..bc645704d1 100644
--- a/plugins/Scriver/srmm.cpp
+++ b/plugins/Scriver/srmm.cpp
@@ -43,7 +43,6 @@ PLUGININFOEX pluginInfo = {
"Copyright (c) 2000-2012 Miranda IM Project",
"http://www.miranda-im.org",
UNICODE_AWARE,
- DEFMOD_SRMESSAGE, // replace internal version (if any)
{0x84636f78, 0x2057, 0x4302, { 0x8a, 0x65, 0x23, 0xa1, 0x6d, 0x46, 0x84, 0x4c }} //{84636F78-2057-4302-8A65-23A16D46844C}
};
diff --git a/plugins/SecureIM/commonheaders.cpp b/plugins/SecureIM/commonheaders.cpp
index 3838adbc76..d9d681dc10 100644
--- a/plugins/SecureIM/commonheaders.cpp
+++ b/plugins/SecureIM/commonheaders.cpp
@@ -35,7 +35,7 @@ PLUGININFOEX pluginInfoEx = {
"Johell@ifrance.com, baloo@bk.ru",
"© 2003 Johell, © 2005-09 Baloo",
"http://addons.miranda-im.org/details.php?action=viewfile&id=2445",
- 0, 0,
+ 0,
MIID_SECUREIM
};
diff --git a/plugins/SeenPlugin/main.cpp b/plugins/SeenPlugin/main.cpp
index 6acf22cff0..afc7f6822e 100644
--- a/plugins/SeenPlugin/main.cpp
+++ b/plugins/SeenPlugin/main.cpp
@@ -39,7 +39,6 @@ PLUGININFOEX pluginInfo={
"© 2001-2002 Heiko Schillinger, 2003 modified by Bruno Rino, 2005-7 Modified by YB",
"http://forums.miranda-im.org/showthread.php?t=2822",
UNICODE_AWARE,
- 0,
{ 0x2d506d46,0xc94e,0x4ef8,{0x85, 0x37, 0xf1, 0x12, 0x33, 0xa8, 0x03, 0x81}}/* 2d506d46-c94e-4ef8-8537-f11233a80381 */
};
diff --git a/plugins/SendScreenshotPlus/Main.cpp b/plugins/SendScreenshotPlus/Main.cpp
index f2a355a524..66a9b074e1 100644
--- a/plugins/SendScreenshotPlus/Main.cpp
+++ b/plugins/SendScreenshotPlus/Main.cpp
@@ -53,8 +53,7 @@ PLUGININFOEX pluginInfo={
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
MIID_PLUGIN
};
diff --git a/plugins/Sessions/Src/Main.cpp b/plugins/Sessions/Src/Main.cpp
index f6c1b8936a..c5935ce722 100644
--- a/plugins/Sessions/Src/Main.cpp
+++ b/plugins/Sessions/Src/Main.cpp
@@ -72,7 +72,6 @@ PLUGININFOEX pluginInfo = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
// {60558872-2AAB-45aa-888D-097691C9B683}
{ 0x60558872, 0x2aab, 0x45aa, { 0x88, 0x8d, 0x9, 0x76, 0x91, 0xc9, 0xb6, 0x83 } }
};
diff --git a/plugins/SimpleAR/Src/Main.cpp b/plugins/SimpleAR/Src/Main.cpp
index 8ec4bc4550..62c5a34ce6 100644
--- a/plugins/SimpleAR/Src/Main.cpp
+++ b/plugins/SimpleAR/Src/Main.cpp
@@ -44,7 +44,6 @@ PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
// {46BF191F-8DFB-4656-88B2-4C20BE4CFA44}
{0x46bf191f, 0x8dfb, 0x4656, { 0x88, 0xb2, 0x4c, 0x20, 0xbe, 0x4c, 0xfa, 0x44}}
};
diff --git a/plugins/SimpleStatusMsg/main.cpp b/plugins/SimpleStatusMsg/main.cpp
index 07b8029842..53abdacbbb 100644
--- a/plugins/SimpleStatusMsg/main.cpp
+++ b/plugins/SimpleStatusMsg/main.cpp
@@ -43,7 +43,6 @@ PLUGININFOEX pluginInfo = {
"© 2006-2011 Bartosz Bia³ek, © 2005 Harven",
"http://code.google.com/p/dezeath",
UNICODE_AWARE,
- DEFMOD_SRAWAY,
// {768CE156-34AC-45a3-B53B-0083C47615C4}
{ 0x768ce156, 0x34ac, 0x45a3, { 0xb5, 0x3b, 0x0, 0x83, 0xc4, 0x76, 0x15, 0xc4 } }
};
diff --git a/plugins/SmileyAdd/main.cpp b/plugins/SmileyAdd/main.cpp
index 011bfbebeb..55e4542490 100644
--- a/plugins/SmileyAdd/main.cpp
+++ b/plugins/SmileyAdd/main.cpp
@@ -53,8 +53,7 @@ static const PLUGININFOEX pluginInfoEx =
"Copyright© 2004 - 2012 Boris Krasnovskiy, portions by Rein-Peter de Boer",
"http://code.google.com/p/mirandaimplugins/downloads/list",
// "http://addons.miranda-im.org/index.php?action=display&id=2152",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
// {BD542BB4-5AE4-4d0e-A435-BA8DBE39607F}
{ 0xbd542bb4, 0x5ae4, 0x4d0e, { 0xa4, 0x35, 0xba, 0x8d, 0xbe, 0x39, 0x60, 0x7f } }
};
diff --git a/plugins/SpellChecker/spellchecker.cpp b/plugins/SpellChecker/spellchecker.cpp
index 70154652c0..ad6be60855 100644
--- a/plugins/SpellChecker/spellchecker.cpp
+++ b/plugins/SpellChecker/spellchecker.cpp
@@ -33,7 +33,6 @@ PLUGININFOEX pluginInfo={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0, //doesn't replace anything built-in
{ 0x36753ae3, 0x840b, 0x4797, { 0x94, 0xa5, 0xfd, 0x9f, 0x58, 0x52, 0xb9, 0x42 } } // {36753AE3-840B-4797-94A5-FD9F5852B942}
};
@@ -1691,14 +1690,12 @@ void AddMenuForWord(Dialog *dlg, TCHAR *word, CHARRANGE &pos, HMENU hMenu, BOOL
data.hReplaceSubMenu = CreatePopupMenu();
- InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION,
- base + AUTOREPLACE_MENU_ID_BASE + suggestions.count, TranslateT("Other..."));
+ InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION, base + AUTOREPLACE_MENU_ID_BASE + suggestions.count, TranslateT("Other..."));
if (suggestions.count > 0)
{
InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION | MF_SEPARATOR, 0, 0);
for (int i = suggestions.count - 1; i >= 0; i--)
- InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION,
- base + AUTOREPLACE_MENU_ID_BASE + i, suggestions.words[i]);
+ InsertMenu(data.hReplaceSubMenu, 0, MF_BYPOSITION, base + AUTOREPLACE_MENU_ID_BASE + i, suggestions.words[i]);
}
AppendSubmenu(hMenu, data.hReplaceSubMenu, TranslateT("Always replace with"));
diff --git a/plugins/SplashScreen/src/main.cpp b/plugins/SplashScreen/src/main.cpp
index 2726801b12..1de4036d42 100644
--- a/plugins/SplashScreen/src/main.cpp
+++ b/plugins/SplashScreen/src/main.cpp
@@ -64,7 +64,6 @@ PLUGININFOEX pluginInfo={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_SPLASHSCREEN
};
diff --git a/plugins/StatusPlugins/AdvancedAutoAway/main.cpp b/plugins/StatusPlugins/AdvancedAutoAway/main.cpp
index f2e357e853..f640369607 100644
--- a/plugins/StatusPlugins/AdvancedAutoAway/main.cpp
+++ b/plugins/StatusPlugins/AdvancedAutoAway/main.cpp
@@ -59,7 +59,6 @@ PLUGININFOEX pluginInfoEx={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_ADVAUTOAWAY
};
diff --git a/plugins/StatusPlugins/KeepStatus/main.cpp b/plugins/StatusPlugins/KeepStatus/main.cpp
index 4cd57cbd31..8766d489b3 100644
--- a/plugins/StatusPlugins/KeepStatus/main.cpp
+++ b/plugins/StatusPlugins/KeepStatus/main.cpp
@@ -59,7 +59,6 @@ PLUGININFOEX pluginInfoEx={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_KEEPSTATUS
};
diff --git a/plugins/StatusPlugins/StartupStatus/main.cpp b/plugins/StatusPlugins/StartupStatus/main.cpp
index 3e2e9fdeb4..87803c7665 100644
--- a/plugins/StatusPlugins/StartupStatus/main.cpp
+++ b/plugins/StatusPlugins/StartupStatus/main.cpp
@@ -57,7 +57,6 @@ PLUGININFOEX pluginInfoEx={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_STARTUPSTATUS
};
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index 6b4f827e16..72d5e175c6 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -19,7 +19,6 @@ PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_STOPSPAM
};
diff --git a/plugins/Svc_crshdmp/crshdmp.cpp b/plugins/Svc_crshdmp/crshdmp.cpp
index 91a245d972..18b9f230da 100644
--- a/plugins/Svc_crshdmp/crshdmp.cpp
+++ b/plugins/Svc_crshdmp/crshdmp.cpp
@@ -51,8 +51,7 @@ static const PLUGININFOEX pluginInfoEx =
"borkra@miranda-im.org",
"Copyright© 2008 - 2012 Boris Krasnovskiy All Rights Reserved",
"http://code.google.com/p/mirandaimplugins/downloads/list",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
// {F62C1D7A-FFA4-4065-A251-4C9DD9101CC8}
{ 0xf62c1d7a, 0xffa4, 0x4065, { 0xa2, 0x51, 0x4c, 0x9d, 0xd9, 0x10, 0x1c, 0xc8 } }
};
diff --git a/plugins/Svc_dbepp/main.cpp b/plugins/Svc_dbepp/main.cpp
index 3356556b23..358ff1a5d5 100644
--- a/plugins/Svc_dbepp/main.cpp
+++ b/plugins/Svc_dbepp/main.cpp
@@ -32,7 +32,6 @@ PLUGININFOEX pluginInfoEx={
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_DBEDITOR
};
diff --git a/plugins/Svc_vi/main.cpp b/plugins/Svc_vi/main.cpp
index c378d56106..e875f55750 100644
--- a/plugins/Svc_vi/main.cpp
+++ b/plugins/Svc_vi/main.cpp
@@ -59,9 +59,9 @@ PLUGININFOEX pluginInfo={
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- 1, //not transient
- 0,
- {0x2f174488, 0x489c, 0x4fe1, {0x94, 0x0d, 0x59, 0x6c, 0xf0, 0xf3, 0x5e, 0x65}} //{2f174488-489c-4fe1-940d-596cf0f35e65}
+ UNICODE_AWARE,
+ // {2f174488-489c-4fe1-940d-596cf0f35e65}
+ {0x2f174488, 0x489c, 0x4fe1, {0x94, 0x0d, 0x59, 0x6c, 0xf0, 0xf3, 0x5e, 0x65}}
};
static const MUUID interfaces[] = {MIID_VERSIONINFO, MIID_SERVICEMODE, MIID_LAST};
diff --git a/plugins/TabSRMM/src/srmm.cpp b/plugins/TabSRMM/src/srmm.cpp
index 877734f49f..b8cfaefdd9 100644
--- a/plugins/TabSRMM/src/srmm.cpp
+++ b/plugins/TabSRMM/src/srmm.cpp
@@ -65,7 +65,6 @@ PLUGININFOEX pluginInfo = {
"2000-2010 Miranda Project and contributors. See readme.txt for more.",
"http://miranda.or.at",
UNICODE_AWARE,
- DEFMOD_SRMESSAGE, // replace internal version (if any)
{0x6ca5f042, 0x7a7f, 0x47cc, { 0xa7, 0x15, 0xfc, 0x8c, 0x46, 0xfb, 0xf4, 0x34 }} //{6CA5F042-7A7F-47cc-A715-FC8C46FBF434}
};
diff --git a/plugins/TipperYM/tipper.cpp b/plugins/TipperYM/tipper.cpp
index a9427fd24a..0547a1b32d 100644
--- a/plugins/TipperYM/tipper.cpp
+++ b/plugins/TipperYM/tipper.cpp
@@ -57,8 +57,7 @@ PLUGININFOEX pluginInfoEx =
"yaho@miranda-easy.net",
"© 2005-2007 Scott Ellis, 2007-2011 Jan Holub",
"http://miranda-easy.net/mods.php",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
MIID_TIPPER
};
diff --git a/plugins/TooltipNotify/src/main.cpp b/plugins/TooltipNotify/src/main.cpp
index a554819998..ccb3fb128c 100644
--- a/plugins/TooltipNotify/src/main.cpp
+++ b/plugins/TooltipNotify/src/main.cpp
@@ -80,8 +80,7 @@ static PLUGININFOEX sPluginInfo =
"perf@mail333.com",
"© 2004-2008 Gneedah software",
"http://addons.miranda-im.org/details.php?action=viewfile&id=1290",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
MIID_TOOLTIPNOTIFY_UNICODE
};
diff --git a/plugins/TopToolBar/main.cpp b/plugins/TopToolBar/main.cpp
index b806c2858c..2bd283bcfc 100644
--- a/plugins/TopToolBar/main.cpp
+++ b/plugins/TopToolBar/main.cpp
@@ -29,8 +29,7 @@ PLUGININFOEX pluginInfo =
__PLUGIN_EMAIL,
__PLUGIN_RIGHTS,
__PLUGIN_AUTHORWEB,
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
MIID_TTB
};
diff --git a/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp b/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp
index b97a73dd81..bc1d41f08d 100644
--- a/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp
+++ b/plugins/TranslitSwitcher/Src/TranslitSwitcher.cpp
@@ -34,7 +34,6 @@ PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
MIID_TS
};
diff --git a/plugins/Updater/updater.cpp b/plugins/Updater/updater.cpp
index 906296713b..2d5ac9cc55 100644
--- a/plugins/Updater/updater.cpp
+++ b/plugins/Updater/updater.cpp
@@ -24,8 +24,7 @@ PLUGININFOEX pluginInfo={
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
{ 0x66dceb80, 0x384, 0x4507, { 0x97, 0x74, 0xcc, 0x20, 0xa7, 0xef, 0x1d, 0x6d } } // {66DCEB80-0384-4507-9774-CC20A7EF1D6D}
};
@@ -70,7 +69,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
LoadOptions();
InitOptionsMenuItems();
-
+
InitNetlib();
InitPopups();
@@ -105,7 +104,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
update.cpbVersion = (int)strlen((char *)update.pbVersion);
update.szBetaChangelogURL = "https://server.scottellis.com.au/wsvn/mim_plugs/updater/?op=log&rev=0&sc=0&isdir=1";
-
+
#ifdef REGISTER_AUTO
@@ -140,7 +139,7 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
hEventIdleChanged = HookEvent(ME_IDLE_CHANGED, IdleChanged);
- if (ServiceExists(MS_TRIGGER_REGISTERACTION))
+ if (ServiceExists(MS_TRIGGER_REGISTERACTION))
{
// create update action for triggerplugin
ACTIONREGISTER ar = {0};
@@ -160,19 +159,19 @@ int ModulesLoaded(WPARAM wParam, LPARAM lParam) {
shk.pszName = "Update";
shk.pszService = MS_UPDATE_CHECKFORUPDATES;
shk.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'U') | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&shk);
+ Hotkey_Register(&shk);
shk.pszDescription = LPGEN("Restart");
shk.pszName = "Restart";
shk.pszService = MS_UPDATE_MENURESTART;
shk.DefHotKey = HOTKEYCODE(HOTKEYF_ALT, 'R') | HKF_MIRANDA_LOCAL;
- Hotkey_Register(&shk);
+ Hotkey_Register(&shk);
shk.pszDescription = LPGEN("Update and Exit");
shk.pszName = "UpdateAndExit";
shk.pszService = MS_UPDATE_MENUUPDATEANDEXIT;
shk.DefHotKey = 0;
- Hotkey_Register(&shk);
+ Hotkey_Register(&shk);
return 0;
}
@@ -218,10 +217,10 @@ extern "C" int __declspec(dllexport) Load(void)
// save global status from clist - will be restored after update check if that option is enabled, or in modules loaded if not
options.start_offline = (DBGetContactSettingByte(0, MODULE, "StartOffline", 0) == 1); // load option here - rest loading in modulesloaded
- if (options.start_offline)
+ if (options.start_offline)
{
WORD saved_status = DBGetContactSettingWord(0, "CList", "Status", ID_STATUS_OFFLINE);
- if (saved_status != ID_STATUS_OFFLINE)
+ if (saved_status != ID_STATUS_OFFLINE)
{
DBWriteContactSettingWord(0, MODULE, "SavedGlobalStatus", saved_status);
DBWriteContactSettingWord(0, "CList", "Status", ID_STATUS_OFFLINE);
@@ -229,7 +228,7 @@ extern "C" int __declspec(dllexport) Load(void)
}
hEventOptInit = HookEvent(ME_OPT_INITIALISE, OptInit);
- hEventModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
+ hEventModulesLoaded = HookEvent(ME_SYSTEM_MODULESLOADED, ModulesLoaded);
hToolBarLoaded = HookEvent(ME_TB_MODULELOADED, ToolbarModulesLoaded);
InitServices();
diff --git a/plugins/UserGuide/main.cpp b/plugins/UserGuide/main.cpp
index 3cb391cee1..9a31def815 100644
--- a/plugins/UserGuide/main.cpp
+++ b/plugins/UserGuide/main.cpp
@@ -14,12 +14,8 @@ PLUGININFOEX pluginInfo={
"yasnovidyashii@gmail.com",
"© 2009 Mikhail Yuriev",
"http://miranda-im.org/",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
- // Generate your own unique id for your plugin.
- // Do not use this UUID!
- // Use uuidgen.exe to generate the uuuid
- MIID_USERGUIDE
+ UNICODE_AWARE,
+ MIID_USERGUIDE
};
static INT_PTR ShowGuideFile(WPARAM wParam,LPARAM lParam)
diff --git a/plugins/UserInfoEx/init.cpp b/plugins/UserInfoEx/init.cpp
index b7a757be19..95153823c1 100644
--- a/plugins/UserInfoEx/init.cpp
+++ b/plugins/UserInfoEx/init.cpp
@@ -62,7 +62,6 @@ static PLUGININFOEX pluginInfo = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- DEFMOD_UIUSERINFO,
MIID_UIUSERINFOEX
};
diff --git a/plugins/UserInfoEx/svc_email.cpp b/plugins/UserInfoEx/svc_email.cpp
index d1a8ba02d6..3e11ddb763 100644
--- a/plugins/UserInfoEx/svc_email.cpp
+++ b/plugins/UserInfoEx/svc_email.cpp
@@ -386,12 +386,7 @@ VOID SvcEMailOnModulesLoaded()
**/
VOID SvcEMailLoadModule()
{
- if (DB::Setting::GetByte(SET_EXTENDED_EMAILSERVICE, TRUE))
- {
- // prevent default email module from loading
- PINT_PTR disableDefaultModule = (PINT_PTR)CallService(MS_PLUGINS_GETDISABLEDEFAULTARRAY, 0, 0);
- disableDefaultModule[DEFMOD_SREMAIL] = TRUE;
-
+ if (DB::Setting::GetByte(SET_EXTENDED_EMAILSERVICE, TRUE)) {
// create own email send command
if (!myDestroyServiceFunction(MS_EMAIL_SENDEMAIL))
myCreateServiceFunction(MS_EMAIL_SENDEMAIL, MenuCommand);
diff --git a/plugins/Variables/main.cpp b/plugins/Variables/main.cpp
index fc0d49147a..0335e7ae38 100644
--- a/plugins/Variables/main.cpp
+++ b/plugins/Variables/main.cpp
@@ -65,7 +65,6 @@ PLUGININFOEX pluginInfoEx = {
"© 2003-2008 P. Boon, Ricardo Pescuma, George Hazan",
"http://www.miranda-im.org/",
UNICODE_AWARE,
- 0,
MIID_VARIABLES
};
diff --git a/plugins/Variables/variables.cpp b/plugins/Variables/variables.cpp
index 9a451fb671..258725055f 100644
--- a/plugins/Variables/variables.cpp
+++ b/plugins/Variables/variables.cpp
@@ -377,9 +377,7 @@ static TCHAR* replaceDynVars(TCHAR* szTemplate, FORMATINFO* fi)
MoveMemory(scur + parsedTokenLen, cur, (_tcslen(cur)+1)*sizeof(TCHAR));
CopyMemory(scur, parsedToken, parsedTokenLen*sizeof(TCHAR));
{
- int len;
-
- len = _tcslen(string);
+ size_t len = _tcslen(string);
string = (TCHAR*)mir_realloc(string, (len+1)*sizeof(TCHAR));
}
if (( ai.flags & AIF_DONTPARSE ) || tmpVarPos >= 0)
diff --git a/plugins/W7UI/main.cpp b/plugins/W7UI/main.cpp
index 7f48f93070..ef95d4238e 100644
--- a/plugins/W7UI/main.cpp
+++ b/plugins/W7UI/main.cpp
@@ -42,8 +42,7 @@ PLUGININFOEX pluginInfo = {
"nullbie@miranda.im",
"2009 Victor Pavlychko, Vitaliy Igonin",
"http://nullbie.miranda.im",
- UNICODE_AWARE,
- 0, // replace internal version (if any)
+ UNICODE_AWARE, // replace internal version (if any)
// {D38EEB0B-B8EE-4177-B9E5-91EBE101E054}
{ 0xd38eeb0b, 0xb8ee, 0x4177, { 0xb9, 0xe5, 0x91, 0xeb, 0xe1, 0x1, 0xe0, 0x54 } }
};
diff --git a/plugins/WhenWasIt/WhenWasIt.cpp b/plugins/WhenWasIt/WhenWasIt.cpp
index 1f30d31cfe..c2eb1b3fb8 100644
--- a/plugins/WhenWasIt/WhenWasIt.cpp
+++ b/plugins/WhenWasIt/WhenWasIt.cpp
@@ -41,7 +41,6 @@ PLUGININFOEX pluginInfo = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
{0x2ff96c84, 0xb0b5, 0x470e, {0xbb, 0xf9, 0x90, 0x7b, 0x9f, 0x3f, 0x5d, 0x2f}} //{2ff96c84-b0b5-470e-bbf9-907b9f3f5d2f}
};
diff --git a/plugins/WhoUsesMyFiles/wumfplug.c b/plugins/WhoUsesMyFiles/wumfplug.c
index bcb7fd122f..568917f031 100644
--- a/plugins/WhoUsesMyFiles/wumfplug.c
+++ b/plugins/WhoUsesMyFiles/wumfplug.c
@@ -20,7 +20,6 @@ static PLUGININFOEX pluginInfo = {
"© 2003 Nike. Freeware. Please mail me all bugs & your suggestions.",
"http://miranda-im.org",
UNICODE_AWARE,
- 0,
// {80DCA515-973A-4A7E-8B85-5D8EC88FC5A7}
{ 0x80dca515, 0x973a, 0x4a7e, { 0x8b, 0x85, 0x5d, 0x8e, 0xc8, 0x8f, 0xc5, 0xa7 } }
};
diff --git a/plugins/YAPP/popups2.cpp b/plugins/YAPP/popups2.cpp
index c4630f8984..09e6566a67 100644
--- a/plugins/YAPP/popups2.cpp
+++ b/plugins/YAPP/popups2.cpp
@@ -38,8 +38,7 @@ PLUGININFOEX pluginInfo={
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
{ 0xefd15f16, 0x7ae4, 0x40d7, { 0xa8, 0xe3, 0xa4, 0x11, 0xed, 0x74, 0x7b, 0xd5 } } // {EFD15F16-7AE4-40d7-A8E3-A411ED747BD5}
};
diff --git a/plugins/ZeroNotification/main.cpp b/plugins/ZeroNotification/main.cpp
index 63e6ddf92c..292017d15d 100644
--- a/plugins/ZeroNotification/main.cpp
+++ b/plugins/ZeroNotification/main.cpp
@@ -46,8 +46,7 @@ PLUGININFOEX pluginInfoEx = {
"",
COPYRIGHT,
"",
- UNICODE_AWARE, //not transient
- 0,
+ UNICODE_AWARE,
UID
};
@@ -125,7 +124,7 @@ static int SetNotify(const long status){
mi.flags |= CMIM_NAME;
CallService(MS_CLIST_MODIFYMENUITEM,(WPARAM)noSoundMenu,(LPARAM)&mi);
-
+
return 0;
}
@@ -148,14 +147,14 @@ static int ProtoAck(WPARAM wParam, LPARAM lParam)
SetNotify(status);
return 0;
- }
+ }
return 0;
}
static INT_PTR CALLBACK DlgProcNoSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lParam)
{
- DWORD test;
+ DWORD test;
switch (msg)
{
case WM_INITDIALOG:
@@ -203,7 +202,7 @@ static INT_PTR CALLBACK DlgProcNoSoundOpts(HWND hwndDlg, UINT msg, WPARAM wParam
DBWriteContactSettingDword(NULL,PLUGINNAME_SHORT,"NoSound",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOSOUND)));
DBWriteContactSettingDword(NULL,PLUGINNAME_SHORT,"NoBlink",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOBLINK)));
DBWriteContactSettingDword(NULL,PLUGINNAME_SHORT,"NoCLCBlink",MakeCheckBoxTreeFlags(GetDlgItem(hwndDlg,IDC_NOCLCBLINK)));
-
+
test = DBGetContactSettingWord(NULL,"CList","Status",0);
SetNotify(Proto_Status2Flag(DBGetContactSettingWord(NULL,"CList","Status",0)));
return TRUE;
diff --git a/plugins/mTextControl/src/main.cpp b/plugins/mTextControl/src/main.cpp
index 17a500ca0e..c79cafd892 100644
--- a/plugins/mTextControl/src/main.cpp
+++ b/plugins/mTextControl/src/main.cpp
@@ -47,7 +47,6 @@ PLUGININFOEX pluginInfoEx =
MTEXT_COPYRIGHT,
MTEXT_WEBPAGE,
UNICODE_AWARE,
- 0,
MTEXT_UUID
};
diff --git a/plugins/testplugin/testplug.c b/plugins/testplugin/testplug.c
index dbdd08492c..23308382bc 100644
--- a/plugins/testplugin/testplug.c
+++ b/plugins/testplugin/testplug.c
@@ -24,11 +24,10 @@ PLUGININFOEX pluginInfo={
"© 2002 J. Random Hacker",
"http://miranda-icq.sourceforge.net/",
0, //not transient
- 0, //doesn't replace anything built-in
- // Generate your own unique id for your plugin.
- // Do not use this UUID!
- // Use uuidgen.exe to generate the uuuid
- {0x8b86253, 0xec6e, 0x4d09, { 0xb7, 0xa9, 0x64, 0xac, 0xdf, 0x6, 0x27, 0xb8 }} //{08B86253-EC6E-4d09-B7A9-64ACDF0627B8}
+ // Generate your own unique id for your plugin.
+ // Do not use this UUID!
+ // Use uuidgen.exe to generate the uuuid
+ {0x8b86253, 0xec6e, 0x4d09, { 0xb7, 0xa9, 0x64, 0xac, 0xdf, 0x6, 0x27, 0xb8 }} //{08B86253-EC6E-4d09-B7A9-64ACDF0627B8}
};
BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
diff --git a/protocols/AimOscar/aim.cpp b/protocols/AimOscar/aim.cpp
index 857d8481be..66605e2796 100644
--- a/protocols/AimOscar/aim.cpp
+++ b/protocols/AimOscar/aim.cpp
@@ -60,8 +60,7 @@ static const PLUGININFOEX pluginInfo =
"borkra@miranda-im.org",
"© 2008-2011 Boris Krasnovskiy, 2005-2006 Aaron Myles Landwehr",
"http://www.miranda-im.org",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
{0x3750a5a3, 0xbf0d, 0x490e, {0xb6, 0x5d, 0x41, 0xac, 0x4d, 0x29, 0xae, 0xb3}} // {3750A5A3-BF0D-490e-B65D-41AC4D29AEB3}
};
diff --git a/protocols/FacebookRM/main.cpp b/protocols/FacebookRM/main.cpp
index 0aca6c6a40..2cf6e13f18 100644
--- a/protocols/FacebookRM/main.cpp
+++ b/protocols/FacebookRM/main.cpp
@@ -40,8 +40,7 @@ PLUGININFOEX pluginInfo = {
"robyer@seznam.cz",
"(c) 2009-11 Michal Zelinka, 2011-12 Robert Posel",
"http://code.google.com/p/robyer/",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
// {8432B009-FF32-4727-AAE6-A9035038FD58}
{ 0x8432b009, 0xff32, 0x4727, { 0xaa, 0xe6, 0xa9, 0x3, 0x50, 0x38, 0xfd, 0x58 } }
};
diff --git a/protocols/GTalkExt/GTalkExt.cpp b/protocols/GTalkExt/GTalkExt.cpp
index f5ba3ea918..2d80a4e3e5 100644
--- a/protocols/GTalkExt/GTalkExt.cpp
+++ b/protocols/GTalkExt/GTalkExt.cpp
@@ -42,8 +42,7 @@ PLUGININFOEX pluginInfo={
"bems@vingrad.ru",
COPYRIGHT_STRING,
"http://miranda-planet.com/forum/index.php?autocom=downloads&showfile=1400",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
MIID_PLUGINIFACE //{08B86253-EC6E-4d09-B7A9-64ACDF0627B8}
};
diff --git a/protocols/Gadu-Gadu/gg.c b/protocols/Gadu-Gadu/gg.c
index 07e1e0b05b..74ae376a1f 100644
--- a/protocols/Gadu-Gadu/gg.c
+++ b/protocols/Gadu-Gadu/gg.c
@@ -34,7 +34,6 @@ PLUGININFOEX pluginInfo = {
"© 2009-2012 Bartosz Bia³ek, 2003-2009 Adam Strzelecki",
"http://www.miranda-im.pl/",
0,
- 0,
// {F3FF65F3-250E-416A-BEE9-58C93F85AB33}
{ 0xf3ff65f3, 0x250e, 0x416a, { 0xbe, 0xe9, 0x58, 0xc9, 0x3f, 0x85, 0xab, 0x33 } }
};
diff --git a/protocols/IRCG/main.cpp b/protocols/IRCG/main.cpp
index c90a91ae32..eb79398471 100644
--- a/protocols/IRCG/main.cpp
+++ b/protocols/IRCG/main.cpp
@@ -55,7 +55,6 @@ PLUGININFOEX pluginInfo =
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
{0x92382b4d, 0x5572, 0x48a0, {0xb0, 0xb9, 0x13, 0x36, 0xa6, 0x1, 0xd6, 0x89}} // {92382B4D-5572-48a0-B0B9-1336A601D689}
};
diff --git a/protocols/IcqOscarJ/init.cpp b/protocols/IcqOscarJ/init.cpp
index da40414e15..41554cd665 100644
--- a/protocols/IcqOscarJ/init.cpp
+++ b/protocols/IcqOscarJ/init.cpp
@@ -49,8 +49,7 @@ PLUGININFOEX pluginInfo = {
"jokusoftware@miranda-im.org",
"(C) 2000-2010 M.Öberg, R.Hughes, J.Keating, Bio, Angeli-Ka, G.Hazan, J.Kucera",
"http://addons.miranda-im.org/details.php?action=viewfile&id=1683",
- UNICODE_AWARE,
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE, //doesn't replace anything built-in
{0x73a9615c, 0x7d4e, 0x4555, {0xba, 0xdb, 0xee, 0x5, 0xdc, 0x92, 0x8e, 0xff}} // {73A9615C-7D4E-4555-BADB-EE05DC928EFF}
};
diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp
index 99752bffa6..71ac8b153b 100644
--- a/protocols/JabberG/jabber.cpp
+++ b/protocols/JabberG/jabber.cpp
@@ -55,7 +55,6 @@ PLUGININFOEX pluginInfo = {
"(c) 2005-2012 George Hazan, Maxim Mluhov, Victor Pavlychko, Artem Shpynov, Michael Stepura",
"http://miranda-im.org",
UNICODE_AWARE,
- 0,
{0x144e80a2, 0xd198, 0x428b, {0xac, 0xbe, 0x9d, 0x55, 0xda, 0xcc, 0x7f, 0xde}} // {144E80A2-D198-428b-ACBE-9D55DACC7FDE}
};
diff --git a/protocols/MRA/Mra.cpp b/protocols/MRA/Mra.cpp
index 4b476ed62f..084c900912 100644
--- a/protocols/MRA/Mra.cpp
+++ b/protocols/MRA/Mra.cpp
@@ -13,8 +13,7 @@ PLUGININFOEX pluginInfoEx={
"Rozhuk_I@mail.ru",
"© 2006-2011 Rozhuk Ivan",
"http://addons.miranda-im.org/details.php?action=viewfile&id=2544",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
// {E7C48BAB-8ACE-4CB3-8446-D4B73481F497}
{ 0xe7c48bab, 0x8ace, 0x4cb3, { 0x84, 0x46, 0xd4, 0xb7, 0x34, 0x81, 0xf4, 0x97 } }
};
diff --git a/protocols/MSN/msn.cpp b/protocols/MSN/msn.cpp
index 2e9200bc59..9eefa6aac7 100644
--- a/protocols/MSN/msn.cpp
+++ b/protocols/MSN/msn.cpp
@@ -38,8 +38,8 @@ void MsnLinks_Destroy(void);
/////////////////////////////////////////////////////////////////////////////////////////
// Global variables
-bool msnHaveChatDll;
-int avsPresent = -1;
+bool msnHaveChatDll;
+int avsPresent = -1;
static const PLUGININFOEX pluginInfo =
{
@@ -52,8 +52,8 @@ static const PLUGININFOEX pluginInfo =
"© 2001-2012 Richard Hughes, George Hazan, Boris Krasnovskiy",
"http://miranda-im.org",
UNICODE_AWARE,
- 0,
- {0x97724af9, 0xf3fb, 0x47d3, {0xa3, 0xbf, 0xea, 0xa9, 0x35, 0xc7, 0x4e, 0x6d}} // {97724AF9-F3FB-47d3-A3BF-EAA935C74E6D}
+ // {97724AF9-F3FB-47d3-A3BF-EAA935C74E6D}
+ {0x97724af9, 0xf3fb, 0x47d3, {0xa3, 0xbf, 0xea, 0xa9, 0x35, 0xc7, 0x4e, 0x6d}}
};
int MSN_GCEventHook(WPARAM wParam, LPARAM lParam);
diff --git a/protocols/NewsAggregator/Src/NewsAggregator.cpp b/protocols/NewsAggregator/Src/NewsAggregator.cpp
index 61583d1890..00c9fb61a4 100644
--- a/protocols/NewsAggregator/Src/NewsAggregator.cpp
+++ b/protocols/NewsAggregator/Src/NewsAggregator.cpp
@@ -42,7 +42,6 @@ PLUGININFOEX pluginInfoEx = {
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0,
// {56CC3F29-CCBF-4546-A8BA-9856248A412A}
{0x56cc3f29, 0xccbf, 0x4546, {0xa8, 0xba, 0x98, 0x56, 0x24, 0x8a, 0x41, 0x2a}}
};
diff --git a/protocols/Omegle/main.cpp b/protocols/Omegle/main.cpp
index 7ae6faf53c..e34282c2cb 100644
--- a/protocols/Omegle/main.cpp
+++ b/protocols/Omegle/main.cpp
@@ -40,8 +40,7 @@ PLUGININFOEX pluginInfo = {
"robyer@seznam.cz",
"(c) 2011-12 Robert Posel",
"http://code.google.com/p/robyer/",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
// {9E1D9244-606C-4ef4-99A0-1D7D23CB7601}
{ 0x9e1d9244, 0x606c, 0x4ef4, { 0x99, 0xa0, 0x1d, 0x7d, 0x23, 0xcb, 0x76, 0x1 } }
};
diff --git a/protocols/Quotes/Forex.cpp b/protocols/Quotes/Forex.cpp
index 47c258b259..4ea8c7e4d7 100644
--- a/protocols/Quotes/Forex.cpp
+++ b/protocols/Quotes/Forex.cpp
@@ -61,9 +61,8 @@ namespace
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- 0
// {E882056D-0D1D-4131-9A98-404CBAEA6A9C}
- ,{0xe882056d, 0xd1d, 0x4131, { 0x9a, 0x98, 0x40, 0x4c, 0xba, 0xea, 0x6a, 0x9c } }
+ {0xe882056d, 0xd1d, 0x4131, { 0x9a, 0x98, 0x40, 0x4c, 0xba, 0xea, 0x6a, 0x9c } }
};
INT_PTR QuotesMenu_RefreshAll(WPARAM wp,LPARAM lp)
diff --git a/protocols/Twitter/main.cpp b/protocols/Twitter/main.cpp
index c035271b34..5ac2aaa24c 100644
--- a/protocols/Twitter/main.cpp
+++ b/protocols/Twitter/main.cpp
@@ -38,10 +38,9 @@ PLUGININFOEX pluginInfo={
"",
"© 2009-2010 dentist, 2010-2011 omniwolf and Thief",
"http://code.google.com/p/miranda-twitter-oauth/",
- UNICODE_AWARE, //not transient
- 0, //doesn't replace anything built-in
+ UNICODE_AWARE,
//{BC09A71B-B86E-4d33-B18D-82D30451DD3C}
- { 0xbc09a71b, 0xb86e, 0x4d33, { 0xb1, 0x8d, 0x82, 0xd3, 0x4, 0x51, 0xdd, 0x3c } }
+ { 0xbc09a71b, 0xb86e, 0x4d33, { 0xb1, 0x8d, 0x82, 0xd3, 0x4, 0x51, 0xdd, 0x3c } }
};
/////////////////////////////////////////////////////////////////////////////
diff --git a/protocols/Weather/weather.cpp b/protocols/Weather/weather.cpp
index 426e37b483..d0527b794e 100644
--- a/protocols/Weather/weather.cpp
+++ b/protocols/Weather/weather.cpp
@@ -73,7 +73,6 @@ static const PLUGININFOEX pluginInfoEx =
"(c) 2002-2005 NoName, 2005-2010 Boris Krasnovskiy",
"http://addons.miranda-im.org/details.php?action=viewfile&id=2322",
UNICODE_AWARE,
- 0,
MIID_WEATHER
};
diff --git a/protocols/YAMN/main.cpp b/protocols/YAMN/main.cpp
index 7fb6248768..267d0db355 100644
--- a/protocols/YAMN/main.cpp
+++ b/protocols/YAMN/main.cpp
@@ -48,9 +48,7 @@ PLUGININFOEX pluginInfo = {
"© (2002-2004 majvan) 2005-2007 tweety y_b Miranda community",
"http://www.miranda-im.org/download/details.php?action = viewfile&id = 3411", //"http://www.majvan.host.sk/Projekty/YAMN?fm = soft",
UNICODE_AWARE,
- 0, //doesn't replace anything built-in
{ 0xb047a7e5, 0x27a, 0x4cfc, { 0x8b, 0x18, 0xed, 0xa8, 0x34, 0x5d, 0x27, 0x90 } } // {B047A7E5-027A-4cfc-8B18-EDA8345D2790}
-
};
HANDLE hNewMailHook;
diff --git a/protocols/Yahoo/main.cpp b/protocols/Yahoo/main.cpp
index d9b7278102..2e1c2e5d97 100644
--- a/protocols/Yahoo/main.cpp
+++ b/protocols/Yahoo/main.cpp
@@ -27,17 +27,16 @@ HANDLE g_hNetlibUser;
int hLangpack;
PLUGININFOEX pluginInfo={
- sizeof(PLUGININFOEX),
- "Yahoo Protocol",
- __VERSION_DWORD,
- "Yahoo Protocol support via libyahoo2 library. [Built: "__DATE__" "__TIME__"]",
- "Gennady Feldman",
- "gena01@miranda-im.org",
- "© 2003-2010 Gennady Feldman, Laurent Marechal",
- "http://www.miranda-im.org",
- UNICODE_AWARE, //not transient
- 0, //DEFMOD_PROTOCOLYAHOO - no core yahoo protocol
- {0xaa7bfea, 0x1fc7, 0x45f0, {0x90, 0x6e, 0x2a, 0x46, 0xb6, 0xe1, 0x19, 0xcf}} // {0AA7BFEA-1FC7-45f0-906E-2A46B6E119CF}
+ sizeof(PLUGININFOEX),
+ "Yahoo Protocol",
+ __VERSION_DWORD,
+ "Yahoo Protocol support via libyahoo2 library. [Built: "__DATE__" "__TIME__"]",
+ "Gennady Feldman",
+ "gena01@miranda-im.org",
+ "© 2003-2010 Gennady Feldman, Laurent Marechal",
+ "http://www.miranda-im.org",
+ UNICODE_AWARE,
+ {0xaa7bfea, 0x1fc7, 0x45f0, {0x90, 0x6e, 0x2a, 0x46, 0xb6, 0xe1, 0x19, 0xcf}} // {0AA7BFEA-1FC7-45f0-906E-2A46B6E119CF}
};
void YmsgrLinksInit(void);
diff --git a/src/core/modules.cpp b/src/core/modules.cpp
index 977a50d4f8..68a718bc11 100644
--- a/src/core/modules.cpp
+++ b/src/core/modules.cpp
@@ -21,7 +21,8 @@ along with this program; if not, write to the Free Software
Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
#include "commonheaders.h"
-#include <m_plugins.h>
+
+#include "../modules/plugins/plugins.h"
// other static variables
static BOOL bServiceMode = FALSE;
@@ -93,6 +94,7 @@ void UnloadErrorsModule(void);
int LoadIcoTabsModule();
int LoadHeaderbarModule();
int LoadDescButtonModule();
+
int LoadDefaultModules(void)
{
//load order is very important for these
@@ -112,16 +114,12 @@ int LoadDefaultModules(void)
// if ( LoadErrorsModule()) return 1;
bServiceMode = LoadServiceModePlugin();
- switch (bServiceMode)
- {
+ switch (bServiceMode) {
case 1: return 0; // stop loading here
case 0: break;
default: return 1;
}
- //this info will be available at LoadNewPluginsModule()
- INT_PTR *disableDefaultModule=(INT_PTR*)CallService(MS_PLUGINS_GETDISABLEDEFAULTARRAY, 0, 0);
-
if ( LoadSkinSounds()) return 1;
if ( LoadSkinHotkeys()) return 1;
if ( LoadFontserviceModule()) return 1;
@@ -129,8 +127,10 @@ int LoadDefaultModules(void)
if ( LoadDescButtonModule()) return 1;
if ( LoadOptionsModule()) return 1;
if ( LoadNetlibModule()) return 1;
+ if ( LoadSslModule()) return 1;
+ NetlibInitSsl();
if ( LoadProtocolsModule()) return 1;
- LoadDbAccounts(); // retrieves the account array from a database
+ LoadDbAccounts(); // retrieves the account array from a database
if ( LoadContactsModule()) return 1;
if ( LoadContactListModule()) return 1;
if ( LoadAddContactModule()) return 1;
@@ -138,27 +138,25 @@ int LoadDefaultModules(void)
LangPackDropUnusedItems();
- if ( !disableDefaultModule[DEFMOD_SSL]) if (LoadSslModule()) return 1;
- NetlibInitSsl();
-
- if (LoadAccountsModule()) return 1;
+ if ( LoadAccountsModule()) return 1;
//order becomes less important below here
- if ( !disableDefaultModule[DEFMOD_UIFINDADD]) if (LoadFindAddModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_UIUSERINFO]) if (LoadUserInfoModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_SRURL]) if (LoadSendRecvUrlModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_SREMAIL]) if (LoadSendRecvEMailModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_SRAUTH]) if (LoadSendRecvAuthModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_SRFILE]) if (LoadSendRecvFileModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_UIHELP]) if (LoadHelpModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_UIHISTORY]) if (LoadHistoryModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_RNDIDLE]) if (LoadIdleModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_RNDAUTOAWAY]) if (LoadAutoAwayModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_RNDUSERONLINE]) if (LoadUserOnlineModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_SRAWAY]) if (LoadAwayMsgModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_RNDIGNORE]) if (LoadIgnoreModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_UIVISIBILITY]) if (LoadVisibilityModule()) return 1;
- if ( !disableDefaultModule[DEFMOD_UPDATENOTIFY]) if (LoadUpdateNotifyModule()) return 1;
+ if ( LoadFindAddModule()) return 1;
+ if ( LoadAwayMsgModule()) return 1;
+ if ( LoadIgnoreModule()) return 1;
+ if ( LoadVisibilityModule()) return 1;
+
+ if ( !pluginDefault[ 0].pImpl) if ( LoadUserInfoModule()) return 1;
+ if ( !pluginDefault[ 1].pImpl) if ( LoadSendRecvUrlModule()) return 1;
+ if ( !pluginDefault[ 2].pImpl) if ( LoadSendRecvEMailModule()) return 1;
+ if ( !pluginDefault[ 3].pImpl) if ( LoadSendRecvAuthModule()) return 1;
+ if ( !pluginDefault[ 4].pImpl) if ( LoadSendRecvFileModule()) return 1;
+ if ( !pluginDefault[ 5].pImpl) if ( LoadHelpModule()) return 1;
+ if ( !pluginDefault[ 6].pImpl) if ( LoadHistoryModule()) return 1;
+ if ( !pluginDefault[ 7].pImpl) if ( LoadIdleModule()) return 1;
+ if ( !pluginDefault[ 8].pImpl) if ( LoadAutoAwayModule()) return 1;
+ if ( !pluginDefault[ 9].pImpl) if ( LoadUserOnlineModule()) return 1;
+ if ( !pluginDefault[10].pImpl) if ( LoadUpdateNotifyModule()) return 1;
return 0;
}
diff --git a/src/modules/options/options.cpp b/src/modules/options/options.cpp
index e949ff31c5..9310c6c5d9 100644
--- a/src/modules/options/options.cpp
+++ b/src/modules/options/options.cpp
@@ -621,7 +621,7 @@ static void LoadOptionsModule(HWND hdlg, OptionsDlgData *dat, HINSTANCE hInst)
for (int i=0; i < opi.pageCount; i++) {
OptionsPageData* opd = (OptionsPageData*)mir_calloc(sizeof(OptionsPageData));
- if (LoadOptionsPage(&opi.odp[i], opd))
+ if ( LoadOptionsPage(&opi.odp[i], opd))
dat->arOpd.insert(opd);
else
mir_free(opd);
diff --git a/src/modules/plugins/newplugins.cpp b/src/modules/plugins/newplugins.cpp
index 040a870cca..6c142d852e 100644
--- a/src/modules/plugins/newplugins.cpp
+++ b/src/modules/plugins/newplugins.cpp
@@ -43,7 +43,26 @@ static const pluginBannedList[] =
{{0xe00f1643, 0x263c, 0x4599, { 0xb8, 0x4b, 0x05, 0x3e, 0x5c, 0x51, 0x1d, 0x28 }}, MAX_MIR_VER}, // loadavatars (unicode)
{{0xc9e01eb0, 0xa119, 0x42d2, { 0xb3, 0x40, 0xe8, 0x67, 0x8f, 0x5f, 0xea, 0xd9 }}, MAX_MIR_VER}, // loadavatars (ansi)
};
-const int pluginBannedListCount = SIZEOF(pluginBannedList);
+
+MuuidReplacement pluginDefault[] =
+{
+ { MIID_UIUSERINFO, NULL }, // 0
+ { MIID_SRURL, NULL }, // 1
+ { MIID_SREMAIL, NULL }, // 2
+ { MIID_SRAUTH, NULL }, // 3
+ { MIID_SRFILE, NULL }, // 4
+ { MIID_UIHELP, NULL }, // 5
+ { MIID_UIHISTORY, NULL }, // 6
+ { MIID_IDLE, NULL }, // 7
+ { MIID_AUTOAWAY, NULL }, // 8
+ { MIID_USERONLINE, NULL }, // 9
+ { MIID_UPDATENOTIFY, NULL }, // 10
+
+ { MIID_CLIST, NULL }, // 11
+ { MIID_CHAT, NULL }, // 12
+ { MIID_SRMM, NULL }, // 13
+ { MIID_DATABASE, NULL }, // 14
+};
static BOOL bModuleInitialized = FALSE;
@@ -56,7 +75,6 @@ static pluginEntry * pluginListUI;
static pluginEntry * pluginList_freeimg;
static pluginEntry * pluginList_crshdmp;
static HANDLE hPluginListHeap = NULL;
-static pluginEntry * pluginDefModList[DEFMOD_HIGHEST+1]; // do not free this memory
static int askAboutIgnoredPlugins;
int InitIni(void);
@@ -68,9 +86,10 @@ int LoadDatabaseModule(void);
char* GetPluginNameByInstance(HINSTANCE hInstance)
{
- int i = 0;
- if (pluginList.getCount() == 0) return NULL;
- for (i = 0; i < pluginList.getCount(); i++) {
+ if (pluginList.getCount() == 0)
+ return NULL;
+
+ for (int i = 0; i < pluginList.getCount(); i++) {
pluginEntry* pe = pluginList[i];
if (pe->bpi.pluginInfo && pe->bpi.hInst == hInstance)
return pe->bpi.pluginInfo->shortName;
@@ -83,7 +102,31 @@ int equalUUID(const MUUID& u1, const MUUID& u2)
return memcmp(&u1, &u2, sizeof(MUUID))?0:1;
}
+bool hasMuuid(const BASIC_PLUGIN_INFO& bpi, const MUUID& uuid)
+{
+ if (bpi.Interfaces) {
+ MUUID *piface = bpi.Interfaces();
+ for (int i=0; !equalUUID(miid_last, piface[i]); i++)
+ if ( equalUUID(uuid, piface[i]))
+ return true;
+ }
+ return false;
+}
+
+int getDefaultPluginIdx(const MUUID& muuid)
+{
+ for (int i=0; i < SIZEOF(pluginDefault); i++)
+ if (equalUUID(muuid, pluginDefault[i].uuid))
+ return i;
+
+ return -1;
+}
+
MUUID miid_last = MIID_LAST;
+MUUID miid_chat = MIID_CHAT;
+MUUID miid_srmm = MIID_SRMM;
+MUUID miid_clist = MIID_CLIST;
+MUUID miid_database = MIID_DATABASE;
MUUID miid_servicemode = MIID_SERVICEMODE;
static bool validInterfaceList(Miranda_Plugin_Interfaces ifaceProc)
@@ -104,11 +147,9 @@ static bool validInterfaceList(Miranda_Plugin_Interfaces ifaceProc)
static int isPluginBanned(MUUID u1, DWORD dwVersion)
{
- int i;
-
- for (i=0; i<pluginBannedListCount; i++) {
- if (equalUUID(pluginBannedList[i].uuid, u1)) {
- if (dwVersion<pluginBannedList[i].maxVersion)
+ for (int i=0; i < SIZEOF(pluginBannedList); i++) {
+ if ( equalUUID(pluginBannedList[i].uuid, u1)) {
+ if (dwVersion < pluginBannedList[i].maxVersion)
return 1;
return 0;
}
@@ -165,11 +206,6 @@ static int checkPI(BASIC_PLUGIN_INFO* bpi, PLUGININFOEX* pi)
pi->authorEmail == NULL || pi->copyright == NULL || pi->homepage == NULL)
return FALSE;
- if (pi->replacesDefaultModule > DEFMOD_HIGHEST ||
- pi->replacesDefaultModule == DEFMOD_REMOVED_UIPLUGINOPTS ||
- pi->replacesDefaultModule == DEFMOD_REMOVED_PROTOCOLNETLIB)
- return FALSE;
-
return TRUE;
}
@@ -362,11 +398,6 @@ static INT_PTR PluginsEnum(WPARAM, LPARAM lParam)
return pluginListDb != NULL ? 1 : -1;
}
-static INT_PTR PluginsGetDefaultArray(WPARAM, LPARAM)
-{
- return (INT_PTR)&pluginDefModList;
-}
-
pluginEntry* OpenPlugin(TCHAR* tszFileName, TCHAR* path)
{
int isdb = validguess_db_name(tszFileName);
@@ -402,17 +433,11 @@ pluginEntry* OpenPlugin(TCHAR* tszFileName, TCHAR* path)
if (checkAPI(buf, &bpi, mirandaVersion, CHECKAPI_NONE)) {
p->pclass |= (PCLASS_OK | PCLASS_BASICAPI);
p->bpi = bpi;
- if (bpi.Interfaces) {
- int i = 0;
- MUUID *piface = bpi.Interfaces();
- while ( !equalUUID(miid_last, piface[i])) {
- if ( !equalUUID(miid_servicemode, piface[i++]))
- continue;
- p->pclass |= (PCLASS_SERVICE);
- if (pluginListSM != NULL) p->nextclass = pluginListSM;
- pluginListSM = p;
- break;
- }
+ if ( hasMuuid(bpi, miid_servicemode)) {
+ p->pclass |= (PCLASS_SERVICE);
+ if (pluginListSM != NULL)
+ p->nextclass = pluginListSM;
+ pluginListSM = p;
}
}
else
@@ -482,13 +507,18 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic)
if ( !checkAPI(exe, &bpi, mirandaVersion, CHECKAPI_NONE))
p->pclass |= PCLASS_FAILED;
else {
- int rm = bpi.pluginInfo->replacesDefaultModule;
p->bpi = bpi;
p->pclass |= PCLASS_OK | PCLASS_BASICAPI;
- if (pluginDefModList[rm] != NULL) {
- SetPluginOnWhiteList(p->pluginname, 0);
- return false;
+ if (p->bpi.Interfaces) {
+ MUUID *piface = bpi.Interfaces();
+ for (int i=0; !equalUUID(miid_last, piface[i]); i++) {
+ int idx = getDefaultPluginIdx( piface[i] );
+ if (idx != -1 && pluginDefault[idx].pImpl) {
+ SetPluginOnWhiteList(p->pluginname, 0);
+ return false;
+ }
+ }
}
RegisterModule(p->bpi.hInst);
@@ -496,7 +526,14 @@ bool TryLoadPlugin(pluginEntry *p, bool bDynamic)
return false;
p->pclass |= PCLASS_LOADED;
- if (rm) pluginDefModList[rm]=p;
+ if (p->bpi.Interfaces) {
+ MUUID *piface = bpi.Interfaces();
+ for (int i=0; !equalUUID(miid_last, piface[i]); i++) {
+ int idx = getDefaultPluginIdx( piface[i] );
+ if (idx != -1)
+ pluginDefault[idx].pImpl = p;
+ }
+ }
}
}
else if (p->bpi.hInst != NULL) {
@@ -686,7 +723,7 @@ int LoadNewPluginsModule(void)
i--;
}
else if (p->pclass & PCLASS_LOADED)
- msgModule |= (p->bpi.pluginInfo->replacesDefaultModule == DEFMOD_SRMESSAGE);
+ msgModule |= hasMuuid(p->bpi, miid_srmm);
}
if ( !msgModule)
@@ -710,14 +747,13 @@ int LoadNewPluginsModuleInfos(void)
mirandaVersion = (DWORD)CallService(MS_SYSTEM_GETVERSION, 0, 0);
CreateServiceFunction(MS_PLUGINS_ENUMDBPLUGINS, PluginsEnum);
- CreateServiceFunction(MS_PLUGINS_GETDISABLEDEFAULTARRAY, PluginsGetDefaultArray);
// remember where the mirandaboot.ini goes
PathToAbsoluteT(_T("mirandaboot.ini"), mirandabootini, NULL);
// look for all *.dll's
enumPlugins(scanPluginsDir, 0, 0);
// the database will select which db plugin to use, or fail if no profile is selected
- if (LoadDatabaseModule()) return 1;
+ if ( LoadDatabaseModule()) return 1;
InitIni();
// could validate the plugin entries here but internal modules arent loaded so can't call Load(void) in one pass
return 0;
diff --git a/src/modules/plugins/pluginopts.cpp b/src/modules/plugins/pluginopts.cpp
index 83a3c2f4c5..58d5b23128 100644
--- a/src/modules/plugins/pluginopts.cpp
+++ b/src/modules/plugins/pluginopts.cpp
@@ -26,6 +26,9 @@ Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
#include "plugins.h"
+#define IS_DATABASE (1 << 14)
+
+extern MUUID miid_clist, miid_database;
extern HANDLE hShutdownEvent, hPreShutdownEvent;
static HANDLE hevLoadModule, hevUnloadModule;
@@ -58,8 +61,8 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l
if (checkAPI(buf, &pi, MIRANDA_VERSION_CORE, CHECKAPI_NONE) == 0)
return TRUE;
- int isdb = pi.pluginInfo->replacesDefaultModule == DEFMOD_DB;
- int isclist = pi.pluginInfo->replacesDefaultModule == DEFMOD_CLISTALL;
+ int isdb = hasMuuid(pi, miid_database);
+ int isclist = hasMuuid(pi, miid_clist);
PluginListItemData* dat = (PluginListItemData*)mir_alloc(sizeof(PluginListItemData));
dat->hInst = hInst;
@@ -85,7 +88,16 @@ static BOOL dialogListPlugins(WIN32_FIND_DATA* fd, TCHAR* path, WPARAM, LPARAM l
ListView_SetItemText(hwndList, iRow, 2, fd->cFileName);
- dat->flags = pi.pluginInfo->replacesDefaultModule;
+ dat->flags = 0;
+ if (pi.Interfaces) {
+ MUUID *piface = pi.Interfaces();
+ for (int i=0; !equalUUID(miid_last, piface[i]); i++) {
+ int idx = getDefaultPluginIdx( piface[i] );
+ if (idx != -1 ) {
+ dat->flags |= (1 << idx);
+ break;
+ } } }
+
dat->author = mir_strdup(pi.pluginInfo->author);
dat->authorEmail = mir_strdup(pi.pluginInfo->authorEmail);
dat->copyright = mir_strdup(pi.pluginInfo->copyright);
@@ -211,7 +223,7 @@ static LRESULT CALLBACK PluginListWndProc(HWND hwnd, UINT msg, WPARAM wParam, LP
PluginListItemData* dat = (PluginListItemData*)lvi.lParam;
if (lvi.iImage == 3) {
- if (LoadPluginDynamically(dat)) {
+ if ( LoadPluginDynamically(dat)) {
lvi.iImage = 2;
ListView_SetItem(hwnd, &lvi);
}
@@ -301,7 +313,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
break;
PluginListItemData* dat = (PluginListItemData*)it.lParam;
- if (dat->flags == DEFMOD_DB) {
+ if (dat->flags & IS_DATABASE) {
ListView_SetItemState(hwndList, hdr->iItem, 0x3000, LVIS_STATEIMAGEMASK);
return FALSE;
}
@@ -314,7 +326,7 @@ INT_PTR CALLBACK DlgPluginOpt(HWND hwndDlg, UINT msg, WPARAM wParam, LPARAM lPar
dt.iItem = iRow;
if (ListView_GetItem(hwndList, &dt)) {
PluginListItemData* dat2 = (PluginListItemData*)dt.lParam;
- if (dat2->flags == dat->flags) {
+ if (dat2->flags & dat->flags) {
// the lParam is unset, so when the check is unset the clist block doesnt trigger
int lParam = dat2->flags;
dat2->flags = 0;
diff --git a/src/modules/plugins/plugins.h b/src/modules/plugins/plugins.h
index 686f0e0963..7a3a082f3e 100644
--- a/src/modules/plugins/plugins.h
+++ b/src/modules/plugins/plugins.h
@@ -20,7 +20,9 @@ typedef int (__cdecl * CList_Initialise) (void);
// Interface support
typedef MUUID * (__cdecl * Miranda_Plugin_Interfaces) (void);
-typedef struct { // can all be NULL
+// can all be NULL
+struct BASIC_PLUGIN_INFO
+{
HINSTANCE hInst;
Miranda_Plugin_Load Load;
Miranda_Plugin_Unload Unload;
@@ -30,7 +32,7 @@ typedef struct { // can all be NULL
CList_Initialise clistlink;
PLUGININFOEX * pluginInfo; // must be freed if hInst == NULL then its a copy
DATABASELINK * dblink; // only valid during module being in memory
-} BASIC_PLUGIN_INFO;
+};
#define PCLASS_FAILED 0x1 // not a valid plugin, or API is invalid, pluginname is valid
#define PCLASS_BASICAPI 0x2 // has Load, Unload, MirandaPluginInfo() -> PLUGININFO seems valid, this dll is in memory.
@@ -60,6 +62,8 @@ void UnloadPluginOptions();
int isPluginOnWhiteList(const TCHAR* pluginname);
void SetPluginOnWhiteList(const TCHAR* pluginname, int allow);
+int getDefaultPluginIdx(const MUUID& muuid);
+bool hasMuuid(const BASIC_PLUGIN_INFO&, const MUUID&);
int equalUUID(const MUUID& u1, const MUUID& u2);
int checkAPI(TCHAR* plugin, BASIC_PLUGIN_INFO* bpi, DWORD mirandaVersion, int checkTypeAPI);
pluginEntry* OpenPlugin(TCHAR* tszFileName, TCHAR* path);
@@ -68,3 +72,11 @@ void Plugin_Uninit(pluginEntry* p, bool bDynamic=false);
typedef BOOL (*SCAN_PLUGINS_CALLBACK) (WIN32_FIND_DATA * fd, TCHAR * path, WPARAM wParam, LPARAM lParam);
void enumPlugins(SCAN_PLUGINS_CALLBACK cb, WPARAM wParam, LPARAM lParam);
+
+struct MuuidReplacement
+{
+ MUUID uuid; // default interface plugin
+ pluginEntry* pImpl; // replacement plugin
+};
+
+extern MuuidReplacement pluginDefault[];
diff --git a/src/modules/protocols/protocols.cpp b/src/modules/protocols/protocols.cpp
index 69f3c846cd..991ebdfe08 100644
--- a/src/modules/protocols/protocols.cpp
+++ b/src/modules/protocols/protocols.cpp
@@ -714,7 +714,7 @@ int LoadProtocolsModule(void)
{
bModuleInitialized = TRUE;
- if (LoadProtoChains())
+ if ( LoadProtoChains())
return 1;
InsertServiceListItem( 1, PS_ADDTOLIST);