summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-01-14 13:36:42 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-01-14 13:36:42 +0100
commitf9e259c266e5e9247562f899bafd5ddd2aa46099 (patch)
treec30249ec5263680af4e8f2b855a8e6fdb96710b6
parente4fcbd3030f033c24102db9f6b6abfb540332c9d (diff)
downloadbiboumi-f9e259c266e5e9247562f899bafd5ddd2aa46099.tar.gz
biboumi-f9e259c266e5e9247562f899bafd5ddd2aa46099.tar.bz2
biboumi-f9e259c266e5e9247562f899bafd5ddd2aa46099.tar.xz
biboumi-f9e259c266e5e9247562f899bafd5ddd2aa46099.zip
Fix a little bit of style stuf from previous commit
-rw-r--r--src/bridge/bridge.hpp2
-rw-r--r--src/xmpp/xmpp_component.cpp5
2 files changed, 4 insertions, 3 deletions
diff --git a/src/bridge/bridge.hpp b/src/bridge/bridge.hpp
index 698a017..13cac23 100644
--- a/src/bridge/bridge.hpp
+++ b/src/bridge/bridge.hpp
@@ -58,7 +58,7 @@ public:
* Try to join an irc_channel, does nothing and return true if the channel
* was already joined.
*/
- bool join_irc_channel(const Iid& iid, const std::string& username, const std::string& password = "");
+ bool join_irc_channel(const Iid& iid, const std::string& username, const std::string& password);
void send_channel_message(const Iid& iid, const std::string& body);
void send_private_message(const Iid& iid, const std::string& body, const std::string& type="PRIVMSG");
void leave_irc_channel(Iid&& iid, std::string&& status_message);
diff --git a/src/xmpp/xmpp_component.cpp b/src/xmpp/xmpp_component.cpp
index 825193c..c63dc00 100644
--- a/src/xmpp/xmpp_component.cpp
+++ b/src/xmpp/xmpp_component.cpp
@@ -339,8 +339,9 @@ void XmppComponent::handle_presence(const Stanza& stanza)
if (!own_nick.empty() && own_nick != to.resource)
bridge->send_irc_nick_change(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(): "");
+ XmlNode* password = x ? x->get_child("password", MUC_NS): nullptr;
+ bridge->join_irc_channel(iid, to.resource,
+ password ? password->get_inner() : "");
}
else if (type == "unavailable")
{