diff options
| author | George Hazan <ghazan@miranda.im> | 2017-02-17 21:59:55 +0300 | 
|---|---|---|
| committer | George Hazan <ghazan@miranda.im> | 2017-02-17 21:59:55 +0300 | 
| commit | 6f59b014a145d4bc7b6ec3e21f11a63af019d481 (patch) | |
| tree | abbfa1d946b7e42747c050018cc2c6f0efdcd5f3 /protocols/Discord/src | |
| parent | 864bb725fe2bb200853244a766a96b5aab86eb7e (diff) | |
Discord: fix to close chats on going offline
Diffstat (limited to 'protocols/Discord/src')
| -rw-r--r-- | protocols/Discord/src/utils.cpp | 5 | ||||
| -rw-r--r-- | protocols/Discord/src/version.h | 2 | 
2 files changed, 5 insertions, 2 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) diff --git a/protocols/Discord/src/version.h b/protocols/Discord/src/version.h index 3014fd20d8..1232d84168 100644 --- a/protocols/Discord/src/version.h +++ b/protocols/Discord/src/version.h @@ -1,7 +1,7 @@  #define __MAJOR_VERSION            0  #define __MINOR_VERSION            4  #define __RELEASE_NUM              0 -#define __BUILD_NUM                1 +#define __BUILD_NUM                2  #include <stdver.h>  | 
