summaryrefslogtreecommitdiff
path: root/protocols/MRA/src/MraProto.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'protocols/MRA/src/MraProto.cpp')
-rw-r--r--protocols/MRA/src/MraProto.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/protocols/MRA/src/MraProto.cpp b/protocols/MRA/src/MraProto.cpp
index 03cd7f2336..2dd3b590a7 100644
--- a/protocols/MRA/src/MraProto.cpp
+++ b/protocols/MRA/src/MraProto.cpp
@@ -90,7 +90,7 @@ int CMraProto::OnModulesLoaded(WPARAM, LPARAM)
HookProtoEvent(ME_CLIST_GROUPCHANGE, &CMraProto::OnGroupChanged);
// всех в offline // тк unsaved values сохран¤ютс¤ их нужно инициализировать
- for (MCONTACT hContact = db_find_first(m_szModuleName); hContact != NULL; hContact = db_find_next(hContact, m_szModuleName))
+ for (auto &hContact : acc_contact_iter())
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID | SCBIF_GROUP_ID | SCBIF_SERVER_FLAG | SCBIF_STATUS), -1, -1, 0, 0, ID_STATUS_OFFLINE, nullptr, nullptr, nullptr);
// unsaved values
@@ -462,7 +462,7 @@ int CMraProto::SetStatus(int iNewStatus)
// всех в offline, только если мы бывали подключены
if (dwOldStatusMode > ID_STATUS_OFFLINE)
- for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName))
+ for (auto &hContact : acc_contact_iter())
SetContactBasicInfoW(hContact, SCBIFSI_LOCK_CHANGES_EVENTS, (SCBIF_ID | SCBIF_GROUP_ID | SCBIF_SERVER_FLAG | SCBIF_STATUS), -1, -1, 0, 0, ID_STATUS_OFFLINE, nullptr, nullptr, nullptr);
if (m_hConnection != nullptr)