Merge pull request #5 from NerdyProjects/join_channel

Implement joinChannel command
This commit is contained in:
Michał Słomkowski 2015-12-01 23:13:51 +01:00
commit 193c498312
2 changed files with 9 additions and 1 deletions

View File

@ -41,7 +41,9 @@ namespace mumlib {
void sendTextMessage(std::string message);
void joinChannel(int channel_id);
private:
_Mumlib_Private *impl;
};
}
}

View File

@ -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);
}
}