summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
Diffstat (limited to 'Swiften/MUC/MUC.cpp')
-rw-r--r--Swiften/MUC/MUC.cpp10
1 files changed, 10 insertions, 0 deletions
diff --git a/Swiften/MUC/MUC.cpp b/Swiften/MUC/MUC.cpp
index 08391b4..15355ad 100644
--- a/Swiften/MUC/MUC.cpp
+++ b/Swiften/MUC/MUC.cpp
@@ -44,6 +44,13 @@ void MUC::joinAs(const std::string &nick) {
}
/**
+ * Set the password used for entering the room.
+ */
+void MUC::setPassword(const boost::optional<std::string>& newPassword) {
+ password = newPassword;
+}
+
+/**
* Join the MUC with context since date.
*/
void MUC::joinWithContextSince(const std::string &nick, const boost::posix_time::ptime& since) {
@@ -68,6 +75,9 @@ void MUC::internalJoin(const std::string &nick) {
if (joinSince_ != boost::posix_time::not_a_date_time) {
mucPayload->setSince(joinSince_);
}
+ if (password) {
+ mucPayload->setPassword(*password);
+ }
joinPresence->addPayload(mucPayload);
presenceSender->sendPresence(joinPresence);