summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2011-04-18 18:20:23 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2011-04-18 18:20:23 +0300
commite04fe9be90865e54d060c852ecd4f482c0514fdd (patch)
tree922c6312df28f66374b58550dd02eac8739533b9
parentda1667c9f2f76082db081a79192a5e00af86fd5b (diff)
fixed infinite talk protection option
-rw-r--r--stopspam.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/stopspam.cpp b/stopspam.cpp
index d76d79a..8ca9111 100644
--- a/stopspam.cpp
+++ b/stopspam.cpp
@@ -216,7 +216,10 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
&& (!gbMaxQuestCount || DBGetContactSettingDword(hContact, pluginName, "QuestionCount", 0) < gbMaxQuestCount))
{
// send question
- tstring q = _T("StopSpam automatic message:\r\n") + variables_parse(gbQuestion, hContact);
+ tstring q;
+ if(gbInfTalkProtection)
+ q += _T("StopSpam automatic message:\r\n");
+ q += variables_parse(gbQuestion, hContact);
#ifdef _UNICODE
char * buf=mir_utf8encodeW(q.c_str());