From 19ab68c3d146d0d0dc24e9c8153e90d218395209 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 24 Sep 2013 19:22:39 +0000 Subject: GTalkExt: contact list contact restored git-svn-id: http://svn.miranda-ng.org/main/trunk@6214 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c --- protocols/GTalkExt/src/db.cpp | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) (limited to 'protocols/GTalkExt/src/db.cpp') diff --git a/protocols/GTalkExt/src/db.cpp b/protocols/GTalkExt/src/db.cpp index 691e065bc3..a652babe49 100644 --- a/protocols/GTalkExt/src/db.cpp +++ b/protocols/GTalkExt/src/db.cpp @@ -31,3 +31,21 @@ void WriteJidSetting(LPCSTR name, LPCTSTR jid, LPCTSTR setting) { db_set_ts(0, name, _T2A(jid), setting); } + +void RenewPseudocontactHandles() +{ + int count = 0; + PROTOACCOUNT **protos; + ProtoEnumAccounts(&count, &protos); + for (int i = 0; i < count; i++) { + db_unset(0, protos[i]->szModuleName, PSEUDOCONTACT_LINK); + db_unset(0, protos[i]->szModuleName, "GMailExtNotifyContact"); // remove this + } + + for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) { + if (db_get_b(hContact, SHORT_PLUGIN_NAME, PSEUDOCONTACT_FLAG, 0)) { + LPCSTR proto = (LPCSTR)GetContactProto(hContact); + db_set_dw(NULL, proto, PSEUDOCONTACT_LINK, (DWORD)hContact); + } + } +} -- cgit v1.2.3