summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2015-02-26 17:43:24 +0100
committerFlorent Le Coz <louiz@louiz.org>2015-02-26 17:43:24 +0100
commit82256d40a32e1401c7884b1c9ff26ea77d775d3d (patch)
tree0661670f87c6cca2b43f2a35bc5c5d71ccfff78a /src/bridge
parentc01befb054075ab414fd602859e5999a138aa5bf (diff)
parentc307df85c8e7d9bcd4570269bf13c3e92c3f5954 (diff)
downloadbiboumi-82256d40a32e1401c7884b1c9ff26ea77d775d3d.tar.gz
biboumi-82256d40a32e1401c7884b1c9ff26ea77d775d3d.tar.bz2
biboumi-82256d40a32e1401c7884b1c9ff26ea77d775d3d.tar.xz
biboumi-82256d40a32e1401c7884b1c9ff26ea77d775d3d.zip
Merge branch 'fixed_server'
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp9
1 files changed, 5 insertions, 4 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 2e3520d..1a205bd 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -5,6 +5,7 @@
#include <xmpp/xmpp_stanza.hpp>
#include <irc/irc_message.hpp>
#include <network/poller.hpp>
+#include <utils/empty_if_fixed_server.hpp>
#include <utils/encoding.hpp>
#include <utils/tolower.hpp>
#include <logger/logger.hpp>
@@ -580,13 +581,13 @@ void Bridge::send_user_join(const std::string& hostname,
std::string role;
std::tie(role, affiliation) = get_role_affiliation_from_irc_mode(user_mode);
- this->xmpp->send_user_join(chan_name + "%" + hostname, user->nick, user->host,
+ this->xmpp->send_user_join(chan_name + utils::empty_if_fixed_server("%" + hostname), user->nick, user->host,
affiliation, role, this->user_jid, self);
}
void Bridge::send_topic(const std::string& hostname, const std::string& chan_name, const std::string& topic)
{
- this->xmpp->send_topic(chan_name + "%" + hostname, this->make_xmpp_body(topic), this->user_jid);
+ this->xmpp->send_topic(chan_name + utils::empty_if_fixed_server("%" + hostname), this->make_xmpp_body(topic), this->user_jid);
}
std::string Bridge::get_own_nick(const Iid& iid)
@@ -623,7 +624,7 @@ void Bridge::send_affiliation_role_change(const Iid& iid, const std::string& tar
void Bridge::send_iq_version_request(const std::string& nick, const std::string& hostname)
{
- this->xmpp->send_iq_version_request(nick + "!" + hostname, this->user_jid);
+ this->xmpp->send_iq_version_request(nick + "!" + utils::empty_if_fixed_server(hostname), this->user_jid);
}
void Bridge::send_xmpp_ping_request(const std::string& nick, const std::string& hostname,
@@ -632,7 +633,7 @@ void Bridge::send_xmpp_ping_request(const std::string& nick, const std::string&
// Use revstr because the forwarded ping to target XMPP user must not be
// the same that the request iq, but we also need to get it back easily
// (revstr again)
- this->xmpp->send_ping_request(nick + "!" + hostname, this->user_jid, utils::revstr(id));
+ this->xmpp->send_ping_request(nick + "!" + utils::empty_if_fixed_server(hostname), this->user_jid, utils::revstr(id));
}
void Bridge::set_preferred_from_jid(const std::string& nick, const std::string& full_jid)