summaryrefslogtreecommitdiff
path: root/src/xmpp/xmpp_component.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xmpp/xmpp_component.cpp')
-rw-r--r--src/xmpp/xmpp_component.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index a1585d7..825193c 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -338,7 +338,9 @@ void XmppComponent::handle_presence(const Stanza& stanza)
const std::string own_nick = bridge->get_own_nick(iid);
if (!own_nick.empty() && own_nick != to.resource)
bridge->send_irc_nick_change(iid, to.resource);
- bridge->join_irc_channel(iid, to.resource);
+ XmlNode* x = stanza.get_child("x", MUC_NS);
+ XmlNode* password = x? x->get_child("password", MUC_NS): NULL;
+ bridge->join_irc_channel(iid, to.resource, password? password->get_inner(): "");
}
else if (type == "unavailable")
{