diff options
author | louiz’ <louiz@louiz.org> | 2018-03-04 22:18:58 +0100 |
---|---|---|
committer | louiz’ <louiz@louiz.org> | 2018-03-12 00:13:59 +0100 |
commit | 158d743bf539399e48c64044639b90e5c1705ac1 (patch) | |
tree | 5fd7d2846a95e4d6244b10a907a804670c48536f /src/bridge | |
parent | 8503d1f6831fc8522a16e0670578d1157d23e116 (diff) | |
download | biboumi-158d743bf539399e48c64044639b90e5c1705ac1.tar.gz biboumi-158d743bf539399e48c64044639b90e5c1705ac1.tar.bz2 biboumi-158d743bf539399e48c64044639b90e5c1705ac1.tar.xz biboumi-158d743bf539399e48c64044639b90e5c1705ac1.zip |
Remove the virtual channel feature altogether
Diffstat (limited to 'src/bridge')
-rw-r--r-- | src/bridge/bridge.cpp | 39 |
1 files changed, 1 insertions, 38 deletions
diff --git a/src/bridge/bridge.cpp b/src/bridge/bridge.cpp index fefab40..cd3492f 100644 --- a/src/bridge/bridge.cpp +++ b/src/bridge/bridge.cpp @@ -63,7 +63,6 @@ void Bridge::shutdown(const std::string& exit_message) for (auto& pair: this->irc_clients) { pair.second->send_quit_command(exit_message); - pair.second->leave_dummy_channel(exit_message, {}); } } @@ -176,35 +175,6 @@ bool Bridge::join_irc_channel(const Iid& iid, const std::string& nickname, const auto res_in_chan = this->is_resource_in_chan(ChannelKey{iid.get_local(), hostname}, resource); if (!res_in_chan) this->add_resource_to_chan(ChannelKey{iid.get_local(), hostname}, resource); - if (iid.get_local().empty()) - { // Join the dummy channel - if (irc->is_welcomed()) - { - if (res_in_chan) - return false; - // Immediately simulate a message coming from the IRC server saying that we - // joined the channel - if (irc->get_dummy_channel().joined) - { - this->generate_channel_join_for_resource(iid, resource); - } - else - { - const IrcMessage join_message(irc->get_nick(), "JOIN", {""}); - irc->on_channel_join(join_message); - const IrcMessage end_join_message(std::string(iid.get_server()), "366", - {irc->get_nick(), - "", "End of NAMES list"}); - irc->on_channel_completely_joined(end_join_message); - } - } - else - { - irc->get_dummy_channel().joining = true; - irc->start(); - } - return true; - } if (irc->is_channel_joined(iid.get_local()) == false) { irc->send_join_command(iid.get_local(), password); @@ -445,11 +415,7 @@ void Bridge::leave_irc_channel(Iid&& iid, const std::string& status_message, con #endif if (channel->joined && !channel->parting && !persistent) { - const auto& chan_name = iid.get_local(); - if (chan_name.empty()) - irc->leave_dummy_channel(status_message, resource); - else - irc->send_part_command(iid.get_local(), status_message); + irc->send_part_command(iid.get_local(), status_message); } else if (channel->joined) { @@ -1254,9 +1220,6 @@ std::size_t Bridge::number_of_channels_the_resource_is_in(const std::string& irc res++; } - IrcClient* irc = this->find_irc_client(irc_hostname); - if (irc && (irc->get_dummy_channel().joined || irc->get_dummy_channel().joining)) - res++; return res; } |