diff options
author | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-12-04 16:08:03 +0300 |
commit | 3bb16e798cb51d5764aacbefd4edf26f52d8c4f0 (patch) | |
tree | 59dbb53fc9496d660ec2ef2846a4eab0f1720b88 /plugins/New_GPG/src | |
parent | 3216d8df5cb355f34c82ed10b7e40bab7525b697 (diff) |
GetContactProto: useless duplicate function replaced with standard Proto_GetBaseAccountName
Diffstat (limited to 'plugins/New_GPG/src')
-rwxr-xr-x | plugins/New_GPG/src/messages.cpp | 4 | ||||
-rwxr-xr-x | plugins/New_GPG/src/options.cpp | 2 | ||||
-rwxr-xr-x | plugins/New_GPG/src/utilities.cpp | 10 |
3 files changed, 8 insertions, 8 deletions
diff --git a/plugins/New_GPG/src/messages.cpp b/plugins/New_GPG/src/messages.cpp index 0e156d8918..c11997bde9 100755 --- a/plugins/New_GPG/src/messages.cpp +++ b/plugins/New_GPG/src/messages.cpp @@ -556,7 +556,7 @@ INT_PTR RecvMsgSvc(WPARAM w, LPARAM l) return 0; } else if (!isContactHaveKey(ccs->hContact) && globals.bAutoExchange && globals.gpg_valid && globals.gpg_keyexist) { - char *proto = GetContactProto(ccs->hContact); + char *proto = Proto_GetBaseAccountName(ccs->hContact); ptrA jid(db_get_utfa(ccs->hContact, proto, "jid", "")); if (jid[0]) { for (auto p : globals.Accounts) { @@ -843,7 +843,7 @@ int HookSendMsg(WPARAM w, LPARAM l) if (globals.bDebugLog) globals.debuglog << std::string(time_str() + ": info: checking for autoexchange possibility, name: " + toUTF8(Clist_GetContactDisplayName(hContact))); - LPSTR proto = GetContactProto(hContact); + LPSTR proto = Proto_GetBaseAccountName(hContact); ptrA jid(db_get_utfa(hContact, proto, "jid", "")); if (jid[0]) { if (globals.bDebugLog) diff --git a/plugins/New_GPG/src/options.cpp b/plugins/New_GPG/src/options.cpp index 25f4215a47..8530d04425 100755 --- a/plugins/New_GPG/src/options.cpp +++ b/plugins/New_GPG/src/options.cpp @@ -64,7 +64,7 @@ public: int row = list_USERLIST.AddItem(L"", 0); list_USERLIST.SetItemText(row, 0, name); - wchar_t *tmp = mir_a2u(GetContactProto(hContact)); + wchar_t *tmp = mir_a2u(Proto_GetBaseAccountName(hContact)); list_USERLIST.SetItemText(row, 4, tmp); mir_free(tmp); diff --git a/plugins/New_GPG/src/utilities.cpp b/plugins/New_GPG/src/utilities.cpp index ecf3610821..ac25435a73 100755 --- a/plugins/New_GPG/src/utilities.cpp +++ b/plugins/New_GPG/src/utilities.cpp @@ -115,7 +115,7 @@ INT_PTR SendKey(WPARAM w, LPARAM) char *szMessage; std::string key_id_str; { - LPSTR proto = GetContactProto(hContact); + LPSTR proto = Proto_GetBaseAccountName(hContact); PROTOACCOUNT *acc = Proto_GetAccount(proto); std::string acc_str; if (acc) { @@ -190,7 +190,7 @@ int OnPreBuildContactMenu(WPARAM w, LPARAM) MCONTACT hContact = db_mc_tryMeta(w); { CMenuItem mi2(&g_plugin); - LPSTR proto = GetContactProto(hContact); + LPSTR proto = Proto_GetBaseAccountName(hContact); PROTOACCOUNT *acc = Proto_GetAccount(proto); std::string setting; if (acc) { @@ -452,7 +452,7 @@ INT_PTR onSendFile(WPARAM w, LPARAM l) return Proto_ChainSend(w, ccs); if (isContactSecured(ccs->hContact)) { - char *proto = GetContactProto(ccs->hContact); + char *proto = Proto_GetBaseAccountName(ccs->hContact); bool cap_found = false, supported_proto = false; ptrA jid(db_get_utfa(ccs->hContact, proto, "jid", "")); if (jid[0]) { @@ -1056,7 +1056,7 @@ struct TFakeAckParams __forceinline int SendBroadcast(MCONTACT hContact, int type, int result, HANDLE hProcess, LPARAM lParam) { - return ProtoBroadcastAck(GetContactProto(hContact), hContact, type, result, hProcess, lParam); + return ProtoBroadcastAck(Proto_GetBaseAccountName(hContact), hContact, type, result, hProcess, lParam); } unsigned __stdcall sttFakeAck(void *param) @@ -1212,7 +1212,7 @@ void ExportGpGKeysFunc(int type) mir_free(k); } - const char *proto = GetContactProto(hContact); + const char *proto = Proto_GetBaseAccountName(hContact); std::string id = "Comment: login "; const char *uid = Proto_GetUniqueId(proto); DBVARIANT dbv = { 0 }; |