diff options
Diffstat (limited to 'protocols/Discord/src/utils.cpp')
-rw-r--r-- | protocols/Discord/src/utils.cpp | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/protocols/Discord/src/utils.cpp b/protocols/Discord/src/utils.cpp index 40911369d2..4747afd2a9 100644 --- a/protocols/Discord/src/utils.cpp +++ b/protocols/Discord/src/utils.cpp @@ -19,9 +19,12 @@ along with this program. If not, see <http://www.gnu.org/licenses/>. void CDiscordProto::SetAllContactStatuses(int status) { - for (MCONTACT hContact = db_find_first(m_szModuleName); hContact; hContact = db_find_next(hContact, m_szModuleName)) + 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); + else if (status == ID_STATUS_OFFLINE) + Chat_Control(m_szModuleName, ptrW(getWStringA(hContact, "ChatRoomID")), SESSION_TERMINATE); + } } int StrToStatus(const CMStringW &str) |