From 8db6b3f25e173f7c305580fad8cbd67a7121b169 Mon Sep 17 00:00:00 2001 From: George Hazan Date: Tue, 27 Dec 2016 22:06:02 +0300 Subject: implementation of CDiscordProto::SetStatus --- protocols/Discord/src/utils.cpp | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) create mode 100644 protocols/Discord/src/utils.cpp (limited to 'protocols/Discord/src/utils.cpp') diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp new file mode 100644 index 0000000000..a542a4a7c5 --- /dev/null +++ b/protocols/Discord/src/utils.cpp @@ -0,0 +1,25 @@ +/* +Copyright © 2016 Miranda NG team + +This program is free software: you can redistribute it and/or modify +it under the terms of the GNU General Public License as published by +the Free Software Foundation, either version 2 of the License, or +(at your option) any later version. + +This program is distributed in the hope that it will be useful, +but WITHOUT ANY WARRANTY; without even the implied warranty of +MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +GNU General Public License for more details. + +You should have received a copy of the GNU General Public License +along with this program. If not, see . +*/ + +#include "stdafx.h" + +void CDiscordProto::SetAllContactStatuses(int status) +{ + for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) + if (!getByte(hContact, "ChatRoom")) + setWord(hContact, "Status", (WORD)status); +} -- cgit v1.2.3