diff options
Diffstat (limited to 'src/modules/clist/clistmod.cpp')
-rw-r--r-- | src/modules/clist/clistmod.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/clist/clistmod.cpp b/src/modules/clist/clistmod.cpp index 2f1cbfbfd0..2bc691ca94 100644 --- a/src/modules/clist/clistmod.cpp +++ b/src/modules/clist/clistmod.cpp @@ -146,13 +146,13 @@ static int ProtocolAck(WPARAM, LPARAM lParam) if ((int) ack->hProcess < ID_STATUS_ONLINE && ack->lParam >= ID_STATUS_ONLINE) {
DWORD caps = (DWORD)CallProtoServiceInt(NULL,ack->szModule, PS_GETCAPS, PFLAGNUM_1, 0);
if (caps & PF1_SERVERCLIST) {
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact) {
char *szProto = (char *) CallService(MS_PROTO_GETCONTACTBASEPROTO, (WPARAM) hContact, 0);
if (szProto != NULL && !strcmp(szProto, ack->szModule))
if (db_get_b(hContact, "CList", "Delete", 0))
CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
- hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ hContact = db_find_next(hContact);
}
}
}
@@ -552,9 +552,9 @@ void UnloadContactListModule() return;
//remove transitory contacts
- HANDLE hContact = (HANDLE) CallService(MS_DB_CONTACT_FINDFIRST, 0, 0);
+ HANDLE hContact = db_find_first();
while (hContact != NULL) {
- HANDLE hNext = (HANDLE) CallService(MS_DB_CONTACT_FINDNEXT, (WPARAM) hContact, 0);
+ HANDLE hNext = db_find_next(hContact);
if (db_get_b(hContact, "CList", "NotOnList", 0))
CallService(MS_DB_CONTACT_DELETE, (WPARAM) hContact, 0);
hContact = hNext;
|