diff options
author | Gluzskiy Alexandr <sss123next@list.ru> | 2009-10-01 05:18:46 +0300 |
---|---|---|
committer | Gluzskiy Alexandr <sss123next@list.ru> | 2009-10-01 05:18:46 +0300 |
commit | 298b3e189486938208a4bf7d15d3aa1b841ef652 (patch) | |
tree | 1b8c4873613b181647c29b7efa8002b0c6975c6c /stopspam_mod/trunk/stopspam.cpp | |
parent | 5f68bd0ddfd9578e00d0dba2b64c6db1f405bbc8 (diff) |
+ option to case insensitive answer checking
+ option to disable question in invisible mode
small options dialog redesign
Diffstat (limited to 'stopspam_mod/trunk/stopspam.cpp')
-rw-r--r-- | stopspam_mod/trunk/stopspam.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
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);
|