Log in | Back to darenet.org

Extended Bans

(Add note about regarding +s/p channels for extban 'j' at tyil's request)
 
(3 intermediate revisions not shown)
Line 1: Line 1:
-
Extended bans (also known as ban conditionals) allow different checks than the usual nick!user@host match to determine whether someone should be banned, giving channel operators more flexibility and control over their channel's ban list.
+
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 '''<code>$[~]<type>:<data></code>'''. 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.
-
 
+
-
On DareNET, extended bans are of the form '''<code>$[!]<type>:<data></code>'''. Where <type> is one character (case sensitive) and determines the type of match that is to be used. If the exclamation mark (!) is used, the result of the check will be negated (discussed below).
+
The following types of extended bans are currently supported:
The following types of extended bans are currently supported:
-
{| class="simpletable" width="100%" style="font-size: 90%;"
+
{| class="simpletable" width="100%"
! style="text-align: center;" | Type
! style="text-align: center;" | Type
! style="text-align: center;" | Name
! style="text-align: center;" | Name
Line 21: Line 19:
| style="text-align: center;" | Shared Bans
| style="text-align: center;" | 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.
| If a user matches a ban on the channel who's ban list is being shared, (s)he will be unable to join.
-
|-
 
-
| style="text-align: center;" | $n
 
-
| style="text-align: center;" | Nick Change
 
-
| If a user matches this ban, (s)he will be unable to change their nickname while in the channel.
 
-
|-
 
-
| style="text-align: center;" | $q
 
-
| style="text-align: center;" | Quiet
 
-
| If a user matches this ban, (s)he will be unable to send messages to the channel.
 
|-
|-
| style="text-align: center;" | $r
| style="text-align: center;" | $r
Line 36: Line 26:
| style="text-align: center;" | $t
| style="text-align: center;" | $t
| style="text-align: center;" | Text
| style="text-align: center;" | Text
-
| Allows you to specify text that will be blocked if a user's privmsg or notice to the channel contains it. * and ? wildcards supported.
+
| Allows you to specify text that will be blocked if a user's privmsg or notice to the channel contains it.
|-
|-
|}<br />
|}<br />
-
== Quiet and Nick Change ==
+
== Account ==
-
The $q (quiet) and $n (nick change) types are similar to normal bans, except that they allow you to control what a user can do without preventing them from being able to join the channel. The $q type prevents users matching a given mask from sending messages/notices to the channel, while the $n type prevents them from changing their nickname.
+
The $a (account) type allows you to ban authed users who's account name matches the specified account mask.
-
{| class="simpletable" width="55%" style="font-size: 90%;"
+
{| class="simpletable" width="10%"
-
! style="text-align: left; width: 25px;" | Type
+
! style="text-align: left;" | Syntax
! style="text-align: left;" | Syntax
|-
|-
-
| $q
+
| $a:<mask>
-
| <code>/mode #channel +b '''$q:nick!user@host'''</code>
+
-
|-
+
-
| $n
+
-
| <code>/mode #channel +b '''$n:nick!user@host'''</code>
+
|-
|-
|}
|}
-
'''Examples:'''
+
If we wanted to ban all users who's account name contained the word ''joe'', we could set the following $a type extended ban:
-
 
+
-
A.) If we wanted to allow users connecting from a ".br" host to join the channel, but prevent them from being able to send messages/notices to the channel, we could set the following $q type extended ban:
+
-
 
+
-
<html><pre>/mode #ourchannel +b <strong>$q:*!*@*.br</strong></pre></html>
+
-
 
+
-
B.) If we also wanted to prevent users connecting from a ".br" host from changing their nickname while their in our channel, we could set the following $n type extended ban:
+
-
<html><pre>/mode #ourchannel +b <strong>$n:*!*@*.br</strong></pre></html>
+
<code>/mode #ourchannel +b $a:*joe*</code>
== Channel ==
== Channel ==
Line 70: Line 49:
The $c (channel) type prevents users who are in a matching channel from joining your channel.
The $c (channel) type prevents users who are in a matching channel from joining your channel.
-
{| class="simpletable" width="55%" style="font-size: 90%;"
+
{| class="simpletable" width="10%"
-
! style="text-align: left; width: 25px;" | Type
+
! style="text-align: left;" | Syntax
! style="text-align: left;" | Syntax
|-
|-
-
| $c
+
| $c:<#channel>
-
| <code>/mode #channel +b '''$c:#channel'''</code>
+
|-
|-
|}
|}
-
'''Example:'''
+
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.
-
A.) If we wanted to prevent users who are currently in a channel with the word ''warez'' in its name from joining our channel, we could set the following $c type extended ban:
+
<code>/mode #ourchannel +b $c:#*lame*</code>
-
 
+
-
<html><pre>/mode #ourchannel +b <strong>$c:#*warez*</strong></pre></html>
+
== Realname ==
== Realname ==
Line 89: Line 64:
The $r (realname/gecos) type prevents users with a matching realname from joining your channel.
The $r (realname/gecos) type prevents users with a matching realname from joining your channel.
-
Note that the $r type treats "_" as both the underscore character and a space.
+
{| class="simpletable" width="10%"
-
 
+
-
{| class="simpletable" width="55%" style="font-size: 90%;"
+
-
! style="text-align: left; width: 25px;" | Type
+
! style="text-align: left;" | Syntax
! style="text-align: left;" | Syntax
|-
|-
-
| $r
+
| $r:<mask>
-
| <code>/mode #channel +b '''$r:realname'''</code>
+
|-
|-
|}
|}
-
'''Example:'''
+
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:
-
A.) 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:
+
<code>/mode #ourchannel +b $r:*bot*</code>
-
<html><pre>/mode #ourchannel +b <strong>$r:*bot*</strong></pre></html>
+
== Shared bans ==
-
 
+
-
== Account Bans ==
+
-
 
+
-
The $a (account) type allows you to ban (logged in) users who's username (i.e., account name) matches the specified account mask.
+
-
 
+
-
Note, these types of bans can only ever match users logged into their N account.
+
-
 
+
-
{| class="simpletable" width="55%" style="font-size: 90%;"
+
-
! style="text-align: left; width: 25px;" | Type
+
-
! style="text-align: left;" | Syntax
+
-
|-
+
-
| $a
+
-
| <code>/mode #channel +b '''$a:account'''</code>
+
-
|-
+
-
|}
+
-
 
+
-
'''Example:'''
+
-
 
+
-
A.) If we wanted to ban all users who's account name contained the word ''joe'', we could set the following $a type extended ban:
+
-
 
+
-
<html><pre>/mode #ourchannel +b <strong>$a:*joe*</strong></pre></html>
+
-
 
+
-
Account type extended bans act identical to the previous method of banning users based on their account name (i.e., <code>/mode #channel +b *!*@accountname.*</code>); however, negation (reverse logic) can also be used with account type extended bans, which cannot presently be done with the old method. We discuss negation a little later in this guide.
+
-
 
+
-
== Shared Bans ==
+
The $j type allows sharing channel ban lists.
The $j type allows sharing channel ban lists.
-
{| class="simpletable" width="55%" style="font-size: 90%;"
+
{| class="simpletable" width="10%"
-
! style="text-align: left; width: 25px;" | Type
+
! style="text-align: left;" | Syntax
! style="text-align: left;" | Syntax
|-
|-
-
| $j
+
| $j:<#channel>
-
| <code>/mode #channel +b '''$j:#channel'''</code>
+
|-
|-
|}
|}
-
'''Example:'''
+
For this example, the name of our channel is ''#ourchannel'' and we want to use ''#shared''<nowiki>'</nowiki>s channel ban list with our own. So, to do this we could set the following $j type extended ban:
-
A.) For this example, the name of our channel is ''#ourchannel'' and we want to use ''#shared''<nowiki>'</nowiki>s channel ban list inconjunction with our own. So, to do this we could set the following $j type extended ban:
+
<code>/mode #ourchannel +b $j:#shared</code>
-
 
+
-
<html><pre>/mode #ourchannel +b <strong>$j:#shared</strong></pre></html>
+
Now, whenever a user tries to join our channel, ''#ourchannel'', they'll be checked against ''#shared''<nowiki>'</nowiki>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.
Now, whenever a user tries to join our channel, ''#ourchannel'', they'll be checked against ''#shared''<nowiki>'</nowiki>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.
-
== Text Bans ==
+
'''NOTE:''' The shared channel must not be in +p or +s for this to work
-
The $t (text) type allows channel operators to specify text (wildcards supported) that will be blocked if (1) the user's message or notice to the channel matches it, and (2) the user's host matches the entry as well.
+
== Text bans ==
-
{| class="simpletable" width="55%" style="font-size: 90%;"
+
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.
-
! style="text-align: left; width: 25px;" | Type
+
 
 +
{| class="simpletable" width="10%"
! style="text-align: left;" | Syntax
! style="text-align: left;" | Syntax
|-
|-
-
| $t
+
| $t:<#mask>
-
| <code>/mode #channel +b '''$t:nick!user@host:text'''</code>
+
|-
|-
|}
|}
-
'''Examples:'''
+
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:
-
 
+
-
A.) 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:
+
-
 
+
-
<html><pre>/mode #ourchannel +b <strong>$t:*!*@*:*damn*</strong></pre></html>
+
-
 
+
-
B.) Using example A, let's say we only wanted to block such messages from users connected from a ".br" host. To do this we would slightly modify the above $t type extended ban as follows:
+
-
 
+
-
<html><pre>/mode #ourchannel +b <strong>$t:*!*@*.br:*damn*</strong></pre></html>
+
-
== Negation / Reverse Logic ==
+
<code>/mode #ourchannel +b $t:*damn*</code>
-
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. Negation is currently not possible with quiets. We suggest using excepts in this instance, instead.
+
== Negation / Reverse logic ==
-
'''Example:'''
+
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.
-
A.) 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, but prepending "!" to the type flag:
+
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:
-
<html><pre>/mode #ourchannel +b <strong>$!c:#darenet</strong></pre></html>
+
<code>/mode #ourchannel +b $~c:#darenet</code>
== Assistance ==
== Assistance ==
-
Should you need assistance using the extended bans feature, feel free to stop by #Support
+
Should you need assistance using the extended bans feature, feel free to stop by #help.
[[Category:All]] [[Category:Documentation]]
[[Category:All]] [[Category:Documentation]]

Current revision as of 22:33, 21 October 2015

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.