From 9e97d362c526ddcf8c6ee68891575a7d24918b67 Mon Sep 17 00:00:00 2001 From: Vadim Dashevskiy Date: Tue, 5 Jun 2012 20:02:16 +0000 Subject: mirVersion cleaning git-svn-id: http://svn.miranda-ng.org/main/trunk@321 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/AVS/main.cpp | 2 -- plugins/BossKeyPlus/BossKey.cpp | 5 ----- plugins/Clist_nicer/SRC/init.cpp | 4 ---- plugins/Db3x/init.c | 4 ---- plugins/Dbx_tree/init.cpp | 5 ----- plugins/FingerPrintModPlus/src/fingerprint.cpp | 7 +------ plugins/FlashAvatars/cflash.cpp | 23 ----------------------- plugins/FloatingContacts/main.cpp | 6 ++---- plugins/FreeImage/Miranda/main.cpp | 2 -- plugins/IEView/ieview_main.cpp | 3 --- plugins/JSON/miminterface.cpp | 8 ++------ plugins/MetaContacts/meta_main.c | 4 ---- plugins/ModernOpt/main.cpp | 3 --- plugins/Mwclist/init.c | 2 -- plugins/NewXstatusNotify/main.cpp | 3 --- plugins/NewsAggregator/Src/NewsAggregator.cpp | 5 ----- plugins/Nudge/main.cpp | 5 ----- plugins/Popup/src/main.cpp | 7 ------- plugins/QuickMessages/main.c | 8 ++------ plugins/Quotes/Forex.cpp | 6 ------ plugins/Sessions/Src/Main.cpp | 3 --- plugins/StatusPlugins/StartupStatus/main.cpp | 5 ----- plugins/StopSpamPlus/src/stopspam.cpp | 3 --- plugins/Svc_dbepp/main.cpp | 4 ---- plugins/YAMN/main.cpp | 3 --- plugins/ZeroNotification/main.c | 2 -- protocols/AimOscar/aim.cpp | 11 ----------- protocols/FacebookRM/main.cpp | 16 ---------------- protocols/Gadu-Gadu/gg.c | 10 ---------- protocols/IcqOscarJ/init.cpp | 9 --------- protocols/JabberG/jabber.cpp | 7 ------- protocols/MRA/Mra.cpp | 5 ----- protocols/MSN/msn.cpp | 7 ------- protocols/Omegle/main.cpp | 16 ---------------- protocols/Weather/weather.cpp | 8 +------- protocols/Yahoo/main.cpp | 14 +------------- 36 files changed, 9 insertions(+), 226 deletions(-) diff --git a/plugins/AVS/main.cpp b/plugins/AVS/main.cpp index bb4ebc236f..cdd1c71b85 100644 --- a/plugins/AVS/main.cpp +++ b/plugins/AVS/main.cpp @@ -2486,8 +2486,6 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserv extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < MIRANDA_VERSION_CORE) - return NULL; return &pluginInfoEx; } diff --git a/plugins/BossKeyPlus/BossKey.cpp b/plugins/BossKeyPlus/BossKey.cpp index e7f6226b91..4bc8b49800 100644 --- a/plugins/BossKeyPlus/BossKey.cpp +++ b/plugins/BossKeyPlus/BossKey.cpp @@ -87,11 +87,6 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved) extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - if ( mirandaVersion < PLUGIN_MAKE_VERSION(0,8,0,0)) { - MessageBox( NULL, _T("The BossKey+ cannot be loaded. It requires Miranda IM 0.8 or later."), _T("BossKey+"), MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST ); - return NULL; - } - pluginInfo.cbSize = sizeof(PLUGININFOEX); return &pluginInfo; } diff --git a/plugins/Clist_nicer/SRC/init.cpp b/plugins/Clist_nicer/SRC/init.cpp index 77d5ed123e..2ba6531b13 100644 --- a/plugins/Clist_nicer/SRC/init.cpp +++ b/plugins/Clist_nicer/SRC/init.cpp @@ -174,10 +174,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstDLL, DWORD dwReason, LPVOID reserved) extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 9, 0, 0)) { - MessageBox(0, _T("The installed version of the Clist Nicer+ plugin is not compatible with this Miranda installation. It requires Miranda core 0.9.0.0 or later"), _T("Clist Nicer+ error"), MB_OK); - return NULL; - } return &pluginInfo; } diff --git a/plugins/Db3x/init.c b/plugins/Db3x/init.c index ca574224f5..51ca5baafe 100644 --- a/plugins/Db3x/init.c +++ b/plugins/Db3x/init.c @@ -181,10 +181,6 @@ __declspec(dllexport) DATABASELINK* DatabasePluginInfo(void * reserved) __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion) { - if ( mirandaVersion < MIRANDA_VERSION_CORE ) { - MessageBox( NULL, _T("The db3x plugin cannot be loaded. It requires Miranda IM 0.7.0.0 or later."), _T("db3x Plugin"), MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST ); - return NULL; - } return &pluginInfo; } diff --git a/plugins/Dbx_tree/init.cpp b/plugins/Dbx_tree/init.cpp index 0c83f8826f..8c11e04a9f 100644 --- a/plugins/Dbx_tree/init.cpp +++ b/plugins/Dbx_tree/init.cpp @@ -53,11 +53,6 @@ extern "C" __declspec(dllexport) DATABASELINK* DatabasePluginInfo(void * Reserve extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD MirandaVersion) { - if (MirandaVersion < gMinMirVer) - { - MessageBoxA( 0, "The dbx_tree plugin cannot be loaded. It requires Miranda IM 0.8.0.0 or later.", gInternalName, MB_OK | MB_ICONEXCLAMATION | MB_SETFOREGROUND | MB_TOPMOST ); - return NULL; - } return &gPluginInfoEx; } diff --git a/plugins/FingerPrintModPlus/src/fingerprint.cpp b/plugins/FingerPrintModPlus/src/fingerprint.cpp index 8a729bad7c..79e9309cd1 100644 --- a/plugins/FingerPrintModPlus/src/fingerprint.cpp +++ b/plugins/FingerPrintModPlus/src/fingerprint.cpp @@ -150,12 +150,7 @@ BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved) } extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) -{// Tell Miranda IM about plugin - if(mirandaVersion < 0x8000) - { - MessageBox(NULL, TranslateT("Fingerprint Mod+ plugin requires Miranda IM 0.8.0.0 or later"), TranslateT("Fatal error"), MB_OK); - return NULL; - } +{ return &pluginInfoEx; } diff --git a/plugins/FlashAvatars/cflash.cpp b/plugins/FlashAvatars/cflash.cpp index 78eaf7912c..12a0f1466a 100644 --- a/plugins/FlashAvatars/cflash.cpp +++ b/plugins/FlashAvatars/cflash.cpp @@ -644,29 +644,6 @@ static int systemModulesLoaded(WPARAM /*wParam*/, LPARAM /*lParam*/) extern "C" __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 4, 0, 0)) - return NULL; - - TCHAR filename[MAX_PATH]; - GetModuleFileName(g_hInst, filename, SIZEOF(filename)); - - DWORD unused; - DWORD verInfoSize = GetFileVersionInfoSize(filename, &unused); - PVOID pVerInfo = malloc(verInfoSize); - GetFileVersionInfo(filename, 0, verInfoSize, pVerInfo); - - TCHAR *productVersion; - UINT blockSize; - VerQueryValue(pVerInfo, _T("\\StringFileInfo\\040504b0\\FileVersion"), (PVOID*)&productVersion, &blockSize); - -#ifdef _UNICODE - _snprintf(pluginName, SIZEOF(pluginName), "Flash avatars service [build #%S]", _tcsrchr(productVersion, ' ') + 1); -#else - _snprintf(pluginName, SIZEOF(pluginName), "Flash avatars service [build #%s]", strrchr(productVersion, ' ') + 1); -#endif - pluginInfo.shortName = pluginName; - - free(pVerInfo); return &pluginInfo; } diff --git a/plugins/FloatingContacts/main.cpp b/plugins/FloatingContacts/main.cpp index 187160f47d..4d10dbead5 100644 --- a/plugins/FloatingContacts/main.cpp +++ b/plugins/FloatingContacts/main.cpp @@ -174,10 +174,8 @@ _inline unsigned int MakeVer(int a, int b, int c, int d) return PLUGIN_MAKE_VERSION(a, b, c, d); } -extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - - if ( mirandaVersion < MakeVer(MINIMAL_COREVERSION) ) return NULL; - pluginInfoEx.version = MakeVer(PRODUCT_VERSION); +extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) +{ return &pluginInfoEx; } diff --git a/plugins/FreeImage/Miranda/main.cpp b/plugins/FreeImage/Miranda/main.cpp index 8a3d538d4b..7cfad31ce8 100644 --- a/plugins/FreeImage/Miranda/main.cpp +++ b/plugins/FreeImage/Miranda/main.cpp @@ -1269,7 +1269,5 @@ extern "C" __declspec(dllexport) const MUUID * MirandaPluginInterfaces(void) extern "C" __declspec(dllexport) const PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 9, 0, 0)) - return NULL; return &pluginInfoEx; } diff --git a/plugins/IEView/ieview_main.cpp b/plugins/IEView/ieview_main.cpp index 402f6560c0..9e189373f7 100644 --- a/plugins/IEView/ieview_main.cpp +++ b/plugins/IEView/ieview_main.cpp @@ -55,9 +55,6 @@ extern "C" BOOL WINAPI DllMain(HINSTANCE hModule, DWORD dwReason, LPVOID lpvRese extern "C" __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 9, 0, 0)) { - return NULL; - } return &pluginInfoEx; } diff --git a/plugins/JSON/miminterface.cpp b/plugins/JSON/miminterface.cpp index b6fbf4ce88..51260d3901 100644 --- a/plugins/JSON/miminterface.cpp +++ b/plugins/JSON/miminterface.cpp @@ -35,12 +35,8 @@ extern "C" { return TRUE; } - __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion= PLUGIN_MAKE_VERSION(0, 7, 0, 3)) - bIcolibEmbededInCore = TRUE; - pluginInfo.cbSize = sizeof(PLUGININFOEX);//Make sure cbSize is correct; return &pluginInfo; } diff --git a/plugins/ZeroNotification/main.c b/plugins/ZeroNotification/main.c index 2f278b4c01..76fa2eacf8 100644 --- a/plugins/ZeroNotification/main.c +++ b/plugins/ZeroNotification/main.c @@ -53,8 +53,6 @@ PLUGININFOEX pluginInfoEx = { __declspec(dllexport) PLUGININFOEX * MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < PLUGIN_MAKE_VERSION(0, 7, 0, 0)) - return NULL; return &pluginInfoEx; } diff --git a/protocols/AimOscar/aim.cpp b/protocols/AimOscar/aim.cpp index 9e3b1921d3..7eb6609245 100644 --- a/protocols/AimOscar/aim.cpp +++ b/protocols/AimOscar/aim.cpp @@ -75,17 +75,6 @@ static const PLUGININFOEX pluginInfo = extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < MIRANDA_VERSION_CORE) - { - MessageBox(NULL, - _T("The AIM protocol plugin cannot be loaded. It requires Miranda IM ") - _T(MIRANDA_VERSION_CORE_STRING) _T(" or later."), - _T("Miranda"), MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST); - return NULL; - } - - *(unsigned long*)(&AIM_CAP_MIRANDA[8]) = _htonl(mirandaVersion); - *(unsigned long*)(&AIM_CAP_MIRANDA[12]) = _htonl(__VERSION_DWORD); return &pluginInfo; } diff --git a/protocols/FacebookRM/main.cpp b/protocols/FacebookRM/main.cpp index 3441b6bc98..e12bf8fac9 100644 --- a/protocols/FacebookRM/main.cpp +++ b/protocols/FacebookRM/main.cpp @@ -76,22 +76,6 @@ DWORD WINAPI DllMain(HINSTANCE hInstance,DWORD,LPVOID) extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - if(mirandaVersion > PLUGIN_MAKE_VERSION(0,10,0,0) && - mirandaVersion < PLUGIN_MAKE_VERSION(0,10,0,2)) - { - MessageBox(0,_T("The Facebook protocol plugin cannot be loaded. ") - _T("It requires Miranda IM 0.10 alpha build #2 or later."),_T("Miranda"), - MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST); - return NULL; - } - else if(mirandaVersion < PLUGIN_MAKE_VERSION(0,9,43,0)) - { - MessageBox(0,_T("The Facebook protocol plugin cannot be loaded. ") - _T("It requires Miranda IM 0.9.43 or later."),_T("Miranda"), - MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST); - return NULL; - } - g_mirandaVersion = mirandaVersion; return &pluginInfo; } diff --git a/protocols/Gadu-Gadu/gg.c b/protocols/Gadu-Gadu/gg.c index a9ad33f19b..2cc361b57a 100644 --- a/protocols/Gadu-Gadu/gg.c +++ b/protocols/Gadu-Gadu/gg.c @@ -144,16 +144,6 @@ const char *http_error_string(int h) // Gets plugin info __declspec(dllexport) PLUGININFOEX *MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < MIRANDA_VERSION_CORE) - { - MessageBox( - NULL, - "The Gadu-Gadu protocol plugin cannot be loaded. It requires Miranda IM " MIRANDA_VERSION_CORE_STRING " or later.", - "Gadu-Gadu Protocol Plugin", - MB_OK | MB_ICONWARNING | MB_SETFOREGROUND | MB_TOPMOST - ); - return NULL; - } return &pluginInfo; } __declspec(dllexport) const MUUID* MirandaPluginInterfaces(void) diff --git a/protocols/IcqOscarJ/init.cpp b/protocols/IcqOscarJ/init.cpp index d7421c6c26..44adc3efbc 100644 --- a/protocols/IcqOscarJ/init.cpp +++ b/protocols/IcqOscarJ/init.cpp @@ -72,15 +72,6 @@ PLUGININFOEX pluginInfo = { extern "C" PLUGININFOEX __declspec(dllexport) *MirandaPluginInfoEx(DWORD mirandaVersion) { - // Only load for 0.9.0.8 or greater - // We need the new Unicode aware Contact Search API - if (mirandaVersion < MIRANDA_VERSION_CORE) - { - MessageBoxA( NULL, "ICQ plugin cannot be loaded. It requires Miranda IM " MIRANDA_VERSION_CORE_STRING " or later.", "ICQ Plugin", - MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST ); - return NULL; - } - return &pluginInfo; } diff --git a/protocols/JabberG/jabber.cpp b/protocols/JabberG/jabber.cpp index 1ab12a6449..f0dc9290f2 100644 --- a/protocols/JabberG/jabber.cpp +++ b/protocols/JabberG/jabber.cpp @@ -114,13 +114,6 @@ extern "C" BOOL WINAPI DllMain( HINSTANCE hModule, DWORD, LPVOID ) extern "C" __declspec( dllexport ) PLUGININFOEX *MirandaPluginInfoEx( DWORD mirandaVersion ) { - if ( mirandaVersion < MIRANDA_VERSION_CORE ) { - MessageBoxA( NULL, - "The Jabber protocol plugin cannot be loaded. It requires Miranda IM " MIRANDA_VERSION_CORE_STRING " or later.", - "Jabber Protocol Plugin", MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST ); - return NULL; - } - return &pluginInfo; } diff --git a/protocols/MRA/Mra.cpp b/protocols/MRA/Mra.cpp index 26cdc4ffec..4bc6f56c28 100644 --- a/protocols/MRA/Mra.cpp +++ b/protocols/MRA/Mra.cpp @@ -54,11 +54,6 @@ BOOL WINAPI DllMain(HINSTANCE hInstance,DWORD dwReason,LPVOID Reserved) extern "C" MRA_API PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion PLUGIN_MAKE_VERSION(0,10,0,0) && - mirandaVersion < PLUGIN_MAKE_VERSION(0,10,0,2)) - { - MessageBox(0,_T("The Omegle protocol plugin cannot be loaded. ") - _T("It requires Miranda IM 0.10 alpha build #2 or later."),_T("Miranda"), - MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST); - return NULL; - } - else if(mirandaVersion < PLUGIN_MAKE_VERSION(0,9,43,0)) - { - MessageBox(0,_T("The Omegle protocol plugin cannot be loaded. ") - _T("It requires Miranda IM 0.9.43 or later."),_T("Miranda"), - MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST); - return NULL; - } - g_mirandaVersion = mirandaVersion; return &pluginInfo; } diff --git a/protocols/Weather/weather.cpp b/protocols/Weather/weather.cpp index c0dc3c3373..e5458336c5 100644 --- a/protocols/Weather/weather.cpp +++ b/protocols/Weather/weather.cpp @@ -85,13 +85,7 @@ static const PLUGININFOEX pluginInfoEx = extern "C" __declspec(dllexport) const PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - if (mirandaVersion < PLUGIN_MAKE_VERSION(0,8,0,0)) { - MessageBoxA(NULL, "Weather Protocol requires Miranda 0.8.0.0 or later to run.", "Weather Protocol", MB_OK|MB_ICONERROR|MB_APPLMODAL); - return NULL; - } - // if Miranda version is higher than 0.7.0 - else - return &pluginInfoEx; + return &pluginInfoEx; } // MirandaPluginInterfaces - returns the protocol interface to the core diff --git a/protocols/Yahoo/main.cpp b/protocols/Yahoo/main.cpp index 7c53c2f1df..2814db5512 100644 --- a/protocols/Yahoo/main.cpp +++ b/protocols/Yahoo/main.cpp @@ -171,19 +171,7 @@ extern "C" int __declspec(dllexport) Unload(void) */ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD mirandaVersion) { - /* - * This requires the latest trunk... [md5, sha, etc..] - */ - if (mirandaVersion < MIRANDA_VERSION_CORE ) { - MessageBoxA( NULL, - "Yahoo plugin cannot be loaded. It requires Miranda IM " MIRANDA_VERSION_CORE_STRING " or later.", - "Yahoo", - MB_OK|MB_ICONWARNING|MB_SETFOREGROUND|MB_TOPMOST ); - - return NULL; - } - - return &pluginInfo; + return &pluginInfo; } /* -- cgit v1.2.3