diff options
author | George Hazan <ghazan@miranda.im> | 2018-03-28 20:01:30 +0300 |
---|---|---|
committer | George Hazan <ghazan@miranda.im> | 2018-03-28 20:01:30 +0300 |
commit | e7b69721b0d390cec3f81f97134a51bfef228cf8 (patch) | |
tree | a56ef2bd15fa3c995a031bec35ce0113dec22b28 /protocols/Dummy/src/dummy_proto.cpp | |
parent | 81ce57622c3166830b23eae534dacc6b008c659d (diff) |
PFLAG_UNIQUEIDSETTING removed, its functionality transferred to Proto_SetUniqueId / Proto_GetUniqueId
Diffstat (limited to 'protocols/Dummy/src/dummy_proto.cpp')
-rw-r--r-- | protocols/Dummy/src/dummy_proto.cpp | 18 |
1 files changed, 8 insertions, 10 deletions
diff --git a/protocols/Dummy/src/dummy_proto.cpp b/protocols/Dummy/src/dummy_proto.cpp index 3dd8c0ee4a..f95c8ccfb4 100644 --- a/protocols/Dummy/src/dummy_proto.cpp +++ b/protocols/Dummy/src/dummy_proto.cpp @@ -61,7 +61,14 @@ CDummyProto::CDummyProto(const char *szModuleName, const wchar_t *ptszUserName) msgid = 0; - uniqueIdText[0] = '\0'; + int id = getTemplateId(); + ptrA setting(id > 0 ? mir_strdup(templates[id].setting) : getStringA(DUMMY_ID_SETTING)); + if (setting != NULL) { + strncpy_s(uniqueIdText, setting, _TRUNCATE); + Proto_SetUniqueId(m_szModuleName, uniqueIdText); + } + else uniqueIdText[0] = '\0'; + uniqueIdSetting[0] = '\0'; dummy_Instances.insert(this); @@ -113,15 +120,6 @@ DWORD_PTR CDummyProto::GetCaps(int type, MCONTACT) strncpy_s(uniqueIdSetting, setting, _TRUNCATE); } return (DWORD_PTR)uniqueIdSetting; - - case PFLAG_UNIQUEIDSETTING: - if (uniqueIdText[0] == '\0') { - int id = getTemplateId(); - ptrA setting(id > 0 ? mir_strdup(templates[id].setting) : getStringA(DUMMY_ID_SETTING)); - if (setting != NULL) - strncpy_s(uniqueIdText, setting, _TRUNCATE); - } - return (DWORD_PTR)uniqueIdText; } return 0; } |