From 783ba52665fc16c15de32eb781e505b16f86cb05 Mon Sep 17 00:00:00 2001 From: Matthias Larisch Date: Mon, 30 Nov 2015 20:24:54 +0100 Subject: [PATCH] Implement joinChannel command joinChannel moves the current user into the given channel identified by channel_id. --- include/mumlib.hpp | 4 +++- src/mumlib.cpp | 6 ++++++ 2 files changed, 9 insertions(+), 1 deletion(-) diff --git a/include/mumlib.hpp b/include/mumlib.hpp index b64f221..992321c 100644 --- a/include/mumlib.hpp +++ b/include/mumlib.hpp @@ -41,7 +41,9 @@ namespace mumlib { void sendTextMessage(std::string message); + void joinChannel(int channel_id); + private: _Mumlib_Private *impl; }; -} \ No newline at end of file +} diff --git a/src/mumlib.cpp b/src/mumlib.cpp index f140a81..94d92b6 100644 --- a/src/mumlib.cpp +++ b/src/mumlib.cpp @@ -371,4 +371,10 @@ namespace mumlib { textMessage.set_message(message); impl->transport.sendControlMessage(MessageType::TEXTMESSAGE, textMessage); } + + void Mumlib::joinChannel(int channel_id) { + MumbleProto::UserState userState; + userState.set_channel_id(channel_id); + impl->transport.sendControlMessage(MessageType::USERSTATE, userState); + } }