Add support for password-protected IRC rooms.

This commit is contained in:
Emmanuel Gil Peyrot
2015-01-14 12:38:46 +01:00
parent e2e2f30894
commit e4fcbd3030
5 changed files with 9 additions and 7 deletions
+3 -1
View File
@@ -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")
{