diff options
author | George Hazan <george.hazan@gmail.com> | 2013-09-24 19:22:39 +0000 |
---|---|---|
committer | George Hazan <george.hazan@gmail.com> | 2013-09-24 19:22:39 +0000 |
commit | 19ab68c3d146d0d0dc24e9c8153e90d218395209 (patch) | |
tree | 0e5a8d34a25dafa1d1fb71cddd9e5d7528c116e1 /protocols/GTalkExt/src/db.cpp | |
parent | fb190494fe8550288e5c8741bebec9ab0f58284e (diff) |
GTalkExt: contact list contact restored
git-svn-id: http://svn.miranda-ng.org/main/trunk@6214 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/GTalkExt/src/db.cpp')
-rw-r--r-- | protocols/GTalkExt/src/db.cpp | 18 |
1 files changed, 18 insertions, 0 deletions
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);
+ }
+ }
+}
|