summaryrefslogtreecommitdiff
path: root/protocols/Dummy/src/dummy_proto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/Dummy/src/dummy_proto.cpp')
-rw-r--r--protocols/Dummy/src/dummy_proto.cpp18
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;
}