summaryrefslogtreecommitdiff
path: root/src/bridge
diff options
context:
space:
mode:
authorlouiz’ <louiz@louiz.org>2019-08-20 21:22:30 +0200
committerlouiz’ <louiz@louiz.org>2019-09-09 12:27:27 +0200
commit8a6d053be91be238270fa7c3d9b96de149542b3b (patch)
tree178660925ec4e6c00f5bc65d48597d67eece29dc /src/bridge
parent8ac2645b02fe6a7f4d883f786009ab5626015328 (diff)
downloadbiboumi-8a6d053be91be238270fa7c3d9b96de149542b3b.tar.gz
biboumi-8a6d053be91be238270fa7c3d9b96de149542b3b.tar.bz2
biboumi-8a6d053be91be238270fa7c3d9b96de149542b3b.tar.xz
biboumi-8a6d053be91be238270fa7c3d9b96de149542b3b.zip
Remove trailing / of fulljids if IRC host is missing
Diffstat (limited to 'src/bridge')
-rw-r--r--src/bridge/bridge.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp
index 272b695..0356a84 100644
--- a/src/bridge/bridge.cpp
+++ b/src/bridge/bridge.cpp
@@ -999,8 +999,9 @@ void Bridge::send_user_join(const std::string& hostname, const std::string& chan
std::string full_jid =
encoded_nick_name + utils::empty_if_fixed_server("%" + hostname)
- + "@" + this->xmpp.get_served_hostname()
- + "/" + user->host;
+ + "@" + this->xmpp.get_served_hostname();
+ if (user->host.empty())
+ full_jid += "/" + user->host;
this->xmpp.send_user_join(encoded_chan_name + utils::empty_if_fixed_server("%" + hostname),
user->nick, full_jid, affiliation, role,