From 77ccb3558c67c83bd0ce5136b785467ef2697911 Mon Sep 17 00:00:00 2001 From: aunsane Date: Sat, 30 Dec 2017 00:46:19 +0300 Subject: Tox: removed own realization of SetAllContactStatus --- protocols/Tox/src/tox_contacts.cpp | 6 ------ protocols/Tox/src/tox_proto.cpp | 4 ++-- protocols/Tox/src/tox_proto.h | 1 - 3 files changed, 2 insertions(+), 9 deletions(-) diff --git a/protocols/Tox/src/tox_contacts.cpp b/protocols/Tox/src/tox_contacts.cpp index 4e1ee4abf4..08931dee00 100644 --- a/protocols/Tox/src/tox_contacts.cpp +++ b/protocols/Tox/src/tox_contacts.cpp @@ -12,12 +12,6 @@ void CToxProto::SetContactStatus(MCONTACT hContact, WORD status) setWord(hContact, "Status", status); } -void CToxProto::SetAllContactsStatus(WORD status) -{ - for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) - SetContactStatus(hContact, status); -} - MCONTACT CToxProto::GetContactFromAuthEvent(MEVENT hEvent) { DWORD body[3]; diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp index 60864594e7..237fee5be0 100644 --- a/protocols/Tox/src/tox_proto.cpp +++ b/protocols/Tox/src/tox_proto.cpp @@ -16,7 +16,7 @@ CToxProto::CToxProto(const char* protoName, const wchar_t* userName) CreateProtoService(PS_CREATEACCMGRUI, &CToxProto::OnAccountManagerInit); - SetAllContactsStatus(ID_STATUS_OFFLINE); + setAllContactStatuses(ID_STATUS_OFFLINE); // avatars CreateProtoService(PS_GETAVATARCAPS, &CToxProto::GetAvatarCaps); @@ -149,7 +149,7 @@ int CToxProto::SetStatus(int iNewStatus) SetEvent(hTerminateEvent); if (!Miranda_IsTerminated()) - SetAllContactsStatus(ID_STATUS_OFFLINE); + setAllContactStatuses(ID_STATUS_OFFLINE); m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE; ProtoBroadcastAck(NULL, ACKTYPE_STATUS, ACKRESULT_SUCCESS, (HANDLE)old_status, m_iStatus); diff --git a/protocols/Tox/src/tox_proto.h b/protocols/Tox/src/tox_proto.h index 24896724d7..ad63844d6a 100644 --- a/protocols/Tox/src/tox_proto.h +++ b/protocols/Tox/src/tox_proto.h @@ -158,7 +158,6 @@ private: // contacts WORD GetContactStatus(MCONTACT hContact); void SetContactStatus(MCONTACT hContact, WORD status); - void SetAllContactsStatus(WORD status); MCONTACT GetContact(const Tox *tox, const int friendNumber); MCONTACT GetContact(const char *pubKey); -- cgit v1.2.3