Log in | Back to darenet.org

Extended Bans

Extended bans allow different checks than the usual nick!user@host (hostmask) match to determine whether someone should be banned from the channel, allowing channel operators more flexibility and control over their channel's ban list. On DareNET, extended bans are of the form $[~]<type>:<data>. Where <type> is one character (case sensitive) and determines the type of match that is to be used. If the tilde (~) is used, the result of the check will be negated.

The following types of extended bans are currently supported:

Type Name Purpose
$a Account If a user's account name matches this ban, (s)he will be unable to join.
$c Channel If a user is in a channel that matches this ban, (s)he will be unable to join.
$j Shared Bans If a user matches a ban on the channel who's ban list is being shared, (s)he will be unable to join.
$r Realname If a user's realname (gecos) matches this ban, (s)he will be unable to join.
$t Text Allows you to specify text that will be blocked if a user's privmsg or notice to the channel contains it.

In This Guide:

Account

The $a (account) type allows you to ban authed users who's account name matches the specified account mask.

Syntax
$a:<mask>

If we wanted to ban all users who's account name contained the word joe, we could set the following $a type extended ban:

/mode #ourchannel +b $a:*joe*

Channel

The $c (channel) type prevents users who are in a matching channel from joining your channel.

Syntax
$c:<#channel>

If we wanted to prevent users who are in channels with the word lame in its name from joining our channel, we could set the following $c type extended ban.

/mode #ourchannel +b $c:#*lame*

Realname

The $r (realname/gecos) type prevents users with a matching realname from joining your channel.

Syntax
$r:<mask>

If we wanted to prevent users who had the word bot in their realname (gecos) from the joining our channel, we could set the following $r type extended ban:

/mode #ourchannel +b $r:*bot*

Shared bans

The $j type allows sharing channel ban lists.

Syntax
$j:<#channel>

For this example, the name of our channel is #ourchannel and we want to use #shared's channel ban list with our own. So, to do this we could set the following $j type extended ban:

/mode #ourchannel +b $j:#shared

Now, whenever a user tries to join our channel, #ourchannel, they'll be checked against #shared's ban list in addition to our own ban list. If a match is found in either ban list, the user will be prevented from joining.

NOTE: The shared channel must not be in +p or +s for this to work

Text bans

The $t (text) type allows channel operators to specify words (wildcards supported) that will be blocked if the user's message or notice to the channel matches it.

Syntax
$t:<#mask>

Let's say we wanted to block all channel messages and notices that contained the word damn, regardless of the user sending it. To do this we could set the following $t type extended ban:

/mode #ourchannel +b $t:*damn*

Negation / Reverse logic

If "~" is prepended to the type of an extended ban, then the result of the comparison is negated. In other words, it will have a reversed effect.

Let's say we wanted to allow users to join our channel ONLY if they're already present in #darenet. To do this, we would set a $c type extended ban, by prepending "~" to the type flag:

/mode #ourchannel +b $~c:#darenet

Assistance

Should you need assistance using the extended bans feature, feel free to stop by #help.