diff --git a/doc/ircd.conf.example b/doc/ircd.conf.example index 10c6517b..f42449a5 100755 --- a/doc/ircd.conf.example +++ b/doc/ircd.conf.example @@ -362,6 +362,7 @@ channel { channel_target_change = yes; disable_local_channels = no; autochanmodes = "+nt"; + displayed_usercount = 3; }; serverhide { diff --git a/doc/reference.conf b/doc/reference.conf index 6c3806e4..d6ef7f0a 100755 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -802,6 +802,12 @@ channel { * when a channel is created. */ autochanmodes = "+nt"; + + /* displayed_usercount: the minimum amount of users on a channel before it + * is displayed in LIST. this parameter can be overridden using ELIST parameters, + * such as LIST >0. + */ + displayed_usercount = 3; }; diff --git a/include/s_conf.h b/include/s_conf.h index 9d7c7703..42e26705 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -259,6 +259,7 @@ struct config_channel_entry int channel_target_change; int disable_local_channels; unsigned int autochanmodes; + int displayed_usercount; }; struct config_server_hide diff --git a/modules/m_list.c b/modules/m_list.c index 246a8de7..9e90260a 100644 --- a/modules/m_list.c +++ b/modules/m_list.c @@ -197,7 +197,7 @@ static int mo_list(struct Client *client_p, struct Client *source_p, int parc, c params = rb_malloc(sizeof(struct ListClient)); /* XXX rather arbitrary -- jilles */ - params->users_min = 3; + params->users_min = ConfigChannel.displayed_usercount; params->users_max = INT_MAX; params->operspy = operspy; params->created_min = params->topic_min = diff --git a/src/newconf.c b/src/newconf.c index a3e12272..717cfcf4 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -2458,6 +2458,7 @@ static struct ConfEntry conf_channel_table[] = { "channel_target_change", CF_YESNO, NULL, 0, &ConfigChannel.channel_target_change }, { "disable_local_channels", CF_YESNO, NULL, 0, &ConfigChannel.disable_local_channels }, { "autochanmodes", CF_QSTRING, conf_set_channel_autochanmodes, 0, NULL }, + { "displayed_usercount", CF_INT, NULL, 0, &ConfigChannel.displayed_usercount }, { "\0", 0, NULL, 0, NULL } }; diff --git a/src/s_conf.c b/src/s_conf.c index 66960a3f..d6da365d 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -792,6 +792,7 @@ set_default_conf(void) ConfigChannel.resv_forcepart = YES; ConfigChannel.channel_target_change = YES; ConfigChannel.disable_local_channels = NO; + ConfigChannel.displayed_usercount = 3; ConfigChannel.autochanmodes = MODE_TOPICLIMIT | MODE_NOPRIVMSGS;