From e2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Fri, 22 May 2015 16:04:17 +0000 Subject: T2Utf - handy replacement for ptrA git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- plugins/Spamotron/src/spamotron.cpp | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) (limited to 'plugins/Spamotron') diff --git a/plugins/Spamotron/src/spamotron.cpp b/plugins/Spamotron/src/spamotron.cpp index 2e5c9ed93b..3f7e3fe04e 100644 --- a/plugins/Spamotron/src/spamotron.cpp +++ b/plugins/Spamotron/src/spamotron.cpp @@ -173,7 +173,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) db_unset(hContact, "CList", "NotOnList"); db_unset(hContact, "CList", "Delete"); if (_getOptB("ReplyOnSuccess", defaultReplyOnSuccess) && (_getCOptB(hContact, "MsgSent", 0))) { - ptrA response(mir_utf8encodeT(_getOptS(buf, buflen, "SuccessResponse", defaultSuccessResponse))); + T2Utf response(_getOptS(buf, buflen, "SuccessResponse", defaultSuccessResponse)); CallContactService(hContact, PSS_MESSAGE, 0, response); } return 0; @@ -239,7 +239,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) db_unset(hContact, "CList", "Delete"); db_unset(hContact, "CList", "ResponseNum"); if (_getOptB("ReplyOnSuccess", defaultReplyOnSuccess)) { - ptrA response(mir_utf8encodeT(_getOptS(buf, buflen, "SuccessResponse", defaultSuccessResponse))); + T2Utf response(_getOptS(buf, buflen, "SuccessResponse", defaultSuccessResponse)); CallContactService(hContact, PSS_MESSAGE, 0, response); } _notify(hContact, POPUP_APPROVED, TranslateT("Contact %s approved."), NULL); @@ -368,7 +368,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) else _getOptS(challengeW, maxmsglen, "Challenge", defaultChallenge); ReplaceVars(challengeW, maxmsglen); - CallContactService(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeT(challengeW))); + CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(challengeW)); _notify(hContact, POPUP_CHALLENGE, TranslateT("Sending plain challenge to %s."), message); break; @@ -383,7 +383,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) _setCOptD(hContact, "ResponseNum", _getCOptD(hContact, "ResponseNum", -1) + 1); ReplaceVarsNum(challengeW, maxmsglen, _getCOptD(hContact, "ResponseNum", 0)); - CallContactService(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeT(challengeW))); + CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(challengeW)); _notify(hContact, POPUP_CHALLENGE, TranslateT("Sending round-robin challenge to %s."), message); break; @@ -396,7 +396,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) srand(time(NULL)); _setCOptD(hContact, "ResponseNum", rand() % get_response_num(buf)); ReplaceVarsNum(challengeW, maxmsglen, _getCOptD(hContact, "ResponseNum", 0)); - CallContactService(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeT(challengeW))); + CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(challengeW)); _notify(hContact, POPUP_CHALLENGE, TranslateT("Sending random challenge to %s."), message); break; @@ -410,7 +410,7 @@ int OnDBEventFilterAdd(WPARAM wParam, LPARAM lParam) _getOptS(challengeW, maxmsglen, "ChallengeMath", defaultChallengeMath); ReplaceVar(challengeW, maxmsglen, _T("%mathexpr%"), mexpr); _setCOptD(hContact, "ResponseMath", a + b); - CallContactService(hContact, PSS_MESSAGE, 0, ptrA(mir_utf8encodeT(challengeW))); + CallContactService(hContact, PSS_MESSAGE, 0, T2Utf(challengeW)); _notify(hContact, POPUP_CHALLENGE, TranslateT("Sending math expression challenge to %s."), message); break; } -- cgit v1.2.3