From 298b3e189486938208a4bf7d15d3aa1b841ef652 Mon Sep 17 00:00:00 2001 From: Gluzskiy Alexandr Date: Thu, 1 Oct 2009 05:18:46 +0300 Subject: + option to case insensitive answer checking + option to disable question in invisible mode small options dialog redesign --- stopspam_mod/trunk/stopspam.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'stopspam_mod/trunk/stopspam.cpp') 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); -- cgit v1.2.3