mirror of
https://github.com/weechat/weechat.git
synced 2026-07-03 00:03:12 +02:00
Do not send WHO on channel joined (to check away nicks) if option irc.network.away_check is set to 0
This commit is contained in:
@@ -364,13 +364,13 @@ irc_channel_remove_away (struct t_irc_server *server,
|
||||
|
||||
void
|
||||
irc_channel_check_away (struct t_irc_server *server,
|
||||
struct t_irc_channel *channel, int force)
|
||||
struct t_irc_channel *channel)
|
||||
{
|
||||
if (channel->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
{
|
||||
if (force
|
||||
|| (weechat_config_integer (irc_config_network_away_check_max_nicks) == 0)
|
||||
|| (channel->nicks_count <= weechat_config_integer (irc_config_network_away_check_max_nicks)))
|
||||
if ((weechat_config_integer (irc_config_network_away_check) > 0)
|
||||
&& ((weechat_config_integer (irc_config_network_away_check_max_nicks) == 0)
|
||||
|| (channel->nicks_count <= weechat_config_integer (irc_config_network_away_check_max_nicks))))
|
||||
{
|
||||
channel->checking_away++;
|
||||
irc_server_sendf (server, IRC_SERVER_OUTQUEUE_PRIO_LOW,
|
||||
|
||||
@@ -90,7 +90,7 @@ extern int irc_channel_is_channel (const char *string);
|
||||
extern void irc_channel_remove_away (struct t_irc_server *server,
|
||||
struct t_irc_channel *channel);
|
||||
extern void irc_channel_check_away (struct t_irc_server *server,
|
||||
struct t_irc_channel *channel, int force);
|
||||
struct t_irc_channel *channel);
|
||||
extern void irc_channel_set_away (struct t_irc_server *server,
|
||||
struct t_irc_channel *channel,
|
||||
const char *nick_name,
|
||||
|
||||
@@ -3669,7 +3669,7 @@ IRC_PROTOCOL_CALLBACK(366)
|
||||
IRC_COLOR_CHAT_DELIMITERS);
|
||||
|
||||
irc_command_mode_server (server, ptr_channel, NULL);
|
||||
irc_channel_check_away (server, ptr_channel, 1);
|
||||
irc_channel_check_away (server, ptr_channel);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@@ -81,7 +81,6 @@ char *irc_server_option_default[IRC_SERVER_NUM_OPTIONS] =
|
||||
|
||||
|
||||
void irc_server_reconnect (struct t_irc_server *server);
|
||||
void irc_server_check_away ();
|
||||
void irc_server_free_data (struct t_irc_server *server);
|
||||
|
||||
|
||||
@@ -3383,7 +3382,7 @@ irc_server_check_away ()
|
||||
for (ptr_channel = ptr_server->channels; ptr_channel; ptr_channel = ptr_channel->next_channel)
|
||||
{
|
||||
if (ptr_channel->type == IRC_CHANNEL_TYPE_CHANNEL)
|
||||
irc_channel_check_away (ptr_server, ptr_channel, 0);
|
||||
irc_channel_check_away (ptr_server, ptr_channel);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -223,6 +223,7 @@ extern int irc_server_get_pv_count (struct t_irc_server *server);
|
||||
extern void irc_server_set_away (struct t_irc_server *server, const char *nick,
|
||||
int is_away);
|
||||
extern void irc_server_remove_away ();
|
||||
extern void irc_server_check_away ();
|
||||
extern void irc_server_disconnect (struct t_irc_server *server, int reconnect);
|
||||
extern void irc_server_disconnect_all ();
|
||||
extern void irc_server_free (struct t_irc_server *server);
|
||||
|
||||
Reference in New Issue
Block a user