summaryrefslogtreecommitdiff
path: root/plugins/Spamotron/src/spamotron.cpp
diff options
context:
space:
mode:
authorGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
committerGeorge Hazan <george.hazan@gmail.com>2015-05-22 16:04:17 +0000
commite2c2a1f5a84c6c9b705dc85c6a2dd1f97edd57e4 (patch)
treeba79bdcede96f80039f8b88d2791f198b9ec2981 /plugins/Spamotron/src/spamotron.cpp
parentf8e34b5f83f3ce5f39d541e9068b6b8cb6d92acd (diff)
T2Utf - handy replacement for ptrA<mir_utf8decodeT()>
git-svn-id: http://svn.miranda-ng.org/main/trunk@13758 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'plugins/Spamotron/src/spamotron.cpp')
-rw-r--r--plugins/Spamotron/src/spamotron.cpp12
1 files changed, 6 insertions, 6 deletions
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;
}