Extended bans

From Slacked

Jump to: navigation, search

Contents

Extended bans (ban conditionals) allow different checks than the usual nick!user@host or nick!user@ip match to determine whether someone should be banned, quieted, exempted or invited.

Extended bans are of the form $[~]<type>[:<data>]. The <type> is one character (case insensitive) and determines the type of match. Most types allow or require an extra field <data>. If the tilde (~) is present, the result of the comparison will be negated, unless the ban is invalid in which case it will never match.

Note: Extended ban types also work with +e (ban exemption), +q (quiet ban), and +I (invite exception). See modes for more information.

Syntax: /mode <channel> [+/-]b/e/q/I $[~]<type>[:<data>]

Types of extended bans

$a - Logged in users

Syntax: /mode <channel> [+/-]b/e/q/I $a:<mask>
Example: /mode #slackers +b $a:shadow

Matches users logged in with a username matching the mask (* and ? wildcards).

The above example will ban shadow when he is identified to his nick, regardless of the nickname he is using at the time.

$c - Channel

Syntax: /mode <channel> [+/-]b/e/q/I $c:<other channel>
Example: /mode #slackers +b $c:#rmxp

Matches users who are on the given channel; this is only valid if the channel exists and is not +s or +p. (The ops of the channel the ban is on cannot necessarily see whether the user is in the target channel, so it should not influence whether they can join either.)

The above example will prevent users in #rmxp from joining #slackers.

$j - Shared banlists

Syntax: /mode <channel> [+/-]b/e/q/I $j:<other channel>
Example: /mode #slackers +b $j:#rmxp

Bans anyone who is also banned in the specified channel. Also works for ban exemptions, quiet bans, and invex's.

The above example will ban anyone in #slackers who is also banned from #rmxp.

$o - IRC Operators

Syntax: /mode <channel> [+/-]b/e/q/I $o
Example: /mode #staff +I $o

Matches opers (most useful with +I).

The example above, with the +i mode on, will only allow IRC Operators to join.

$r - Gecos (realname)

Syntax: /mode <channel> [+/-]b/q $r:<mask>
Example: /mode #slackers +b $r:I?was?a?photo

Matches users with a realname (gecos) matching the mask (* and ? wildcards); this can only be used with +b and +q.

The above example bans users with the gecos "I was a photo".

$s - Server

Syntax: /mode <channel> [+/-]b/q $s:<mask>
Example: /mode #slackers +b $s:osprey.il.us.slacked.org

Matches users connected to a server matching the mask (* and ? wildcards); this can only be used with +b and +q.

The above example bans users connect to the server osprey.il.us.slacked.org.

$x - Extended

Syntax: /mode <channel> [x/-]b/e/q/I $x:<nick>!<ident>@<host>#<gecos>
Example: /mode #slackers +b $x:shadow!skater@staff.slacked.org#Sup?I'm?Shadow

Extended bans match an entire hostmask, including the user's "gecos" (real name). Wildcards are allowed.

The above example bans the nickname "shadow", with the ident "skater", the hostmask "staff.slacked.org", and the gecos "Sup I'm Shadow".

With a ~ (Tilde)

A tilde will cause the result of the comparison will be negated.

Example: /mode #slackers +b $~o

Will ban anyone who isn't an IRC Operator.

Example: /mode #slackers +b $~c:#slackdev

Will ban anyone who isn't also in #slackdev.

Personal tools