diff options
author | George Hazan <ghazan@miranda.im> | 2019-02-27 18:06:58 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2019-02-27 18:06:58 +0300 |
commit | 5eb599b7e3b9d0ae73661b74f5adbe05c73a50d2 (patch) | |
tree | 94dc27f92ce7965554a4e54501f989f68d0d63db /src | |
parent | daa30830aa1633a950deda06133d7a7d43d1cda8 (diff) |
fixes #1846 (tabSRMM: get my own nick from "MyHandle")
Diffstat (limited to 'src')
-rw-r--r-- | src/mir_app/src/contacts.cpp | 15 |
1 files changed, 4 insertions, 11 deletions
diff --git a/src/mir_app/src/contacts.cpp b/src/mir_app/src/contacts.cpp index f57493fee2..053b94490d 100644 --- a/src/mir_app/src/contacts.cpp +++ b/src/mir_app/src/contacts.cpp @@ -116,17 +116,10 @@ MIR_APP_DLL(wchar_t*) Contact_GetInfo(int type, MCONTACT hContact, const char *s case CNF_COSTATE: return ProcessDatabaseValueDefault(hContact, szProto, "CompanyState");
case CNF_COZIP: return ProcessDatabaseValueDefault(hContact, szProto, "CompanyZIP");
case CNF_COHOMEPAGE: return ProcessDatabaseValueDefault(hContact, szProto, "CompanyHomepage");
-
- case CNF_CUSTOMNICK:
- {
- const char* saveProto = szProto; szProto = "CList";
- if (hContact != 0 && !ProcessDatabaseValueDefault(hContact, szProto, "MyHandle")) {
- szProto = saveProto;
- return nullptr;
- }
- szProto = saveProto;
- }
- break;
+ case CNF_CUSTOMNICK:
+ if (hContact)
+ return ProcessDatabaseValueDefault(hContact, "CList", "MyHandle");
+ return ProcessDatabaseValueDefault(0, szProto, "MyHandle");
case CNF_COUNTRY:
case CNF_COCOUNTRY:
|