summaryrefslogtreecommitdiff
path: root/plugins
diff options
context:
space:
mode:
Diffstat (limited to 'plugins')
-rw-r--r--plugins/StopSpamPlus/res/stopspam.rc12
-rw-r--r--plugins/StopSpamPlus/res/version.rc34
-rw-r--r--plugins/StopSpamPlus/src/eventhooker.cpp3
-rw-r--r--plugins/StopSpamPlus/src/eventhooker.h6
-rw-r--r--plugins/StopSpamPlus/src/events.cpp1
-rw-r--r--plugins/StopSpamPlus/src/headers.h35
-rw-r--r--plugins/StopSpamPlus/src/settings.h4
-rw-r--r--plugins/StopSpamPlus/src/stdafx.cpp18
-rw-r--r--plugins/StopSpamPlus/src/stopspam.cpp12
-rw-r--r--plugins/StopSpamPlus/src/utils.cpp1
-rw-r--r--plugins/StopSpamPlus/src/version.h41
-rw-r--r--plugins/StopSpamPlus/stopspam_10.vcxproj11
-rw-r--r--plugins/StopSpamPlus/stopspam_10.vcxproj.filters3
-rw-r--r--plugins/StopSpamPlus/stopspam_11.vcxproj11
-rw-r--r--plugins/StopSpamPlus/stopspam_11.vcxproj.filters3
15 files changed, 81 insertions, 114 deletions
diff --git a/plugins/StopSpamPlus/res/stopspam.rc b/plugins/StopSpamPlus/res/stopspam.rc
index f9861b226d..7e5c6c76be 100644
--- a/plugins/StopSpamPlus/res/stopspam.rc
+++ b/plugins/StopSpamPlus/res/stopspam.rc
@@ -106,16 +106,6 @@ BEGIN
END
#endif // APSTUDIO_INVOKED
-#endif // Russian (Russia) resources
-/////////////////////////////////////////////////////////////////////////////
-
-
-/////////////////////////////////////////////////////////////////////////////
-// English (United States) resources
-
-#if !defined(AFX_RESOURCE_DLL) || defined(AFX_TARG_ENU)
-LANGUAGE LANG_ENGLISH, SUBLANG_ENGLISH_US
-#pragma code_page(1252)
#ifdef APSTUDIO_INVOKED
/////////////////////////////////////////////////////////////////////////////
@@ -142,7 +132,7 @@ END
#endif // APSTUDIO_INVOKED
-#endif // English (United States) resources
+#endif // Russian (Russia) resources
/////////////////////////////////////////////////////////////////////////////
diff --git a/plugins/StopSpamPlus/res/version.rc b/plugins/StopSpamPlus/res/version.rc
index e90441bd8e..5bfbab4754 100644
--- a/plugins/StopSpamPlus/res/version.rc
+++ b/plugins/StopSpamPlus/res/version.rc
@@ -1,3 +1,5 @@
+// Microsoft Visual C++ generated resource script.
+//
#ifdef APSTUDIO_INVOKED
#error this file is not editable by Microsoft Visual C++
#endif //APSTUDIO_INVOKED
@@ -5,40 +7,32 @@
#include "afxres.h"
#include "..\src\version.h"
-#ifdef _WIN32
-LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
-#endif //_WIN32
-
VS_VERSION_INFO VERSIONINFO
FILEVERSION __FILEVERSION_STRING
- PRODUCTVERSION __PRODVERSION_STRING
- FILEFLAGSMASK VS_FFI_FILEFLAGSMASK
+ PRODUCTVERSION __FILEVERSION_STRING
+ FILEFLAGSMASK 0x17L
#ifdef _DEBUG
- FILEFLAGS VS_FF_DEBUG
-//#else
-// FILEFLAGS 0x0L
+ FILEFLAGS 0x1L
+#else
+ FILEFLAGS 0x0L
#endif
-
- FILEOS VOS__WINDOWS32
- FILETYPE VFT_DLL
- FILESUBTYPE VFT2_UNKNOWN
+ FILEOS 0x4L
+ FILETYPE 0x0L
+ FILESUBTYPE 0x0L
BEGIN
BLOCK "StringFileInfo"
BEGIN
- BLOCK "000004b0" // LOCALE_NEUTRAL<<16 + 1200 (ANSI - Unicode)
+ BLOCK "000004b0"
BEGIN
- VALUE "Author", __AUTHOR
- VALUE "FileDescription", __DESC
+ VALUE "FileDescription", __DESCRIPTION
VALUE "InternalName", __PLUGIN_NAME
VALUE "LegalCopyright", __COPYRIGHT
VALUE "OriginalFilename", __FILENAME
- VALUE "FileVersion", __VERSION_STRING
- VALUE "ProductName", "Miranda NG"
- VALUE "ProductVersion", __PROD_VERSION_STRING
+ VALUE "ProductName", __PLUGIN_NAME
END
END
BLOCK "VarFileInfo"
BEGIN
- VALUE "Translation", /*LOCALE_NEUTRAL from WinNT.h */ 0x0, 1200
+ VALUE "Translation", 0x0, 1200
END
END
diff --git a/plugins/StopSpamPlus/src/eventhooker.cpp b/plugins/StopSpamPlus/src/eventhooker.cpp
index f29e5b7da1..82db13b7e8 100644
--- a/plugins/StopSpamPlus/src/eventhooker.cpp
+++ b/plugins/StopSpamPlus/src/eventhooker.cpp
@@ -16,8 +16,7 @@
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
-#include <list>
-#include "eventhooker.h"
+#include "headers.h"
namespace miranda
{
diff --git a/plugins/StopSpamPlus/src/eventhooker.h b/plugins/StopSpamPlus/src/eventhooker.h
index b1ca2abede..7536671ca3 100644
--- a/plugins/StopSpamPlus/src/eventhooker.h
+++ b/plugins/StopSpamPlus/src/eventhooker.h
@@ -27,12 +27,6 @@
#ifndef EVENTHOOKER_H_C8EAA58A_7C4D_45f7_A88E_0E41FE93754D
#define EVENTHOOKER_H_C8EAA58A_7C4D_45f7_A88E_0E41FE93754D
-#pragma warning( once : 4430 )
-
-#include <windows.h>
-#include <string>
-#include <newpluginapi.h>
-
namespace miranda
{
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp
index 49e517a6b3..9499793ea4 100644
--- a/plugins/StopSpamPlus/src/events.cpp
+++ b/plugins/StopSpamPlus/src/events.cpp
@@ -1,6 +1,5 @@
#include "headers.h"
-
MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
{
HANDLE hDbEvent = (HANDLE)lParam;
diff --git a/plugins/StopSpamPlus/src/headers.h b/plugins/StopSpamPlus/src/headers.h
index c1970bad83..a9966fda87 100644
--- a/plugins/StopSpamPlus/src/headers.h
+++ b/plugins/StopSpamPlus/src/headers.h
@@ -4,34 +4,35 @@
// disable security warnings about "*_s" functions
#define _CRT_SECURE_NO_DEPRECATE
-// disable warnings about underscore in stdc functions
-#pragma warning(disable: 4996)
-
-#define MIRANDA_VER 0x0A00
-
#include <windows.h>
-#include <stdio.h>
#include <commctrl.h>
-#include <time.h>
-#include <string>
#include <sstream>
+#include <list>
#include <newpluginapi.h>
#include <m_database.h>
#include <m_protosvc.h>
#include <m_options.h>
-#include <m_utils.h>
#include <m_langpack.h>
#include <m_icolib.h>
#include <m_skin.h>
#include <m_clist.h>
+#include <m_stopspam.h>
+#include <m_variables.h>
+
+#ifdef _UNICODE
+ typedef std::wstring tstring;
+ #define PREF_TCHAR2 PREF_UTF
+#else
+ typedef std::string tstring;
+ #define PREF_TCHAR2 0
+#endif //_UNICODE
+
#include "eventhooker.h"
#include "version.h"
#include "resource.h"
-#include "m_stopspam.h"
-
-#include "m_variables.h"
+#include "settings.h"
#define pluginName LPGEN("StopSpam")
@@ -42,16 +43,6 @@ extern char const * questCountSetting;
extern HANDLE hLoadHook;
extern HINSTANCE hInst;
-#ifdef _UNICODE
- typedef std::wstring tstring;
- #define PREF_TCHAR2 PREF_UTF
-#else
- typedef std::string tstring;
- #define PREF_TCHAR2 0
-#endif //_UNICODE
-
-#include "settings.h"
-
//options
INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
INT_PTR CALLBACK MessagesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam);
diff --git a/plugins/StopSpamPlus/src/settings.h b/plugins/StopSpamPlus/src/settings.h
index 86219ebf10..9544fcadd4 100644
--- a/plugins/StopSpamPlus/src/settings.h
+++ b/plugins/StopSpamPlus/src/settings.h
@@ -1,7 +1,3 @@
-#pragma once
-
-#include "headers.h"
-
class db_usage
{
public:
diff --git a/plugins/StopSpamPlus/src/stdafx.cpp b/plugins/StopSpamPlus/src/stdafx.cpp
new file mode 100644
index 0000000000..48d92d3d56
--- /dev/null
+++ b/plugins/StopSpamPlus/src/stdafx.cpp
@@ -0,0 +1,18 @@
+/*
+Copyright (C) 2012-13 Miranda NG Project (http://miranda-ng.org)
+
+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 version 2
+of the License.
+
+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. If not, see <http://www.gnu.org/licenses/>.
+*/
+
+#include "headers.h" \ No newline at end of file
diff --git a/plugins/StopSpamPlus/src/stopspam.cpp b/plugins/StopSpamPlus/src/stopspam.cpp
index fdbb859a2a..ddfc002053 100644
--- a/plugins/StopSpamPlus/src/stopspam.cpp
+++ b/plugins/StopSpamPlus/src/stopspam.cpp
@@ -11,29 +11,25 @@ PLUGININFOEX pluginInfoEx = {
sizeof(PLUGININFOEX),
__PLUGIN_NAME,
PLUGIN_MAKE_VERSION(__MAJOR_VERSION, __MINOR_VERSION, __RELEASE_NUM, __BUILD_NUM),
- __DESC,
+ __DESCRIPTION,
__AUTHOR,
__AUTHOREMAIL,
__COPYRIGHT,
__AUTHORWEB,
UNICODE_AWARE,
- { 0x553811ee, 0xdeb6, 0x48b8, { 0x89, 0x2, 0xa8, 0xa0, 0xc, 0x1f, 0xd6, 0x79 } } // {553811EE-DEB6-48b8-8902-A8A00C1FD679}
+ // {553811EE-DEB6-48B8-8902-A8A00C1FD679}
+ {0x553811ee, 0xdeb6, 0x48b8, {0x89, 0x2, 0xa8, 0xa0, 0xc, 0x1f, 0xd6, 0x79}}
};
HINSTANCE hInst;
-_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)
{
return &pluginInfoEx;
}
-BOOL WINAPI DllMain(HINSTANCE hinstDLL,DWORD fdwReason,LPVOID lpvReserved)
+BOOL WINAPI DllMain(HINSTANCE hinstDLL, DWORD fdwReason, LPVOID lpvReserved)
{
hInst = hinstDLL;
return TRUE;
diff --git a/plugins/StopSpamPlus/src/utils.cpp b/plugins/StopSpamPlus/src/utils.cpp
index 4719062ceb..b069e6dd21 100644
--- a/plugins/StopSpamPlus/src/utils.cpp
+++ b/plugins/StopSpamPlus/src/utils.cpp
@@ -1,6 +1,5 @@
#include "headers.h"
-
tstring &GetDlgItemString(HWND hwnd, int id)
{
HWND h = GetDlgItem(hwnd, id);
diff --git a/plugins/StopSpamPlus/src/version.h b/plugins/StopSpamPlus/src/version.h
index 0dbb9a505a..981a01ba8a 100644
--- a/plugins/StopSpamPlus/src/version.h
+++ b/plugins/StopSpamPlus/src/version.h
@@ -1,51 +1,14 @@
-// Set the version number here - it will affect the version resource and the version field of the pluginInfo structure
-// (Be careful that you don't have the resource file open when you change this and rebuild, otherwise the changes may not
-// take effect within the version resource)
-// Do not forget to define symbol "_DEBUG" for resource compiler if you use debug configuration (in VisualStudio you can
-// find it under Project properties - Configuration properties - Resource - General - Preprocessor definitions)
-
-// plugin version part
#define __MAJOR_VERSION 0
#define __MINOR_VERSION 0
#define __RELEASE_NUM 1
#define __BUILD_NUM 4
-// plugin SVN Revision number
-#define __REV_NUM 1548
-// minimal MirandaIM version number, with which this plugin supposed to work
-#define __PROD_MAJOR_VERSION 0
-#define __PROD_MINOR_VERSION 8
-#define __PROD_RELEASE_NUM 0
-#define __PROD_BUILD_NUM 0
-// if your plugin works only with Miranda core beginning from specific revision, you can include this information in Product Version resource
-//#define __PROD_REV_NUM 1234
+#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
-// stuff that will be used in PluginInfo section and in Version resource
#define __PLUGIN_NAME "StopSpam+"
#define __FILENAME "StopSpam.dll"
-#define __DESC "No more spam! Robots can't go! Only human beings invited!"
+#define __DESCRIPTION "Antispam plugin for Miranda NG."
#define __AUTHOR "Roman Miklashevsky, A. Petkevich, Kosh&chka, persei"
#define __AUTHOREMAIL "koshechka@miranda.im"
#define __AUTHORWEB "http://miranda-ng.org/"
#define __COPYRIGHT "© 2004-2010 Roman Miklashevsky, A. Petkevich, Kosh&chka, persei"
-
-// other stuff for Version resource
-#define __STRINGIFY_IMPL(x) #x
-#define __STRINGIFY(x) __STRINGIFY_IMPL(x)
-
-#define __FILEVERSION_STRING __MAJOR_VERSION,__MINOR_VERSION,__RELEASE_NUM,__BUILD_NUM
-#define __FILEVERSION_STRING_DOTS __MAJOR_VERSION.__MINOR_VERSION.__RELEASE_NUM.__BUILD_NUM
-
-#ifdef __REV_NUM
-#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS rev. __REV_NUM)
-#else
-#define __VERSION_STRING __STRINGIFY(__FILEVERSION_STRING_DOTS)
-#endif
-
-#define __PRODVERSION_STRING __PROD_MAJOR_VERSION,__PROD_MINOR_VERSION,__PROD_RELEASE_NUM,__PROD_BUILD_NUM
-#define __PRODVERSION_STRING_DOTS __PROD_MAJOR_VERSION.__PROD_MINOR_VERSION.__PROD_RELEASE_NUM.__PROD_BUILD_NUM
-#ifdef __PROD_REV_NUM
-#define __PROD_VERSION_STRING __STRINGIFY(__PRODVERSION_STRING_DOTS rev. __PROD_REV_NUM)
-#else
-#define __PROD_VERSION_STRING __STRINGIFY(__PRODVERSION_STRING_DOTS+)
-#endif
diff --git a/plugins/StopSpamPlus/stopspam_10.vcxproj b/plugins/StopSpamPlus/stopspam_10.vcxproj
index 8b0b9ddd43..61a72bbc2f 100644
--- a/plugins/StopSpamPlus/stopspam_10.vcxproj
+++ b/plugins/StopSpamPlus/stopspam_10.vcxproj
@@ -79,6 +79,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -106,6 +108,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -132,6 +136,8 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -153,6 +159,8 @@
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -174,6 +182,9 @@
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\services.cpp" />
<ClCompile Include="src\settings.cpp" />
+ <ClCompile Include="src\stdafx.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
<ClCompile Include="src\stopspam.cpp" />
<ClCompile Include="src\utils.cpp" />
</ItemGroup>
diff --git a/plugins/StopSpamPlus/stopspam_10.vcxproj.filters b/plugins/StopSpamPlus/stopspam_10.vcxproj.filters
index 51bdd7ab12..d74d563c37 100644
--- a/plugins/StopSpamPlus/stopspam_10.vcxproj.filters
+++ b/plugins/StopSpamPlus/stopspam_10.vcxproj.filters
@@ -39,6 +39,9 @@
<ClCompile Include="src\utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\eventhooker.h">
diff --git a/plugins/StopSpamPlus/stopspam_11.vcxproj b/plugins/StopSpamPlus/stopspam_11.vcxproj
index 2701352a7a..bbc99245de 100644
--- a/plugins/StopSpamPlus/stopspam_11.vcxproj
+++ b/plugins/StopSpamPlus/stopspam_11.vcxproj
@@ -83,6 +83,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -110,6 +112,8 @@
<FunctionLevelLinking>true</FunctionLevelLinking>
<WarningLevel>Level3</WarningLevel>
<FavorSizeOrSpeed>Size</FavorSizeOrSpeed>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -136,6 +140,8 @@
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
<DebugInformationFormat>EditAndContinue</DebugInformationFormat>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<GenerateDebugInformation>true</GenerateDebugInformation>
@@ -157,6 +163,8 @@
<PreprocessorDefinitions>WIN64;_DEBUG;_WINDOWS;_USRDLL;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<RuntimeLibrary>MultiThreadedDebugDLL</RuntimeLibrary>
<WarningLevel>Level3</WarningLevel>
+ <PrecompiledHeader>Use</PrecompiledHeader>
+ <PrecompiledHeaderFile>headers.h</PrecompiledHeaderFile>
</ClCompile>
<Link>
<AdditionalDependencies>comctl32.lib;%(AdditionalDependencies)</AdditionalDependencies>
@@ -178,6 +186,9 @@
<ClCompile Include="src\options.cpp" />
<ClCompile Include="src\services.cpp" />
<ClCompile Include="src\settings.cpp" />
+ <ClCompile Include="src\stdafx.cpp">
+ <PrecompiledHeader>Create</PrecompiledHeader>
+ </ClCompile>
<ClCompile Include="src\stopspam.cpp" />
<ClCompile Include="src\utils.cpp" />
</ItemGroup>
diff --git a/plugins/StopSpamPlus/stopspam_11.vcxproj.filters b/plugins/StopSpamPlus/stopspam_11.vcxproj.filters
index 51bdd7ab12..d74d563c37 100644
--- a/plugins/StopSpamPlus/stopspam_11.vcxproj.filters
+++ b/plugins/StopSpamPlus/stopspam_11.vcxproj.filters
@@ -39,6 +39,9 @@
<ClCompile Include="src\utils.cpp">
<Filter>Source Files</Filter>
</ClCompile>
+ <ClCompile Include="src\stdafx.cpp">
+ <Filter>Source Files</Filter>
+ </ClCompile>
</ItemGroup>
<ItemGroup>
<ClInclude Include="src\eventhooker.h">