diff options
Diffstat (limited to 'protocols/YAMN/src/proto/pop3/pop3comm.cpp')
| -rw-r--r-- | protocols/YAMN/src/proto/pop3/pop3comm.cpp | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/protocols/YAMN/src/proto/pop3/pop3comm.cpp b/protocols/YAMN/src/proto/pop3/pop3comm.cpp index c3ffa80e5b..3410d187e6 100644 --- a/protocols/YAMN/src/proto/pop3/pop3comm.cpp +++ b/protocols/YAMN/src/proto/pop3/pop3comm.cpp @@ -219,19 +219,15 @@ int RegisterPOP3Plugin(WPARAM, LPARAM) for (CAccount *Finder = POP3Plugin->FirstAccount; Finder != nullptr; Finder = Finder->Next) {
Finder->hContact = NULL;
for (auto &hContact : Contacts(YAMN_DBMODULE)) {
- DBVARIANT dbv;
- if (!g_plugin.getString(hContact, "Id", &dbv)) {
- if (mir_strcmp(dbv.pszVal, Finder->Name) == 0) {
- Finder->hContact = hContact;
- g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_ONLINE);
- db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message"));
- if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT))
- Contact::Hide(Finder->hContact, false);
-
- if (!(Finder->Flags & YAMN_ACC_ENA) || !(Finder->NewMailN.Flags & YAMN_ACC_CONT))
- Contact::Hide(Finder->hContact);
- }
- db_free(&dbv);
+ if (g_plugin.getMStringA(hContact, "Id") == Finder->Name) {
+ Finder->hContact = hContact;
+ g_plugin.setWord(Finder->hContact, "Status", ID_STATUS_ONLINE);
+ db_set_s(Finder->hContact, "CList", "StatusMsg", Translate("No new mail message"));
+ if ((Finder->Flags & YAMN_ACC_ENA) && (Finder->NewMailN.Flags & YAMN_ACC_CONT))
+ Contact::Hide(Finder->hContact, false);
+
+ if (!(Finder->Flags & YAMN_ACC_ENA) || !(Finder->NewMailN.Flags & YAMN_ACC_CONT))
+ Contact::Hide(Finder->hContact);
}
}
|
