From 430222b12571e8e6b6aa5a0cd11159dc112c0544 Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Tue, 6 Jul 2010 15:19:47 -0400 Subject: [PATCH 1/5] Remove the /umode2 (opers can change others' umodes) thing from TODO. There's OACCEPT for +g and for +B, just tell the user to botmode his own bot or you'll kline it till he does. If anyone can think of a good use-case for this, it may be re-added. --- TODO-SHADOW | 1 - 1 file changed, 1 deletion(-) diff --git a/TODO-SHADOW b/TODO-SHADOW index 44245d1..92ab837 100644 --- a/TODO-SHADOW +++ b/TODO-SHADOW @@ -3,5 +3,4 @@ Todo list for ShadowIRCd 6.2 * modesetize umodes * global/remote SET, via shared block flag. * on the fly dnsbl exceptions -* implementation to change other users' umodes (if you're a oper of course) * evaluate snotes and possibly make a lot more netwide . From 6898ce9dde52783a358e426da1bda298cfa218a3 Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Sat, 10 Jul 2010 01:28:21 -0400 Subject: [PATCH 2/5] Add general::hide_channel_below_users option. This allows server owners to set how many users must be in a channel before /LIST will show it. --- doc/example.conf | 1 + doc/reference.conf | 6 ++++++ include/s_conf.h | 1 + modules/m_list.c | 4 ++-- src/newconf.c | 1 + src/s_conf.c | 1 + 6 files changed, 12 insertions(+), 2 deletions(-) diff --git a/doc/example.conf b/doc/example.conf index 0f08301..f730b83 100755 --- a/doc/example.conf +++ b/doc/example.conf @@ -519,6 +519,7 @@ general { #static_quit = "I like turtles!"; servicestring = "is a Network Service"; disable_fake_channels = no; + hide_channel_below_users = 3; tkline_expire_notices = no; default_floodcount = 10; failed_oper_notice = yes; diff --git a/doc/reference.conf b/doc/reference.conf index f77e60c..0c21b38 100755 --- a/doc/reference.conf +++ b/doc/reference.conf @@ -1108,6 +1108,12 @@ general { */ disable_fake_channels = no; + /* hide_channel_below_users: Amount of users a channel must have in it + * before it is shown in a standard LIST. This can be overridden by + * invoking LIST like: /LIST <3 + */ + hide_channel_below_users = 3; + /* tkline_expire_notices: give a notice to opers when a tkline * expires */ diff --git a/include/s_conf.h b/include/s_conf.h index ebe88f1..ec3a222 100644 --- a/include/s_conf.h +++ b/include/s_conf.h @@ -166,6 +166,7 @@ struct config_file_entry unsigned char compression_level; int disable_fake_channels; + int hide_channel_below_users; int dots_in_ident; int failed_oper_notice; int anti_nick_flood; diff --git a/modules/m_list.c b/modules/m_list.c index ec2656d..91a1678 100644 --- a/modules/m_list.c +++ b/modules/m_list.c @@ -152,8 +152,8 @@ static int mo_list(struct Client *client_p, struct Client *source_p, int parc, c return 0; } - /* XXX rather arbitrary -- jilles */ - params.users_min = 3; + /* Let the user set it */ + params.users_min = ConfigFileEntry.hide_channel_below_users; params.users_max = INT_MAX; if (parc > 1 && parv[1] != NULL && !IsChannelName(parv[1])) diff --git a/src/newconf.c b/src/newconf.c index 8eeca1e..df662d8 100644 --- a/src/newconf.c +++ b/src/newconf.c @@ -2201,6 +2201,7 @@ static struct ConfEntry conf_general_table[] = { "anti_spam_exit_message_time", CF_TIME, NULL, 0, &ConfigFileEntry.anti_spam_exit_message_time }, { "use_part_messages", CF_YESNO, NULL, 0, &ConfigFileEntry.use_part_messages }, { "disable_fake_channels", CF_YESNO, NULL, 0, &ConfigFileEntry.disable_fake_channels }, + { "hide_channel_below_users", CF_INT, NULL, 0, &ConfigFileEntry.hide_channel_below_users }, { "min_nonwildcard_simple", CF_INT, NULL, 0, &ConfigFileEntry.min_nonwildcard_simple }, { "non_redundant_klines", CF_YESNO, NULL, 0, &ConfigFileEntry.non_redundant_klines }, { "tkline_expire_notices", CF_YESNO, NULL, 0, &ConfigFileEntry.tkline_expire_notices }, diff --git a/src/s_conf.c b/src/s_conf.c index 1cf0c26..f54dc80 100644 --- a/src/s_conf.c +++ b/src/s_conf.c @@ -698,6 +698,7 @@ set_default_conf(void) ConfigFileEntry.failed_oper_notice = YES; ConfigFileEntry.anti_nick_flood = NO; ConfigFileEntry.disable_fake_channels = NO; + ConfigFileEntry.hide_channel_below_users = 3; ConfigFileEntry.max_nick_time = 20; ConfigFileEntry.max_nick_changes = 5; ConfigFileEntry.max_accept = 20; From 9e8efa00d48847d18f103237b1c898521863dd38 Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Sat, 10 Jul 2010 01:29:22 -0400 Subject: [PATCH 3/5] Fix a quick compile warning. --- src/s_auth.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/s_auth.c b/src/s_auth.c index 19582ee..2644ff1 100644 --- a/src/s_auth.c +++ b/src/s_auth.c @@ -20,7 +20,7 @@ * along with this program; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 * USA - * + */ /* * Changes: From 713624ed6a7e1b87594783b478bcd7806685335d Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Sat, 10 Jul 2010 05:01:23 -0400 Subject: [PATCH 4/5] Add hide_channel_below_users value to m_info. --- modules/m_info.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/modules/m_info.c b/modules/m_info.c index 4b43249..1491180 100644 --- a/modules/m_info.c +++ b/modules/m_info.c @@ -150,6 +150,12 @@ static struct InfoStruct info_table[] = { &ConfigFileEntry.default_floodcount, "Startup value of FLOODCOUNT", }, + { + "hide_channel_below_users", + OUTPUT_DECIMAL, + &ConfigFileEntry.hide_channel_below_users, + "Hide channels below this many users in standard /LIST output", + }, { "default_adminstring", OUTPUT_STRING, From 199eaba28d7efdc93149361da033ac0ac17458ed Mon Sep 17 00:00:00 2001 From: JD Horelick Date: Sun, 11 Jul 2010 21:57:54 -0400 Subject: [PATCH 5/5] Change default nicklen to 30. --- configure | 2 +- configure.ac | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/configure b/configure index 1aa3c60..49f9a5b 100755 --- a/configure +++ b/configure @@ -7852,7 +7852,7 @@ $as_echo "$as_me: WARNING: NICKLEN has a hard limit of 50. Setting NICKLEN=50" > fi else - NICKLEN=31 + NICKLEN=30 fi diff --git a/configure.ac b/configure.ac index 025b82c..43f19d1 100644 --- a/configure.ac +++ b/configure.ac @@ -873,7 +873,7 @@ AC_HELP_STRING([--with-nicklen=LENGTH],[Set the nick length to LENGTH (default 3 else NICKLEN="$withval" fi -], [NICKLEN=31]) +], [NICKLEN=30]) AC_ARG_WITH(topiclen, AC_HELP_STRING([--with-topiclen=NUMBER],[Set the max topic length to NUMBER (default 390, max 390)]),