summaryrefslogtreecommitdiff
path: root/plugins/YAMN/src
diff options
context:
space:
mode:
Diffstat (limited to 'plugins/YAMN/src')
-rw-r--r--plugins/YAMN/src/proto/pop3/pop3comm.cpp28
1 files changed, 12 insertions, 16 deletions
diff --git a/plugins/YAMN/src/proto/pop3/pop3comm.cpp b/plugins/YAMN/src/proto/pop3/pop3comm.cpp
index dcb2d55b59..da50c74b56 100644
--- a/plugins/YAMN/src/proto/pop3/pop3comm.cpp
+++ b/plugins/YAMN/src/proto/pop3/pop3comm.cpp
@@ -278,23 +278,19 @@ int RegisterPOP3Plugin(WPARAM,LPARAM)
for (Finder=POP3Plugin->FirstAccount;Finder != NULL;Finder=Finder->Next)
{
Finder->hContact = NULL;
- for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
- szProto = GetContactProto(hContact);
- if (szProto != NULL && strcmp(szProto, YAMN_DBMODULE)==0)
- {
- if (!db_get_s(hContact,YAMN_DBMODULE,"Id",&dbv)) {
- if ( strcmp( dbv.pszVal, Finder->Name) == 0) {
- Finder->hContact = hContact;
- db_set_w(Finder->hContact, YAMN_DBMODULE, "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))
- db_unset(Finder->hContact, "CList", "Hidden");
-
- if (!(Finder->Flags & YAMN_ACC_ENA) || !(Finder->NewMailN.Flags & YAMN_ACC_CONT))
- db_set_b(Finder->hContact, "CList", "Hidden", 1);
- }
- db_free(&dbv);
+ for (HANDLE hContact = db_find_first(YAMN_DBMODULE); hContact; hContact = db_find_next(hContact, YAMN_DBMODULE)) {
+ if (!db_get_s(hContact,YAMN_DBMODULE,"Id",&dbv)) {
+ if ( strcmp( dbv.pszVal, Finder->Name) == 0) {
+ Finder->hContact = hContact;
+ db_set_w(Finder->hContact, YAMN_DBMODULE, "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))
+ db_unset(Finder->hContact, "CList", "Hidden");
+
+ if (!(Finder->Flags & YAMN_ACC_ENA) || !(Finder->NewMailN.Flags & YAMN_ACC_CONT))
+ db_set_b(Finder->hContact, "CList", "Hidden", 1);
}
+ db_free(&dbv);
}
}