diff options
Diffstat (limited to 'plugins/StopSpamPlus/src')
| -rw-r--r-- | plugins/StopSpamPlus/src/eventhooker.cpp | 3 | ||||
| -rw-r--r-- | plugins/StopSpamPlus/src/eventhooker.h | 6 | ||||
| -rw-r--r-- | plugins/StopSpamPlus/src/events.cpp | 1 | ||||
| -rw-r--r-- | plugins/StopSpamPlus/src/headers.h | 35 | ||||
| -rw-r--r-- | plugins/StopSpamPlus/src/settings.h | 4 | ||||
| -rw-r--r-- | plugins/StopSpamPlus/src/stdafx.cpp | 18 | ||||
| -rw-r--r-- | plugins/StopSpamPlus/src/stopspam.cpp | 12 | ||||
| -rw-r--r-- | plugins/StopSpamPlus/src/utils.cpp | 1 | ||||
| -rw-r--r-- | plugins/StopSpamPlus/src/version.h | 41 | 
9 files changed, 38 insertions, 83 deletions
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
  | 
