summaryrefslogtreecommitdiff
path: root/stopspam_mod
diff options
context:
space:
mode:
Diffstat (limited to 'stopspam_mod')
-rw-r--r--stopspam_mod/trunk/BUGS.txt1
-rw-r--r--stopspam_mod/trunk/init.cpp7
-rw-r--r--stopspam_mod/trunk/options.cpp151
-rw-r--r--stopspam_mod/trunk/resource.h6
-rw-r--r--stopspam_mod/trunk/stopspam.cpp6
-rw-r--r--stopspam_mod/trunk/stopspam.h3
-rw-r--r--stopspam_mod/trunk/stopspam.rc54
-rw-r--r--stopspam_mod/trunk/utilities.cpp18
-rw-r--r--stopspam_mod/trunk/utilities.h3
9 files changed, 173 insertions, 76 deletions
diff --git a/stopspam_mod/trunk/BUGS.txt b/stopspam_mod/trunk/BUGS.txt
deleted file mode 100644
index d17bd4a..0000000
--- a/stopspam_mod/trunk/BUGS.txt
+++ /dev/null
@@ -1 +0,0 @@
-do not turn on this plugin on first login of your account, it can mark all your contacts as spammers. \ No newline at end of file
diff --git a/stopspam_mod/trunk/init.cpp b/stopspam_mod/trunk/init.cpp
index 166ac15..2e7b114 100644
--- a/stopspam_mod/trunk/init.cpp
+++ b/stopspam_mod/trunk/init.cpp
@@ -3,6 +3,7 @@
BOOL gbDosServiceExist = 0;
+BOOL gbVarsServiceExist = 0;
DWORD gbMaxQuestCount = 5;
BOOL gbInfTalkProtection = 0;
@@ -14,6 +15,8 @@ BOOL gbIgnoreContacts = 0;
BOOL gbExclude = 1;
BOOL gbDelExcluded = 0;
BOOL gbDosServiceIntegration = 0;
+BOOL gbCaseInsensitive = 0;
+BOOL gbInvisDisable = 0;
//BOOL gbDelNotInList = 0;
tstring gbSpammersGroup = _T("Spammers");
tstring gbQuestion;
@@ -136,6 +139,8 @@ void InitVars()
gbIgnoreContacts = DBGetContactSettingByte(NULL, pluginName, "IgnoreContacts", 0);
gbExclude = DBGetContactSettingByte(NULL, pluginName, "ExcludeContacts", 1);
gbDelExcluded = DBGetContactSettingByte(NULL, pluginName, "DelExcluded", 0);
+ gbCaseInsensitive = DBGetContactSettingByte(NULL, pluginName, "CaseInsensitive", 0);
+ gbInvisDisable = DBGetContactSettingByte(NULL, pluginName, "DisableInInvis", 0);
// gbDelNotInList = DBGetContactSettingByte(NULL, pluginName, "DelNotInList", 0);
}
@@ -143,6 +148,8 @@ static int OnSystemModulesLoaded(WPARAM wParam,LPARAM lParam)
{
if (ServiceExists(MS_DOS_SERVICE))
gbDosServiceExist = TRUE;
+ if (ServiceExists(MS_VARS_FORMATSTRING))
+ gbVarsServiceExist = TRUE;
InitVars();
if(gbDelExcluded)
RemoveExcludedUsers();
diff --git a/stopspam_mod/trunk/options.cpp b/stopspam_mod/trunk/options.cpp
index d3db9b2..89bf80b 100644
--- a/stopspam_mod/trunk/options.cpp
+++ b/stopspam_mod/trunk/options.cpp
@@ -26,15 +26,8 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
SendDlgItemMessage(hwnd, ID_INFTALKPROT, BM_SETCHECK, gbInfTalkProtection ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hwnd, ID_ADDPERMANENT, BM_SETCHECK, gbAddPermanent ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_SETCHECK, gbHandleAuthReq ? BST_CHECKED : BST_UNCHECKED, 0);
- gbDosServiceExist?EnableWindow(GetDlgItem(hwnd, ID_DOS_INTEGRATION),1):EnableWindow(GetDlgItem(hwnd, ID_DOS_INTEGRATION),0);
- SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_SETCHECK, gbDosServiceIntegration ? BST_CHECKED : BST_UNCHECKED, 0);
- SetDlgItemText(hwnd, ID_SPECIALGROUPNAME, gbSpammersGroup.c_str());
- SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_SETCHECK, gbSpecialGroup ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hwnd, ID_HIDECONTACTS, BM_SETCHECK, gbHideContacts ? BST_CHECKED : BST_UNCHECKED, 0);
SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_SETCHECK, gbIgnoreContacts ? BST_CHECKED : BST_UNCHECKED, 0);
- SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_SETCHECK, gbExclude ? BST_CHECKED : BST_UNCHECKED, 0);
- SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_SETCHECK, gbDelExcluded ? BST_CHECKED : BST_UNCHECKED, 0);
-// SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_SETCHECK, gbDelNotInList ? BST_CHECKED : BST_UNCHECKED, 0);
}
return TRUE;
case WM_COMMAND:{
@@ -65,55 +58,10 @@ INT_PTR CALLBACK MainDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
BST_CHECKED == SendDlgItemMessage(hwnd, ID_ADDPERMANENT, BM_GETCHECK, 0, 0));
DBWriteContactSettingByte(NULL, pluginName, "handleAuthReq", gbHandleAuthReq =
BST_CHECKED == SendDlgItemMessage(hwnd, ID_HANDLEAUTHREQ, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "DOSIntegration", gbDosServiceIntegration =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_GETCHECK, 0, 0));
-/* DBWriteContactSettingByte(NULL, pluginName, "DelNotInList", gbDelNotInList =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_DEL_NO_IN_LIST, BM_GETCHECK, 0, 0)); */
- {
- static tstring NewGroupName, CurrentGroupName;
- NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME);
- CurrentGroupName = gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("0"));
- if(wcscmp(CurrentGroupName.c_str(), NewGroupName.c_str()) != 0)
- {
- int GroupNumber = 0;
- BYTE GroupExist = 0;
- TCHAR szValue[96] = {0};
- char szNumber[32] = {0};
- extern int CreateCListGroup(TCHAR* szGroupName);
- strcpy(szNumber, "0");
- while(strcmp(DBGetContactSettingStringPAN_A(NULL, "CListGroups", szNumber, "0").c_str(), "0") != 0)
- {
-#if defined(_MSC_VER) && _MSC_VER >= 1300
- _itoa_s(GroupNumber, szNumber, sizeof(szNumber), 10);
-#else
- _itoa(GroupNumber, szNumber, 10);
-
-#endif
- wcscpy(szValue, DBGetContactSettingStringPAN(NULL, "CListGroups", szNumber, _T("0")).c_str());
- if(wcscmp(NewGroupName.c_str(), szValue + 1) == 0)
- {
- GroupExist = 1;
- break;
- }
- GroupNumber++;
- }
- DBWriteContactSettingTString(NULL,pluginName, "SpammersGroup", NewGroupName.c_str());
- gbSpammersGroup = DBGetContactSettingStringPAN(NULL,pluginName,"SpammersGroup", _T("Spammers"));
- if(!GroupExist && gbSpecialGroup)
- CreateCListGroup((TCHAR*)gbSpammersGroup.c_str());
- }
- }
- DBWriteContactSettingByte(NULL, pluginName, "SpecialGroup", gbSpecialGroup =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_GETCHECK, 0, 0));
DBWriteContactSettingByte(NULL, pluginName, "HideContacts", gbHideContacts =
BST_CHECKED == SendDlgItemMessage(hwnd, ID_HIDECONTACTS, BM_GETCHECK, 0, 0));
DBWriteContactSettingByte(NULL, pluginName, "IgnoreContacts", gbIgnoreContacts =
BST_CHECKED == SendDlgItemMessage(hwnd, ID_IGNORESPAMMERS, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "ExcludeContacts", gbExclude =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_GETCHECK, 0, 0));
- DBWriteContactSettingByte(NULL, pluginName, "DelExcluded", gbDelExcluded =
- BST_CHECKED == SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_GETCHECK, 0, 0));
-
}
return TRUE;
}
@@ -131,6 +79,7 @@ INT_PTR CALLBACK MessagesDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lPar
case WM_INITDIALOG:
{
TranslateDialogDefault(hwnd);
+ gbVarsServiceExist?EnableWindow(GetDlgItem(hwnd, IDC_VARS),1):EnableWindow(GetDlgItem(hwnd, IDC_VARS),0);
SetDlgItemText(hwnd, ID_QUESTION, gbQuestion.c_str());
SetDlgItemText(hwnd, ID_ANSWER, gbAnswer.c_str());
SetDlgItemText(hwnd, ID_CONGRATULATION, gbCongratulation.c_str());
@@ -302,6 +251,98 @@ INT_PTR CALLBACK ProtoDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
return FALSE;
}
+INT_PTR CALLBACK AdvancedDlgProc(HWND hwnd, UINT msg, WPARAM wParam, LPARAM lParam)
+{
+
+ switch(msg)
+ {
+ case WM_INITDIALOG:
+ {
+ TranslateDialogDefault(hwnd);
+ SendDlgItemMessage(hwnd, IDC_INVIS_DISABLE, BM_SETCHECK, gbInvisDisable ? BST_CHECKED : BST_UNCHECKED, 0);
+ SendDlgItemMessage(hwnd, IDC_CASE_INSENSITIVE, BM_SETCHECK, gbCaseInsensitive ? BST_CHECKED : BST_UNCHECKED, 0);
+ gbDosServiceExist?EnableWindow(GetDlgItem(hwnd, ID_DOS_INTEGRATION),1):EnableWindow(GetDlgItem(hwnd, ID_DOS_INTEGRATION),0);
+ SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_SETCHECK, gbDosServiceIntegration ? BST_CHECKED : BST_UNCHECKED, 0);
+ SetDlgItemText(hwnd, ID_SPECIALGROUPNAME, gbSpammersGroup.c_str());
+ SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_SETCHECK, gbSpecialGroup ? BST_CHECKED : BST_UNCHECKED, 0);
+ SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_SETCHECK, gbExclude ? BST_CHECKED : BST_UNCHECKED, 0);
+ SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_SETCHECK, gbDelExcluded ? BST_CHECKED : BST_UNCHECKED, 0);
+ }
+ return TRUE;
+ case WM_COMMAND:{
+ switch (LOWORD(wParam))
+ {
+ case IDC_INVIS_DISABLE: case IDC_CASE_INSENSITIVE: case ID_DOS_INTEGRATION:
+ case ID_SPECIALGROUPNAME: case ID_SPECIALGROUP: case ID_EXCLUDE: case ID_REMOVE_TMP:
+ SendMessage(GetParent(hwnd), PSM_CHANGED, 0, 0);
+ break;
+
+ }
+ }
+ break;
+ case WM_NOTIFY:
+ {
+ NMHDR* nmhdr = (NMHDR*)lParam;
+ switch (nmhdr->code)
+ {
+ case PSN_APPLY:
+ {
+ DBWriteContactSettingByte(NULL, pluginName, "CaseInsensitive", gbCaseInsensitive =
+ BST_CHECKED == SendDlgItemMessage(hwnd, IDC_CASE_INSENSITIVE, BM_GETCHECK, 0, 0));
+ DBWriteContactSettingByte(NULL, pluginName, "DisableInInvis", gbInvisDisable =
+ BST_CHECKED == SendDlgItemMessage(hwnd, IDC_INVIS_DISABLE, BM_GETCHECK, 0, 0));
+ DBWriteContactSettingByte(NULL, pluginName, "DOSIntegration", gbDosServiceIntegration =
+ BST_CHECKED == SendDlgItemMessage(hwnd, ID_DOS_INTEGRATION, BM_GETCHECK, 0, 0));
+ {
+ static tstring NewGroupName, CurrentGroupName;
+ NewGroupName = GetDlgItemString(hwnd, ID_SPECIALGROUPNAME);
+ CurrentGroupName = gbSpammersGroup = DBGetContactSettingStringPAN(NULL, pluginName, "SpammersGroup", _T("0"));
+ if(wcscmp(CurrentGroupName.c_str(), NewGroupName.c_str()) != 0)
+ {
+ int GroupNumber = 0;
+ BYTE GroupExist = 0;
+ TCHAR szValue[96] = {0};
+ char szNumber[32] = {0};
+ extern int CreateCListGroup(TCHAR* szGroupName);
+ strcpy(szNumber, "0");
+ while(strcmp(DBGetContactSettingStringPAN_A(NULL, "CListGroups", szNumber, "0").c_str(), "0") != 0)
+ {
+#if defined(_MSC_VER) && _MSC_VER >= 1300
+ _itoa_s(GroupNumber, szNumber, sizeof(szNumber), 10);
+#else
+ _itoa(GroupNumber, szNumber, 10);
+
+#endif
+ wcscpy(szValue, DBGetContactSettingStringPAN(NULL, "CListGroups", szNumber, _T("0")).c_str());
+ if(wcscmp(NewGroupName.c_str(), szValue + 1) == 0)
+ {
+ GroupExist = 1;
+ break;
+ }
+ GroupNumber++;
+ }
+ DBWriteContactSettingTString(NULL,pluginName, "SpammersGroup", NewGroupName.c_str());
+ gbSpammersGroup = DBGetContactSettingStringPAN(NULL,pluginName,"SpammersGroup", _T("Spammers"));
+ if(!GroupExist && gbSpecialGroup)
+ CreateCListGroup((TCHAR*)gbSpammersGroup.c_str());
+ }
+ }
+ DBWriteContactSettingByte(NULL, pluginName, "SpecialGroup", gbSpecialGroup =
+ BST_CHECKED == SendDlgItemMessage(hwnd, ID_SPECIALGROUP, BM_GETCHECK, 0, 0));
+ DBWriteContactSettingByte(NULL, pluginName, "ExcludeContacts", gbExclude =
+ BST_CHECKED == SendDlgItemMessage(hwnd, ID_EXCLUDE, BM_GETCHECK, 0, 0));
+ DBWriteContactSettingByte(NULL, pluginName, "DelExcluded", gbDelExcluded =
+ BST_CHECKED == SendDlgItemMessage(hwnd, ID_REMOVE_TMP, BM_GETCHECK, 0, 0));
+ }
+ return TRUE;
+ }
+ }
+ break;
+ }
+ return FALSE;
+}
+
+
HINSTANCE hInst;
MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l)
{
@@ -329,6 +370,12 @@ MIRANDA_HOOK_EVENT(ME_OPT_INITIALISE, w, l)
odp.pfnDlgProc = ProtoDlgProc;
CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
+ odp.ptszTab = _T("Advanced");
+ odp.pszTemplate = MAKEINTRESOURCEA(IDD_ADVANCED);
+ odp.pfnDlgProc = AdvancedDlgProc;
+ odp.flags = odp.flags|ODPF_EXPERTONLY;
+ CallService(MS_OPT_ADDPAGE, w, (LPARAM)&odp);
+
return 0;
}
diff --git a/stopspam_mod/trunk/resource.h b/stopspam_mod/trunk/resource.h
index c3e8e7a..42b414b 100644
--- a/stopspam_mod/trunk/resource.h
+++ b/stopspam_mod/trunk/resource.h
@@ -17,6 +17,7 @@
#define ID_MAXQUESTCOUNT 1008
#define ID_REMOVE 1009
#define ID_SPECIALGROUPNAME 1009
+#define IDD_ADVANCED 1009
#define ID_USEDPROTO 1010
#define ID_REMOVEALL 1011
#define ID_ADDALL 1012
@@ -29,7 +30,10 @@
#define IDC_BUTTON1 1017
#define IDC_VARS 1017
#define ID_HIDECONTACTS 1018
+#define IDC_CASE_INSENSITIVE 1018
#define ID_IGNORESPAMMERS 1019
+#define IDC_CHECK2 1019
+#define IDC_INVIS_DISABLE 1019
#define ID_REMOVE_TMP 1020
#define ID_REMOVE_TMP2 1021
#define ID_EXCLUDE 1021
@@ -42,7 +46,7 @@
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 104
#define _APS_NEXT_COMMAND_VALUE 40001
-#define _APS_NEXT_CONTROL_VALUE 1018
+#define _APS_NEXT_CONTROL_VALUE 1020
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
diff --git a/stopspam_mod/trunk/stopspam.cpp b/stopspam_mod/trunk/stopspam.cpp
index 005d67c..27dde1d 100644
--- a/stopspam_mod/trunk/stopspam.cpp
+++ b/stopspam_mod/trunk/stopspam.cpp
@@ -155,7 +155,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
// if message contains right answer...
// if( tstring::npos!=message.find(gbAnswer) )
- if(!wcscmp(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");
@@ -183,7 +183,9 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
// if message message does not contain infintite talk protection prefix
// and question count for this contact is less then maximum
if( (!gbInfTalkProtection || tstring::npos==message.find(_T("StopSpam automatic message:\r\n")))
- && (!gbMaxQuestCount || DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount) )
+ && (!gbMaxQuestCount || DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount) &&
+ (!gbInvisDisable || (gbInvisDisable && ((DBGetContactSettingWord(hContact,dbei->szModule,"ApparentMode",0) != ID_STATUS_OFFLINE) ||
+ (CallProtoService(dbei->szModule, PS_GETSTATUS, 0, 0) != ID_STATUS_INVISIBLE))))) //мегажесть ), да да, я знаю, так не кодят...
{
// send question
tstring q = _T("StopSpam automatic message:\r\n") + variables_parse(gbQuestion, hContact);
diff --git a/stopspam_mod/trunk/stopspam.h b/stopspam_mod/trunk/stopspam.h
index 738ec15..2d9777e 100644
--- a/stopspam_mod/trunk/stopspam.h
+++ b/stopspam_mod/trunk/stopspam.h
@@ -1,5 +1,6 @@
extern BOOL gbDosServiceExist;
+extern BOOL gbVarsServiceExist;
extern DWORD gbMaxQuestCount;
extern BOOL gbInfTalkProtection;
extern BOOL gbAddPermanent;
@@ -11,6 +12,8 @@ extern BOOL gbExclude;
extern BOOL gbDelExcluded;
extern BOOL gbDosServiceIntegration;
extern BOOL gbDelNotInList;
+extern BOOL gbCaseInsensitive;
+extern BOOL gbInvisDisable;
extern tstring gbSpammersGroup;
extern tstring gbQuestion;
extern tstring gbAnswer;
diff --git a/stopspam_mod/trunk/stopspam.rc b/stopspam_mod/trunk/stopspam.rc
index 70376e2..e742c13 100644
--- a/stopspam_mod/trunk/stopspam.rc
+++ b/stopspam_mod/trunk/stopspam.rc
@@ -65,22 +65,32 @@ BEGIN
EDITTEXT ID_MAXQUESTCOUNT,107,89,30,12,ES_AUTOHSCROLL | ES_NUMBER
LTEXT " questions to one contact (0 - for no limit)",IDC_STATIC,144,89,155,12,SS_CENTERIMAGE
CONTROL "Enable StopSpam-StopSpam infinite talk protection",ID_INFTALKPROT,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,122,270,10
- CONTROL "Add contact permanently",ID_ADDPERMANENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,134,270,8
- CONTROL "Enable auth. requests blocking",ID_HANDLEAUTHREQ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,146,270,8
- CONTROL "Enable integration with DOS plugin",ID_DOS_INTEGRATION,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,199,270,8
- CONTROL "Add contacts to specified group:",ID_SPECIALGROUP,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,111,134,10
- EDITTEXT ID_SPECIALGROUPNAME,152,110,53,12,ES_AUTOHSCROLL
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,106,270,10
+ CONTROL "Add contact permanently",ID_ADDPERMANENT,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,118,270,8
+ CONTROL "Enable auth. requests blocking",ID_HANDLEAUTHREQ,"Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,130,270,8
CONTROL "Hide unanswered contacts and spammers from contact list",ID_HIDECONTACTS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,156,279,10
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,140,279,10
CONTROL "Ignore spammers (do not write messages to history)",ID_IGNORESPAMMERS,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,167,268,10
- CONTROL "Remove Excluded contacts after restart",ID_REMOVE_TMP,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,188,270,8
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,151,268,10
+END
+
+IDD_ADVANCED DIALOGEX 0, 0, 309, 219
+STYLE DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_SYSMENU
+FONT 8, "MS Shell Dlg", 400, 0, 0x1
+BEGIN
+ CONTROL "Case insensitive answer checking",IDC_CASE_INSENSITIVE,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,54,122,10
+ CONTROL "Disable question in invidible mode",IDC_INVIS_DISABLE,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,65,122,10
+ CONTROL "Enable integration with DOS plugin",ID_DOS_INTEGRATION,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,77,270,8
CONTROL "Exclude contacts which we sending something from spam check",ID_EXCLUDE,
- "Button",BS_AUTOCHECKBOX | WS_TABSTOP,12,178,270,8
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,33,270,8
+ CONTROL "Remove Excluded contacts after restart",ID_REMOVE_TMP,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,44,270,8
+ CONTROL "Add contacts to specified group:",ID_SPECIALGROUP,
+ "Button",BS_AUTOCHECKBOX | WS_TABSTOP,15,16,134,10
+ EDITTEXT ID_SPECIALGROUPNAME,138,15,79,12,ES_AUTOHSCROLL
END
@@ -114,6 +124,16 @@ BEGIN
TOPMARGIN, 7
BOTTOMMARGIN, 212
END
+
+ IDD_ADVANCED, DIALOG
+ BEGIN
+ LEFTMARGIN, 7
+ RIGHTMARGIN, 302
+ VERTGUIDE, 15
+ TOPMARGIN, 7
+ BOTTOMMARGIN, 212
+ HORZGUIDE, 11
+ END
END
#endif // APSTUDIO_INVOKED
@@ -124,8 +144,8 @@ END
//
VS_VERSION_INFO VERSIONINFO
- FILEVERSION 0,0,1,0
- PRODUCTVERSION 0,0,1,0
+ FILEVERSION 0,0,1,7
+ PRODUCTVERSION 0,7,0,0
FILEFLAGSMASK 0x3fL
#ifdef _DEBUG
FILEFLAGS 0x1L
@@ -143,12 +163,12 @@ BEGIN
VALUE "Comments", "Licensed under the terms of the GNU General Public License"
VALUE "CompanyName", " "
VALUE "FileDescription", "StopSpam plugin for Miranda IM"
- VALUE "FileVersion", "0.0.1.7 alpha build #0"
+ VALUE "FileVersion", "0.0.1.7"
VALUE "InternalName", "stopspam"
VALUE "LegalCopyright", "Copyright © 2000-2009 Miranda IM Project. This software is released under the terms of the GNU General Public License."
VALUE "OriginalFilename", "stopspam.dll"
VALUE "ProductName", "StopSpam"
- VALUE "ProductVersion", "0.0.1.7 alpha build #0"
+ VALUE "ProductVersion", "0.7.0.0"
END
END
BLOCK "VarFileInfo"
diff --git a/stopspam_mod/trunk/utilities.cpp b/stopspam_mod/trunk/utilities.cpp
index bf00574..7b95337 100644
--- a/stopspam_mod/trunk/utilities.cpp
+++ b/stopspam_mod/trunk/utilities.cpp
@@ -123,7 +123,7 @@ int RemoveTmp(WPARAM,LPARAM)
return 0;
}
tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){
- if (ServiceExists(MS_VARS_FORMATSTRING)) {
+ if (gbVarsServiceExist) {
FORMATINFO fi;
TCHAR *tszParsed;
tstring tstrResult;
@@ -142,4 +142,18 @@ tstring variables_parse(tstring const &tstrFormat, HANDLE hContact){
}
}
return tstrFormat;
-} \ No newline at end of file
+}
+
+// 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)
+{
+ TCHAR *str_up = NEWTSTR_ALLOCA(str);
+ TCHAR *substr_up = NEWTSTR_ALLOCA(substr);
+
+ CharUpperBuff(str_up, lstrlen(str_up));
+ CharUpperBuff(substr_up, lstrlen(substr_up));
+
+ return _tcscmp(str_up, substr_up);
+}
diff --git a/stopspam_mod/trunk/utilities.h b/stopspam_mod/trunk/utilities.h
index 1b5f719..48c3834 100644
--- a/stopspam_mod/trunk/utilities.h
+++ b/stopspam_mod/trunk/utilities.h
@@ -4,4 +4,5 @@ tstring &GetDlgItemString(HWND hwnd, int id);
std::string &GetProtoList();
bool ProtoInList(std::string proto);
void RemoveExcludedUsers();
-tstring variables_parse(tstring const &tstrFormat, HANDLE hContact); \ No newline at end of file
+tstring variables_parse(tstring const &tstrFormat, HANDLE hContact);
+const int stricmp(const TCHAR *str, const TCHAR *substr); \ No newline at end of file