diff options
-rw-r--r-- | protocols/Facebook/src/proto.cpp | 13 | ||||
-rw-r--r-- | protocols/ICQ-WIM/src/proto.cpp | 4 |
2 files changed, 9 insertions, 8 deletions
diff --git a/protocols/Facebook/src/proto.cpp b/protocols/Facebook/src/proto.cpp index bfb6f9e71a..2873b2d8d3 100644 --- a/protocols/Facebook/src/proto.cpp +++ b/protocols/Facebook/src/proto.cpp @@ -49,12 +49,6 @@ FacebookProto::FacebookProto(const char *proto_name, const wchar_t *username) : m_bLoginInvisible(this, "LoginInvisible", false), m_wszDefaultGroup(this, "DefaultGroup", L"Facebook") { - for (auto &cc : AccContacts()) { - CMStringA szId(getMStringA(cc, DBKEY_ID)); - if (!szId.IsEmpty()) - m_users.insert(new FacebookUser(_atoi64(szId), cc, isChatRoom(cc))); - } - // to upgrade previous settings if (getByte("Compatibility") < 1) { setByte("Compatibility", 1); @@ -140,6 +134,13 @@ void FacebookProto::OnModulesLoaded() cont.path = wszPath; CallService(MS_SMILEYADD_LOADCONTACTSMILEYS, 0, LPARAM(&cont)); + // contacts cache + for (auto &cc : AccContacts()) { + CMStringA szId(getMStringA(cc, DBKEY_ID)); + if (!szId.IsEmpty()) + m_users.insert(new FacebookUser(_atoi64(szId), cc, isChatRoom(cc))); + } + // Default group Clist_GroupCreate(0, m_wszDefaultGroup); } diff --git a/protocols/ICQ-WIM/src/proto.cpp b/protocols/ICQ-WIM/src/proto.cpp index 558bbe2ce1..87a33e0502 100644 --- a/protocols/ICQ-WIM/src/proto.cpp +++ b/protocols/ICQ-WIM/src/proto.cpp @@ -114,8 +114,6 @@ CIcqProto::CIcqProto(const char *aProtoName, const wchar_t *aUserName) : } } - InitContactCache(); - m_hWorkerThread = ForkThreadEx(&CIcqProto::ServerThread, nullptr, nullptr); } @@ -129,6 +127,8 @@ CIcqProto::~CIcqProto() void CIcqProto::OnModulesLoaded() { + InitContactCache(); + HookProtoEvent(ME_USERINFO_INITIALISE, &CIcqProto::OnUserInfoInit); // load custom smilies |