diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2006-01-25 10:31:22 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2006-01-25 10:31:22 +0000 |
commit | 1607c44e75b8fb9196a36bea642c8e46c9c362c5 (patch) | |
tree | f70d65831bf4f6ecd6422ecbd2fbecc50f81a0f1 /src/common | |
parent | 364d774ded1816523fb7ddcf5ca0ee6442612b2e (diff) | |
download | weechat-1607c44e75b8fb9196a36bea642c8e46c9c362c5.zip |
Added new option "irc_away_check_max_nicks" to disable away check on channels with high number of nicks (patch from Gwenn)
Diffstat (limited to 'src/common')
-rw-r--r-- | src/common/weeconfig.c | 19 | ||||
-rw-r--r-- | src/common/weeconfig.h | 2 |
2 files changed, 20 insertions, 1 deletions
diff --git a/src/common/weeconfig.c b/src/common/weeconfig.c index ade8ff0a6..ae1402a50 100644 --- a/src/common/weeconfig.c +++ b/src/common/weeconfig.c @@ -658,6 +658,7 @@ char *cfg_irc_default_msg_part; char *cfg_irc_default_msg_quit; int cfg_irc_notice_as_pv; int cfg_irc_away_check; +int cfg_irc_away_check_max_nicks; int cfg_irc_lag_check; int cfg_irc_lag_min_show; int cfg_irc_lag_disconnect; @@ -692,6 +693,10 @@ t_config_option weechat_options_irc[] = N_("interval between two checks for away (in minutes, 0 = never check)"), OPTION_TYPE_INT, 0, INT_MAX, 0, NULL, NULL, &cfg_irc_away_check, NULL, &config_change_away_check }, + { "irc_away_check_max_nicks", N_("max number of nicks for away check"), + N_("do not check away nicks on channels with high number of nicks (0 = unlimited)"), + OPTION_TYPE_INT, 0, INT_MAX, 0, + NULL, NULL, &cfg_irc_away_check_max_nicks, NULL, &config_change_away_check_max_nicks }, { "irc_lag_check", N_("interval between two checks for lag"), N_("interval between two checks for lag (in seconds)"), OPTION_TYPE_INT, 30, INT_MAX, 60, @@ -1154,12 +1159,24 @@ config_change_nicks_colors () void config_change_away_check () { - check_away = 0; if (cfg_irc_away_check == 0) { /* reset away flag for all nicks/chans/servers */ server_remove_away (); } + check_away = cfg_irc_away_check * 60; +} + +/* + * config_change_away_check_max_nicks: called when max nicks for away check + * is changed + */ + +void +config_change_away_check_max_nicks () +{ + server_remove_away (); + check_away = cfg_irc_away_check * 60; } /* diff --git a/src/common/weeconfig.h b/src/common/weeconfig.h index 7a9c12cc6..f606382d5 100644 --- a/src/common/weeconfig.h +++ b/src/common/weeconfig.h @@ -192,6 +192,7 @@ extern char *cfg_irc_default_msg_part; extern char *cfg_irc_default_msg_quit; extern int cfg_irc_notice_as_pv; extern int cfg_irc_away_check; +extern int cfg_irc_away_check_max_nicks; extern int cfg_irc_lag_check; extern int cfg_irc_lag_min_show; extern int cfg_irc_lag_disconnect; @@ -239,6 +240,7 @@ extern void config_change_one_server_buffer (); extern void config_change_color (); extern void config_change_nicks_colors (); extern void config_change_away_check (); +extern void config_change_away_check_max_nicks (); extern void config_change_fifo_pipe (); extern void config_change_notify_levels (); extern void config_change_log (); |