summaryrefslogtreecommitdiff
path: root/stopspam.cpp
diff options
context:
space:
mode:
authorGluzskiy Alexandr <sss123next@list.ru>2010-04-05 19:51:09 +0300
committerGluzskiy Alexandr <sss123next@list.ru>2010-04-05 19:51:09 +0300
commit15ee16e4e22313487b6676bf24fd8e53bfe3a2d5 (patch)
treee1aa83ca8c387f93c90035cc2a8f1e9d44c6fb1a /stopspam.cpp
parent1aa184198116f17b01301b7a6e70bb48cf1e9919 (diff)
parentb5c685fc85feab90ac6fcd7e9423d78c0a83ccb1 (diff)
Merge branch 'stopspam_mod_elzor' into stopspam_mod
Diffstat (limited to 'stopspam.cpp')
-rw-r--r--stopspam.cpp13
1 files changed, 10 insertions, 3 deletions
diff --git a/stopspam.cpp b/stopspam.cpp
index 890d559..8ae8d47 100644
--- a/stopspam.cpp
+++ b/stopspam.cpp
@@ -58,9 +58,16 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_ADDED, wParam, lParam)
msg = 0; //is it useful ?
}
if(msg)
- // int a = CallService(allowService.c_str(), (WPARAM)hDbEvent, (LPARAM)(variables_parse(gbAuthRepl, hcntct).c_str()));
- CallContactService(hcntct, PSS_MESSAGE, PREF_TCHAR, (LPARAM)(variables_parse(gbAuthRepl, hcntct).c_str()));
+ {
+#ifdef _UNICODE
+ char * buff=mir_utf8encodeW(variables_parse(gbAuthRepl, hcntct).c_str());
+ CallContactService(hcntct, PSS_MESSAGE, PREF_UTF, (LPARAM) buff);
+ mir_free(buff);
+#else
+ CallContactService(hcntct, PSS_MESSAGE, 0, (LPARAM) variables_parse(gbAuthRepl, hcntct).c_str());
+#endif
+ };
delete dbei.pBlob;
return 1;
}
@@ -159,7 +166,7 @@ MIRANDA_HOOK_EVENT(ME_DB_EVENT_FILTER_ADD, w, l)
{
#ifdef _UNICODE
char * buf=mir_utf8encodeW(variables_parse(gbCongratulation, hContact).c_str());
- CallContactService(hContact, PSS_MESSAGE, PREF_TCHAR, (LPARAM)buf);
+ CallContactService(hContact, PSS_MESSAGE, PREF_UTF, (LPARAM)buf);
mir_free(buf);
#else
CallContactService(hContact, PSS_MESSAGE, 0, (LPARAM)GetCongratulation().c_str());