summaryrefslogtreecommitdiff
path: root/protocols/Tox/src/tox_proto.cpp
diff options
context:
space:
mode:
authorAlexander Lantsev <aunsane@gmail.com>2015-02-22 21:14:05 +0000
committerAlexander Lantsev <aunsane@gmail.com>2015-02-22 21:14:05 +0000
commit4ffd0909f7990643a0253849d46a750bd9f3233b (patch)
treea0a004674fcd9ad0600f7c1ae5728bea499f9db0 /protocols/Tox/src/tox_proto.cpp
parent0e8ffa6f388f28411decbcc6fe6c834029830714 (diff)
Tox: some code for group chats
git-svn-id: http://svn.miranda-ng.org/main/trunk@12241 1316c22d-e87f-b044-9b9b-93d7a3e3ba9c
Diffstat (limited to 'protocols/Tox/src/tox_proto.cpp')
-rw-r--r--protocols/Tox/src/tox_proto.cpp8
1 files changed, 8 insertions, 0 deletions
diff --git a/protocols/Tox/src/tox_proto.cpp b/protocols/Tox/src/tox_proto.cpp
index 5da0686a7a..117c7f8ec9 100644
--- a/protocols/Tox/src/tox_proto.cpp
+++ b/protocols/Tox/src/tox_proto.cpp
@@ -48,6 +48,10 @@ CToxProto::CToxProto(const char* protoName, const TCHAR* userName) :
CreateProtoService(PS_SETMYNICKNAME, &CToxProto::SetMyNickname);
+ // chat rooms
+ CreateProtoService(PS_JOINCHAT, &CToxProto::OnJoinChatRoom);
+ CreateProtoService(PS_LEAVECHAT, &CToxProto::OnLeaveChatRoom);
+
// transfers
transfers = new CTransferList();
}
@@ -221,6 +225,7 @@ int __cdecl CToxProto::SetStatus(int iNewStatus)
if (!Miranda_Terminated())
{
SetAllContactsStatus(ID_STATUS_OFFLINE);
+ CloseAllChatChatSessions();
}
m_iStatus = m_iDesiredStatus = ID_STATUS_OFFLINE;
@@ -284,6 +289,9 @@ int __cdecl CToxProto::OnEvent(PROTOEVENTTYPE iEventType, WPARAM wParam, LPARAM
case EV_PROTO_ONCONTACTDELETED:
return OnContactDeleted(wParam, lParam);
+
+ case EV_PROTO_ONMENU:
+ return OnInitStatusMenu();
}
return 1;