From a330def54d05bdf090f57829113c0079120e38fb Mon Sep 17 00:00:00 2001 From: George Hazan Date: Sat, 4 Jan 2025 18:05:20 +0300 Subject: fixes #3679 completely --- plugins/StopSpamPlus/src/events.cpp | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) (limited to 'plugins/StopSpamPlus/src/events.cpp') 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; -- cgit v1.2.3