Log in | Back to darenet.org

Extended Bans

m
(Add note about regarding +s/p channels for extban 'j' at tyil's request)
 
(23 intermediate revisions not shown)
Line 1: Line 1:
-
{{Headerbox_orange | text = <u>'''Extended Ban Syntax to Change!'''</u><br>To conform with a wider selection of ircds, thus making life easier for everyone, we will be changing the extended ban delimiter from '~' to '$' in the next release of ircd-darenet (currently still under developmet). We will update this page to reflect the change once all servers have been upgraded.}}We've recently added support for extended bans to our server software (ircd), which gives you more flexibility and control over your channel's ban list. The proper syntax for these types of bans is as follows:
+
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.
-
'''<code>/mode #channel +b ~type:mask</code>'''
+
The following types of extended bans are currently supported:
-
The following types of extended bans are supported:
+
{| class="simpletable" width="100%"
-
 
+
-
{| class="wikitable" width="100%" style="font-size: 85%;"
+
! style="text-align: center;" | Type
! style="text-align: center;" | Type
! style="text-align: center;" | Name
! style="text-align: center;" | Name
! style="text-align: left;" | Purpose
! style="text-align: left;" | Purpose
|-
|-
-
| style="text-align: center;" | ~a
+
| style="text-align: center;" | $a
| style="text-align: center;" | Account
| style="text-align: center;" | Account
| If a user's account name matches this ban, (s)he will be unable to join.
| If a user's account name matches this ban, (s)he will be unable to join.
|-
|-
-
| style="text-align: center;" | ~c
+
| style="text-align: center;" | $c
| style="text-align: center;" | Channel
| style="text-align: center;" | Channel
| If a user is in a channel that matches this ban, (s)he will be unable to join.
| If a user is in a channel that matches this ban, (s)he will be unable to join.
|-
|-
-
| style="text-align: center;" | ~j
+
| style="text-align: center;" | $j
| 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;" | $r
-
| 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 bans, (s)he will be unable to send messages to the channel.
+
-
|-
+
-
| style="text-align: center;" | ~r
+
| style="text-align: center;" | Realname
| style="text-align: center;" | Realname
-
| If a user's realname (gcos) matches this ban, (s)he will be unable to join.
+
| If a user's realname (gecos) matches this ban, (s)he will be unable to join.
|-
|-
-
| 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 />
-
== Quiet and Nick Change ==
+
== Account ==
-
~q and ~n, are similar to old bans, except that they allow you to control what a user can do without preventing them from joining the channel. ~q will prevent users matching the ban from sending messages to the channel, while ~n will prevent them from changing their nickname.
+
The $a (account) type allows you to ban authed users who's account name matches the specified account mask.
-
'''Syntax:'''
+
{| class="simpletable" width="10%"
 +
! style="text-align: left;" | Syntax
 +
|-
 +
| $a:<mask>
 +
|-
 +
|}
-
<code>/mode #channel +b ~q:nick!ident@host<br>
+
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 #channel +b ~n:nick!ident@host</code>
+
-
So, for example, if you wanted to allow AOL users to join the channel, but prevent them from speaking, you could set the following ~q extended ban:
+
<code>/mode #ourchannel +b $a:*joe*</code>
-
<code>/mode #channel +b ~q:*!*@*.aol.com</code>
+
== Channel ==
-
If you wanted to prevent AOL users from changing their nickname while in your channel, you could set the following ~n extended ban:
+
The $c (channel) type prevents users who are in a matching channel from joining your channel.
-
<code>/mode #channel +b ~n:*!*@*.aol.com</code>
+
{| class="simpletable" width="10%"
 +
! style="text-align: left;" | Syntax
 +
|-
 +
| $c:<#channel>
 +
|-
 +
|}
-
== Channel and Realname ==
+
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.
-
~c and ~r are channel and real name bans. When ~c is used, anyone who is currently in a channel that matches the ban will not be able to join. When ~r is used, no one whose real name (gcos) matches the ban will be able to join (note: ~r treats _ as both the character _ and a space).
+
<code>/mode #ourchannel +b $c:#*lame*</code>
-
'''Syntax:'''
+
== Realname ==
-
<code>/mode #channel +b ~c:#channel<br>
+
The $r (realname/gecos) type prevents users with a matching realname from joining your channel.
-
/mode #channel +b ~r:realname</code>
+
-
So, for example, if you wanted to prevent users who are in any channel containing the word ''warez'' from joining your channel, you could set the following ~c extended ban:
+
{| class="simpletable" width="10%"
 +
! style="text-align: left;" | Syntax
 +
|-
 +
| $r:<mask>
 +
|-
 +
|}
-
<code>/mode #channel +b ~c:#*warez*</code>
+
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:
-
If, for example, you wanted to prevent users with the word ''bot'' in their real name (gcos) from joining the channel, you could set the following ~r extended ban:
+
<code>/mode #ourchannel +b $r:*bot*</code>
-
<code>/mode #channel +b ~r:*bot*</code>
+
== Shared bans ==
-
== Account Bans ==
+
The $j type allows sharing channel ban lists.
-
~a allows you to ban users who are logged into accounts matching the specified account mask ban. It does not matter whether they are using hostmasking (umode +x) or not.
+
{| class="simpletable" width="10%"
 +
! style="text-align: left;" | Syntax
 +
|-
 +
| $j:<#channel>
 +
|-
 +
|}
-
'''Syntax:'''  
+
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:
-
<code>/mode #channel +b ~a:mask</code>
+
<code>/mode #ourchannel +b $j:#shared</code>
-
So, for example, if you wanted to ban all users who's account names contained the word ''joe'' in it, you could set the following account extended ban:
+
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.
-
<code>/mode #channel +b ~a:*joe*</code>
+
'''NOTE:''' The shared channel must not be in +p or +s for this to work
-
NOTE: These bans act identical to the previous method of banning user's based on their account name, e.g. ''/mode #channel +b *!*@accountname.*'' OR ''/mode +b *!*@accountname.*.darenet''; however, you can use the reverse logic function with them, which you cannot do with the old method. We discuss the reverse logic function later in this guide.
+
== Text bans ==
-
== Shared 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.
-
~j extended bans, also known as shared bans, allow you to use another channel's ban list.
+
{| class="simpletable" width="10%"
-
 
+
! style="text-align: left;" | Syntax
-
'''Syntax:'''
+
|-
-
 
+
| $t:<#mask>
-
<code>/mode #channel +b ~j:mask</code>
+
|-
-
 
+
|}
-
So, for example, let's say we wanted to use #shared's ban list with our own, we'd set the following shared ban:
+
-
 
+
-
<code>/mode #channel +b ~j:#shared</code>
+
-
 
+
-
Now, whenever a user tries to join #channel, they'll be checked against both #channel's and #shared's ban list. If a match is found, they'll be prevented from joining the channel.
+
-
 
+
-
== Text Bans ==
+
-
 
+
-
~t extended bans, also known as text bans, allow channel operators to specify text that will be blocked if a user's privmsg or noticed to the channel contains it. * and ? wildcards are supported. Also, please keep in mind that this also affects channel operators, halfops and voices.
+
-
 
+
-
'''Syntax:'''
+
-
 
+
-
<code>/mode #channel +b ~t:mask</code>
+
-
 
+
-
So, for example, if you wanted to block all channel messages/notices that contained the word "damn", you could set the following text ban:
+
-
 
+
-
<code>/mode #channel +b ~t:damn</code>
+
-
 
+
-
== Reverse Logic ==
+
-
 
+
-
If "!" is specified in an extended ban, then it will have a reverse effect. Please note this does not work with quiets. Instead, use excepts.
+
-
'''Syntax:'''  
+
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:
-
<code>/mode #channel +b ~!<type>:mask</code>
+
<code>/mode #ourchannel +b $t:*damn*</code>
-
'''Example:'''
+
== Negation / Reverse logic ==
-
Let's say we wanted to an extended channel ban on #darenet with the "!" (reverse) flag, we'd use:
+
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.
-
<code>/mode #channel +b ~!c:#darenet</code>
+
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:
-
This would prevent anyone from joining #channel if they are not already in #darenet as well.
+
<code>/mode #ourchannel +b $~c:#darenet</code>
== Assistance ==
== Assistance ==
-
Should you need assistance using the new 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: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.