summaryrefslogtreecommitdiff
path: root/protocols/IRCG/src/commandmonitor.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/IRCG/src/commandmonitor.cpp')
-rw-r--r--protocols/IRCG/src/commandmonitor.cpp14
1 files changed, 4 insertions, 10 deletions
diff --git a/protocols/IRCG/src/commandmonitor.cpp b/protocols/IRCG/src/commandmonitor.cpp
index a38c11fe2a..e91473722a 100644
--- a/protocols/IRCG/src/commandmonitor.cpp
+++ b/protocols/IRCG/src/commandmonitor.cpp
@@ -139,12 +139,9 @@ VOID CALLBACK OnlineNotifTimerProc( HWND, UINT, UINT_PTR idEvent, DWORD )
if ( name.IsEmpty() && name2.IsEmpty()) {
DBVARIANT dbv;
- char* szProto;
-
- HANDLE hContact = db_find_first();
- while ( hContact ) {
- szProto = GetContactProto(hContact);
- if ( szProto != NULL && !lstrcmpiA( szProto, ppro->m_szModuleName )) {
+ for (HANDLE hContact = db_find_first(); hContact; hContact = db_find_next(hContact)) {
+ char *szProto = GetContactProto(hContact);
+ if (szProto != NULL && !lstrcmpiA( szProto, ppro->m_szModuleName)) {
BYTE bRoom = ppro->getByte(hContact, "ChatRoom", 0);
if ( bRoom == 0 ) {
BYTE bDCC = ppro->getByte(hContact, "DCC", 0);
@@ -177,10 +174,7 @@ VOID CALLBACK OnlineNotifTimerProc( HWND, UINT, UINT_PTR idEvent, DWORD )
if ( DBNick ) db_free(&dbv);
if ( DBWildcard ) db_free(&dbv2);
- } } } } }
-
- hContact = db_find_next(hContact);
- } }
+ } } } } } } }
if ( ppro->m_namesToWho.IsEmpty() && ppro->m_namesToUserhost.IsEmpty()) {
ppro->SetChatTimer( ppro->OnlineNotifTimer, 60*1000, OnlineNotifTimerProc );