diff options
author | Florent Le Coz <louiz@louiz.org> | 2015-10-31 06:17:35 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2015-10-31 06:17:35 +0100 |
commit | 34fc1d4010d23be947c00fc956f2bdded2374cee (patch) | |
tree | 51db9af976e97d37547b5bba8f1465b4a1561cf4 /src/bridge | |
parent | 2c932cf0f7ca9bc82430c1da5097653f6a4d0bf4 (diff) | |
download | biboumi-34fc1d4010d23be947c00fc956f2bdded2374cee.tar.gz biboumi-34fc1d4010d23be947c00fc956f2bdded2374cee.tar.bz2 biboumi-34fc1d4010d23be947c00fc956f2bdded2374cee.tar.xz biboumi-34fc1d4010d23be947c00fc956f2bdded2374cee.zip |
Implement a basic webirc support
See https://kiwiirc.com/docs/webirc
fix #3135
Diffstat (limited to 'src/bridge')
-rw-r--r-- | src/bridge/bridge.cpp | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index 18a8d92..5badb18 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -56,7 +56,8 @@ void Bridge::clean() while (it != this->irc_clients.end()) { IrcClient* client = it->second.get(); - if (!client->is_connected() && !client->is_connecting()) + if (!client->is_connected() && !client->is_connecting() && + !client->get_resolver().is_resolving()) it = this->irc_clients.erase(it); else ++it; @@ -94,16 +95,17 @@ IrcClient* Bridge::make_irc_client(const std::string& hostname, const std::strin { auto username = nickname; auto realname = nickname; + Jid jid(this->user_jid); if (Config::get("realname_from_jid", "false") == "true") { - Jid jid(this->user_jid); username = jid.local; realname = this->get_bare_jid(); } this->irc_clients.emplace(hostname, std::make_shared<IrcClient>(this->poller, hostname, nickname, username, - realname, this)); + realname, jid.domain, + this)); std::shared_ptr<IrcClient> irc = this->irc_clients.at(hostname); return irc.get(); } |