diff options
Diffstat (limited to 'stopspam.cpp')
-rw-r--r-- | stopspam.cpp | 13 |
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()); |