summaryrefslogtreecommitdiff
path: root/stopspam_mod/trunk/stopspam.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'stopspam_mod/trunk/stopspam.cpp')
-rw-r--r--stopspam_mod/trunk/stopspam.cpp6
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);