summaryrefslogtreecommitdiff
path: root/plugins/CmdLine
diff options
context:
space:
mode:
authorGeorge Hazan <ghazan@miranda.im>2019-12-04 16:08:03 +0300
committerGeorge Hazan <ghazan@miranda.im>2019-12-04 16:08:03 +0300
commit3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 (patch)
tree59dbb53fc9496d660ec2ef2846a4eab0f1720b88 /plugins/CmdLine
parent3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff)
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/CmdLine')
-rw-r--r--plugins/CmdLine/src/mimcmd_handlers.cpp6
-rw-r--r--plugins/CmdLine/src/utils.cpp4
-rw-r--r--plugins/CmdLine/src/utils.h2
3 files changed, 6 insertions, 6 deletions
diff --git a/plugins/CmdLine/src/mimcmd_handlers.cpp b/plugins/CmdLine/src/mimcmd_handlers.cpp
index 4aeaa16d74..74bfa10f37 100644
--- a/plugins/CmdLine/src/mimcmd_handlers.cpp
+++ b/plugins/CmdLine/src/mimcmd_handlers.cpp
@@ -1167,7 +1167,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r
reply->code = MIMRES_SUCCESS;
for (auto &hContact : Contacts()) {
- GetContactProto(hContact, protocol, _countof(protocol));
+ Proto_GetBaseAccountName(hContact, protocol, _countof(protocol));
ptrW contact(GetContactName(hContact, protocol));
ptrW id(GetContactID(hContact, protocol));
@@ -1197,7 +1197,7 @@ void HandleContactsCommand(PCommand command, TArgument *argv, int argc, PReply r
reply->code = MIMRES_SUCCESS;
*reply->message = 0;
for (auto &hContact : Contacts()) {
- GetContactProto(hContact, protocol, _countof(protocol));
+ Proto_GetBaseAccountName(hContact, protocol, _countof(protocol));
ptrW contact(GetContactName(hContact, protocol));
ptrW id(GetContactID(hContact, protocol));
@@ -1276,7 +1276,7 @@ void HandleHistoryCommand(PCommand command, TArgument *argv, int argc, PReply re
}
char protocol[128];
- GetContactProto(hContact, protocol, _countof(protocol));
+ Proto_GetBaseAccountName(hContact, protocol, _countof(protocol));
ptrW contact(GetContactName(hContact, protocol));
mir_snwprintf(buffer, TranslateT("%s:%S - %d unread events."), contact, protocol, count);
diff --git a/plugins/CmdLine/src/utils.cpp b/plugins/CmdLine/src/utils.cpp
index e877aa6477..86da417721 100644
--- a/plugins/CmdLine/src/utils.cpp
+++ b/plugins/CmdLine/src/utils.cpp
@@ -140,7 +140,7 @@ wchar_t* GetContactName(MCONTACT hContact, char *szProto)
return Contact_GetInfo(CNF_DISPLAY, hContact, szProto);
}
-void GetContactProto(MCONTACT hContact, char *szProto, size_t size)
+void Proto_GetBaseAccountName(MCONTACT hContact, char *szProto, size_t size)
{
GetStringFromDatabase(hContact, "Protocol", "p", nullptr, szProto, size);
}
@@ -157,7 +157,7 @@ MCONTACT GetContactFromID(wchar_t *szID, char *szProto)
int found = 0;
for (auto &hContact : Contacts()) {
- GetContactProto(hContact, cProtocol, sizeof(cProtocol));
+ Proto_GetBaseAccountName(hContact, cProtocol, sizeof(cProtocol));
ptrW szHandle(GetContactID(hContact, cProtocol));
wchar_t *tmp = Clist_GetContactDisplayName(hContact);
diff --git a/plugins/CmdLine/src/utils.h b/plugins/CmdLine/src/utils.h
index 617f329391..f87c8e6a97 100644
--- a/plugins/CmdLine/src/utils.h
+++ b/plugins/CmdLine/src/utils.h
@@ -46,7 +46,7 @@ int GetStringFromDatabase(char *szSettingName, WCHAR *szError, WCHAR *szResult,
wchar_t* GetContactName(MCONTACT hContact, char *szProto);
wchar_t* GetContactID(MCONTACT hContact, char *szProto);
MCONTACT GetContactFromID(wchar_t *szID, char *szProto);
-void GetContactProto(MCONTACT hContact, char *szProto, size_t size);
+void Proto_GetBaseAccountName(MCONTACT hContact, char *szProto, size_t size);
int MyPUShowMessage(char *lpzText, BYTE kind);