diff options
author | George Hazan <george.hazan@gmail.com> | 2025-01-04 18:05:20 +0300 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2025-01-04 18:05:20 +0300 |
commit | a330def54d05bdf090f57829113c0079120e38fb (patch) | |
tree | 9c9db18eae0304e48ab968fffae2c5ed96ed411c /plugins/StopSpamPlus/src/events.cpp | |
parent | a70fd8de566d88a4379dccf3b4080200c975fb44 (diff) |
fixes #3679 completely
Diffstat (limited to 'plugins/StopSpamPlus/src/events.cpp')
-rw-r--r-- | plugins/StopSpamPlus/src/events.cpp | 7 |
1 files changed, 2 insertions, 5 deletions
diff --git a/plugins/StopSpamPlus/src/events.cpp b/plugins/StopSpamPlus/src/events.cpp index 2581e1f913..57fe106521 100644 --- a/plugins/StopSpamPlus/src/events.cpp +++ b/plugins/StopSpamPlus/src/events.cpp @@ -21,8 +21,7 @@ int OnDbEventAdded(WPARAM, LPARAM lParam) // if request is from unknown or not marked Answered contact
//and if I don't sent message to this contact
if (!Contact::OnList(hContact) && !g_plugin.getByte(hContact, DB_KEY_ANSWERED) && !g_plugin.getByte(hContact, DB_KEY_HASSENT)) {
- if (!g_plugin.bHandleAuthReq)
- ProtoChainSend(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeW(variables_parse(g_plugin.getReply(), hContact).c_str())));
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(variables_parse(g_plugin.getReply(), hContact).c_str()));
if (g_plugin.iAnswerTimeout)
g_times[hContact] = time(0);
@@ -108,9 +107,7 @@ int OnDbEventFilterAdd(WPARAM w, LPARAM l) else g_plugin.setByte(hContact, DB_KEY_ANSWERED, 1);
// send congratulation
- char *buf = mir_utf8encodeW(variables_parse(g_plugin.getCongrats(), hContact).c_str());
- ProtoChainSend(hContact, PSS_MESSAGE, 0, (LPARAM)buf);
- mir_free(buf);
+ ProtoChainSend(hContact, PSS_MESSAGE, 0, T2Utf(variables_parse(g_plugin.getCongrats(), hContact).c_str()));
// process the event
return 1;
|