summaryrefslogtreecommitdiff
path: root/stopspam.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-04-09 07:05:02 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-04-09 07:05:02 +0300
commit538114978d33f6695227fdc3066e83051a99e615 (patch)
tree65bf94b111cc8203a659bf9ae71c4f8bfc4dd7d0 /stopspam.cpp
parent8df2a03d555d4359185344774d20016ec4709308 (diff)
url in uath requests blockint (test)
Diffstat (limited to 'stopspam.cpp')
-rw-r--r--stopspam.cpp9
1 files changed, 8 insertions, 1 deletions
diff --git a/stopspam.cpp b/stopspam.cpp
index ede14a6..f029665 100644
--- a/stopspam.cpp
+++ b/stopspam.cpp
@@ -33,6 +33,11 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
{
HANDLE hcntct;
hcntct=*((PHANDLE)(dbei.pBlob+sizeof(DWORD)));
+ DBEVENTGETTEXT egt = {0};
+ egt.datatype = DBVT_TCHAR;
+ egt.dbei = &dbei;
+ TCHAR *EventText = (TCHAR*)CallService(MS_DB_EVENT_GETTEXT, 0, (LPARAM)&egt);
+
// if request is from unknown or not marked Answered contact
@@ -48,7 +53,9 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
DBWriteContactSettingByte(hcntct, "CList", "Hidden", 1);
if(gbSpecialGroup)
DBWriteContactSettingTString(hcntct, "CList", "Group", gbSpammersGroup.c_str());
-
+ if(gbIgnoreURL)
+ if(Stristr(EventText, _T("http")) || Stristr(EventText, _T("www")) || Stristr(EventText, _T(".ru")) || Stristr(EventText, _T(".com")) || Stristr(EventText, _T(".de")) || Stristr(EventText, _T(".cz")) || Stristr(EventText, _T(".org")) || Stristr(EventText, _T(".net")) || Stristr(EventText, _T(".su")))
+ return 1;
BYTE msg = 1;
if(gbInvisDisable)
{