diff options
author | Florent Le Coz <louiz@louiz.org> | 2014-02-19 02:38:22 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2014-02-19 02:38:22 +0100 |
commit | 112197f6ab8ec392aecfccd10af5547633fe7482 (patch) | |
tree | 2410aad82d6bf01bffeff4c36afb03d9363afe26 /src/irc | |
parent | 8fd2746696d32262b2e6900879a9a315e56f76f2 (diff) | |
download | biboumi-112197f6ab8ec392aecfccd10af5547633fe7482.tar.gz biboumi-112197f6ab8ec392aecfccd10af5547633fe7482.tar.bz2 biboumi-112197f6ab8ec392aecfccd10af5547633fe7482.tar.xz biboumi-112197f6ab8ec392aecfccd10af5547633fe7482.zip |
Fix the joined flag on channels, avoid sending the topic twice when joining
Diffstat (limited to 'src/irc')
-rw-r--r-- | src/irc/irc_client.cpp | 6 |
1 files changed, 2 insertions, 4 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp index bb2fc75..d65da87 100644 --- a/src/irc/irc_client.cpp +++ b/src/irc/irc_client.cpp @@ -270,10 +270,7 @@ void IrcClient::on_channel_join(const IrcMessage& message) IrcChannel* channel = this->get_channel(chan_name); const std::string nick = message.prefix; if (channel->joined == false) - { - channel->joined = true; - channel->set_self(nick); - } + channel->set_self(nick); else { const IrcUser* user = channel->add_user(nick, this->prefix_to_mode); @@ -343,6 +340,7 @@ void IrcClient::on_channel_completely_joined(const IrcMessage& message) { const std::string chan_name = utils::tolower(message.arguments[1]); IrcChannel* channel = this->get_channel(chan_name); + channel->joined = true; this->bridge->send_user_join(this->hostname, chan_name, channel->get_self(), channel->get_self()->get_most_significant_mode(this->sorted_user_modes), true); |