summaryrefslogtreecommitdiff
path: root/src/irc/irc_client.cpp
diff options
context:
space:
mode:
authorFlorent Le Coz <louiz@louiz.org>2014-01-06 01:22:43 +0100
committerFlorent Le Coz <louiz@louiz.org>2014-01-06 01:22:43 +0100
commitfef9c8193ddf8cdf81978874be788af9441e2286 (patch)
treef38a50b1e52e3da1a66d4d2ab5016a2cd7903322 /src/irc/irc_client.cpp
parent7701c907636d79f55e033aa7adaf7ffae4150c91 (diff)
downloadbiboumi-fef9c8193ddf8cdf81978874be788af9441e2286.tar.gz
biboumi-fef9c8193ddf8cdf81978874be788af9441e2286.tar.bz2
biboumi-fef9c8193ddf8cdf81978874be788af9441e2286.tar.xz
biboumi-fef9c8193ddf8cdf81978874be788af9441e2286.zip
Also set the role and affiliation of users already in the chan
Diffstat (limited to 'src/irc/irc_client.cpp')
-rw-r--r--src/irc/irc_client.cpp12
1 files changed, 9 insertions, 3 deletions
diff --git a/src/irc/irc_client.cpp b/src/irc/irc_client.cpp
index 1e8e326..644351e 100644
--- a/src/irc/irc_client.cpp
+++ b/src/irc/irc_client.cpp
@@ -247,7 +247,9 @@ void IrcClient::set_and_forward_user_list(const IrcMessage& message)
if (user->nick != channel->get_self()->nick)
{
log_debug("Adding user [" << nick << "] to chan " << chan_name);
- this->bridge->send_user_join(this->hostname, chan_name, user, false);
+ this->bridge->send_user_join(this->hostname, chan_name, user,
+ user->get_most_significant_mode(this->sorted_user_modes),
+ false);
}
else
{
@@ -270,7 +272,9 @@ void IrcClient::on_channel_join(const IrcMessage& message)
else
{
const IrcUser* user = channel->add_user(nick, this->prefix_to_mode);
- this->bridge->send_user_join(this->hostname, chan_name, user, false);
+ this->bridge->send_user_join(this->hostname, chan_name, user,
+ user->get_most_significant_mode(this->sorted_user_modes),
+ false);
}
}
@@ -334,7 +338,9 @@ 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);
- this->bridge->send_user_join(this->hostname, chan_name, channel->get_self(), 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);
this->bridge->send_topic(this->hostname, chan_name, channel->topic);
}