diff --git a/help/opers/cmode b/help/opers/cmode index d9b6771..1c67baf 100644 --- a/help/opers/cmode +++ b/help/opers/cmode @@ -26,6 +26,8 @@ NO PARAMETERS: weakens +i control. +z - Op moderated. Messages blocked by +m, +b and +q are instead sent to ops. + +u - Hidden ban/quiet list. Ban/quiet lists may only be seen + by halfops or higher. * +L - Large ban list. Increase maximum number of +beIq entries. * +P - Permanent. Channel does not disappear when empty. +F - Free target. Anyone may set forwards to this (otherwise diff --git a/help/users/cmode b/help/users/cmode index ca10f2f..cbe6b35 100644 --- a/help/users/cmode +++ b/help/users/cmode @@ -24,6 +24,8 @@ NO PARAMETERS: change nick. +g - Free invite. Everyone may invite users. Significantly weakens +i control. + +u - Hidden ban/quiet lists. Ban/quiet lists are hidden from all + channel members that are not a halfop or higher. +z - Op moderated. Messages blocked by +m, +b and +q are instead sent to ops. * +L - Large ban list. Increase maximum number of +beIq entries. diff --git a/include/channel.h b/include/channel.h index 553a928..ed04505 100644 --- a/include/channel.h +++ b/include/channel.h @@ -191,6 +191,7 @@ typedef int (*ExtbanFunc)(const char *data, struct Client *client_p, #define MODE_NOREJOIN 0x200000 /* Block rejoin immediately after kick */ #define MODE_NOREPEAT 0x400000 /* Block repeat messages */ #define MODE_NOOPERKICK 0x800000 /* disallow kicking opers */ +#define MODE_HIDEBANS 0x1000000 /* disallow non-chanops from seeing ban/quiet lists */ #define CHFL_BAN 0x10000000 /* ban channel flag */ #define CHFL_EXCEPTION 0x20000000 /* exception to ban channel flag */ diff --git a/src/chmode.c b/src/chmode.c index cf6220d..d7318c3 100644 --- a/src/chmode.c +++ b/src/chmode.c @@ -907,13 +907,16 @@ chm_ban(struct Client *source_p, struct Channel *chptr, } } - RB_DLINK_FOREACH(ptr, list->head) - { - banptr = ptr->data; - sendto_one(source_p, form_str(rpl_list), - me.name, source_p->name, chptr->chname, - banptr->banstr, banptr->who, banptr->when); + if(!(chptr->mode.mode & MODE_HIDEBANS) || alevel & ONLY_CHANOPS) { + RB_DLINK_FOREACH(ptr, list->head) + { + banptr = ptr->data; + sendto_one(source_p, form_str(rpl_list), + me.name, source_p->name, chptr->chname, + banptr->banstr, banptr->who, banptr->when); + } } + sendto_one(source_p, form_str(rpl_endlist), me.name, source_p->name, chptr->chname); return; } @@ -2004,7 +2007,7 @@ struct ChannelMode chmode_table[256] = {chm_simple, MODE_REGONLY }, /* r */ {chm_simple, MODE_SECRET }, /* s */ {chm_simple, MODE_TOPICLIMIT }, /* t */ - {chm_nosuch, 0 }, /* u */ + {chm_simple, MODE_HIDEBANS }, /* u */ {chm_voice, 0 }, /* v */ {chm_nosuch, 0 }, /* w */ {chm_nosuch, 0 }, /* x */