Skip to content

Commit

Permalink
Merge pull request jcalifornia#5 from NerdyProjects/join_channel
Browse files Browse the repository at this point in the history
Implement joinChannel command
  • Loading branch information
slomkowski committed Dec 1, 2015
2 parents f01b693 + 783ba52 commit 193c498
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 1 deletion.
4 changes: 3 additions & 1 deletion include/mumlib.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,9 @@ namespace mumlib {

void sendTextMessage(std::string message);

void joinChannel(int channel_id);

private:
_Mumlib_Private *impl;
};
}
}
6 changes: 6 additions & 0 deletions src/mumlib.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}
}

0 comments on commit 193c498

Please sign in to comment.