Also set the role and affiliation of users already in the chan

This commit is contained in:
Florent Le Coz
2014-01-06 01:22:43 +01:00
parent 7701c90763
commit fef9c8193d
3 changed files with 34 additions and 35 deletions
+9 -3
View File
@@ -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);
}