diff options
author | George Hazan <ghazan@miranda.im> | 2017-11-16 22:26:08 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2017-11-16 22:26:08 +0300 |
commit | a991e99b78a5f3c1fbd42e9b6cc4bfc7b30e83b6 (patch) | |
tree | 60b88f672fc3d401640aa23eb902175c8089095d /plugins/StopSpamPlus/src/events.cpp | |
parent | 165da716f5e72665355cc774f7c9df1d0be377bd (diff) |
TranslateT for global data is a very bad idea
Diffstat (limited to 'plugins/StopSpamPlus/src/events.cpp')
-rw-r--r-- | plugins/StopSpamPlus/src/events.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index 2810d8d68d..6b5c95a53c 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -132,11 +132,12 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l) // if message message does not contain infintite talk protection prefix
// and question count for this contact is less then maximum
- if ((!plSets->InfTalkProtection.Get() || tstring::npos == message.find(infTalkProtPrefix))
+ const wchar_t *pwszPrefix = TranslateT("StopSpam automatic message:\r\n");
+ if ((!plSets->InfTalkProtection.Get() || tstring::npos == message.find(pwszPrefix))
&& (!plSets->MaxQuestCount.Get() || db_get_dw(hContact, pluginName, questCountSetting, 0) < plSets->MaxQuestCount.Get()))
{
// send question
- tstring q = infTalkProtPrefix + variables_parse((tstring)(plSets->Question), hContact);
+ tstring q = pwszPrefix + variables_parse((tstring)(plSets->Question), hContact);
char * buf = mir_utf8encodeW(q.c_str());
|