diff options
-rw-r--r-- | stopspam_mod/Makefile | 6 | ||||
-rw-r--r-- | stopspam_mod/headers.h | 4 | ||||
-rw-r--r-- | stopspam_mod/init.cpp | 3 | ||||
-rw-r--r-- | stopspam_mod/stopspam.aps | bin | 40396 -> 0 bytes | |||
-rw-r--r-- | stopspam_mod/stopspam.cpp | 2 | ||||
-rw-r--r-- | stopspam_mod/utilities.cpp | 2 | ||||
-rw-r--r-- | stopspam_mod/utilities.h | 2 |
7 files changed, 11 insertions, 8 deletions
diff --git a/stopspam_mod/Makefile b/stopspam_mod/Makefile index fda598f..6eb5adf 100644 --- a/stopspam_mod/Makefile +++ b/stopspam_mod/Makefile @@ -1,7 +1,7 @@ all:
- i686-pc-mingw32-g++ -c -DBUILD_DLL *.cpp -I../../include -I/usr/i686-pc-mingw32/usr/include -I. -w -march=i686 -msse -O2 -pipe
+ i686-pc-mingw32-g++ -c -DBUILD_DLL -D UNICODE -D _UNICODE *.cpp -I../../include -I/usr/i686-pc-mingw32/usr/include -I. -w -march=i686 -msse -O2 -pipe
i686-pc-mingw32-windres -i stopspam.rc -o resources.o
- i686-pc-mingw32-gcc -shared -o stopspam.dll *.o -Wl,-O1,-s
+ i686-pc-mingw32-gcc -shared -o stopspam.dll *.o -Wl,-O1,-s -lstdc++
upx -9 stopspam.dll
clean:
@@ -9,4 +9,4 @@ clean: clean-all:
rm *.o *.dll
-
\ No newline at end of file +
diff --git a/stopspam_mod/headers.h b/stopspam_mod/headers.h index 952a392..8295bc4 100644 --- a/stopspam_mod/headers.h +++ b/stopspam_mod/headers.h @@ -1,5 +1,7 @@ #include <windows.h>
#include <stdio.h>
+#include <commctrl.h>
+#include <malloc.h>
#include <time.h>
#include <string>
#include <sstream>
@@ -25,4 +27,4 @@ #include "resource.h"
#include "utilities.h"
-#include <m_dos.h>
\ No newline at end of file +#include <m_dos.h>
diff --git a/stopspam_mod/init.cpp b/stopspam_mod/init.cpp index 2e7b114..ab1bf4f 100644 --- a/stopspam_mod/init.cpp +++ b/stopspam_mod/init.cpp @@ -119,6 +119,7 @@ extern "C" __declspec(dllexport) PLUGININFOEX* MirandaPluginInfoEx(DWORD miranda return &pluginInfoEx;
}
+extern tstring DBGetContactSettingStringPAN(HANDLE hContact, char const * szModule, char const * szSetting, tstring errorValue);
void InitVars()
{
@@ -206,4 +207,4 @@ extern "C" int __declspec(dllexport) Unload(void) {
miranda::EventHooker::UnhookAll();
return 0;
-}
\ No newline at end of file +}
diff --git a/stopspam_mod/stopspam.aps b/stopspam_mod/stopspam.aps Binary files differdeleted file mode 100644 index 54b6850..0000000 --- a/stopspam_mod/stopspam.aps +++ /dev/null diff --git a/stopspam_mod/stopspam.cpp b/stopspam_mod/stopspam.cpp index e3cdae7..a0c821b 100644 --- a/stopspam_mod/stopspam.cpp +++ b/stopspam_mod/stopspam.cpp @@ -174,7 +174,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l) msg = 0; //is it useful ?
}
- if(gbCaseInsensitive?(!stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))):( !_tcscmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))))
+ if(gbCaseInsensitive?(!Stricmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))):( !_tcscmp(message.c_str(), (variables_parse(gbAnswer, hContact).c_str()))))
{
// unhide contact
DBDeleteContactSetting(hContact, "CList", "Hidden");
diff --git a/stopspam_mod/utilities.cpp b/stopspam_mod/utilities.cpp index 7b95337..c481b85 100644 --- a/stopspam_mod/utilities.cpp +++ b/stopspam_mod/utilities.cpp @@ -147,7 +147,7 @@ tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){ // case-insensitive _tcsstr
//by nullbie as i remember...
#define NEWTSTR_ALLOCA(A) (A==NULL)?NULL:_tcscpy((TCHAR*)alloca(sizeof(TCHAR)*(_tcslen(A)+1)),A)
-const int stricmp(const TCHAR *str, const TCHAR *substr)
+const int Stricmp(const TCHAR *str, const TCHAR *substr)
{
TCHAR *str_up = NEWTSTR_ALLOCA(str);
TCHAR *substr_up = NEWTSTR_ALLOCA(substr);
diff --git a/stopspam_mod/utilities.h b/stopspam_mod/utilities.h index 48c3834..c913491 100644 --- a/stopspam_mod/utilities.h +++ b/stopspam_mod/utilities.h @@ -5,4 +5,4 @@ std::string &GetProtoList(); bool ProtoInList(std::string proto);
void RemoveExcludedUsers();
tstring variables_parse(tstring const &tstrFormat, HANDLE hContact);
-const int stricmp(const TCHAR *str, const TCHAR *substr);
\ No newline at end of file +const int Stricmp(const TCHAR *str, const TCHAR *substr);
|