diff options
author | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-04-07 20:14:21 +0300 |
commit | f60c78abfbd5f279b30de729046b805bba8e00b0 (patch) | |
tree | 1120bba828b2151604e98163aa7a3fe221264068 /plugins/CmdLine | |
parent | 26a653ecae7edbeefb7966e08714e152c73b78eb (diff) |
Proto_GetStatus is used everywhere instead of PS_GETSTATUS
Diffstat (limited to 'plugins/CmdLine')
-rw-r--r-- | plugins/CmdLine/src/mimcmd_handlers.cpp | 16 |
1 files changed, 4 insertions, 12 deletions
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp index c343412f4e..b24ef0eaba 100644 --- a/plugins/CmdLine/src/mimcmd_handlers.cpp +++ b/plugins/CmdLine/src/mimcmd_handlers.cpp @@ -202,7 +202,7 @@ void HandleStatusCommand(PCommand command, TArgument *argv, int argc, PReply rep for (auto &pa : Accounts()) {
if (pa->bIsEnabled) {
- status = CallProtoService(pa->szModuleName, PS_GETSTATUS, 0, 0);
+ status = Proto_GetStatus(pa->szModuleName);
PrettyStatusMode(status, pn, _countof(pn));
perAccountStatus.AppendChar('\n');
@@ -246,7 +246,7 @@ void HandleStatusCommand(PCommand command, TArgument *argv, int argc, PReply rep wchar_t *account = argv[3];
AccountName2Protocol(account, protocol, _countof(protocol));
- INT_PTR old = CallProtoService(protocol, PS_GETSTATUS, 0, 0);
+ int old = Proto_GetStatus(protocol);
wchar_t po[128];
if (ServiceExists(MS_KS_ANNOUNCESTATUSCHANGE)) {
announce_status_change(protocol, status, nullptr);
@@ -300,7 +300,7 @@ void HandleAwayMsgCommand(PCommand command, TArgument *argv, int argc, PReply re char *protocol = pa->szModuleName;
if ((CallProtoService(protocol, PS_GETCAPS, PFLAGNUM_1, 0) & PF1_MODEMSGSEND) != 0) { //if the protocol supports away messages
- INT_PTR status = CallProtoService(protocol, PS_GETSTATUS, 0, 0);
+ int status = Proto_GetStatus(protocol);
INT_PTR res = CallProtoService(protocol, PS_SETAWAYMSG, status, (LPARAM)awayMsg);
wchar_t pn[128];
@@ -328,14 +328,11 @@ void HandleAwayMsgCommand(PCommand command, TArgument *argv, int argc, PReply re INT_PTR res = CallProtoService(protocol, PS_GETCAPS, PFLAGNUM_1, 0);
if ((res & PF1_MODEMSGSEND) != 0) //if the protocol supports away messages
{
- INT_PTR status = CallProtoService(protocol, PS_GETSTATUS, 0, 0);
+ int status = Proto_GetStatus(protocol);
res = CallProtoService(protocol, PS_SETAWAYMSG, status, (LPARAM)awayMsg);
PrettyStatusMode(status, pn, _countof(pn));
}
- else if (CallProtoService(protocol, PS_GETSTATUS, 0, 0) == CALLSERVICE_NOTFOUND) {
- res = CALLSERVICE_NOTFOUND;
- }
else {
res = -2;
}
@@ -346,11 +343,6 @@ void HandleAwayMsgCommand(PCommand command, TArgument *argv, int argc, PReply re mir_snwprintf(reply->message, TranslateT("Changed '%s' status message to '%s' (status is '%s')."), account, awayMsg, pn);
return;
- case CALLSERVICE_NOTFOUND:
- reply->code = MIMRES_FAILURE;
- mir_snwprintf(reply->message, TranslateT("'%s' doesn't seem to be a valid account."), account);
- return;
-
case -2:
reply->code = MIMRES_FAILURE;
mir_snwprintf(reply->message, TranslateT("Account '%s' does not support away messages, skipping."), account);
|