Extensive Bans

Extensive Bans


 

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.

$a - Logged in users

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

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

The above example will ban foo 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 #foo +b $c:#bar

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 #bar from joining #foo.

 

$j - Shared banlists

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

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 #foo who is also banned from #crankeye

 

$o - IRC Operators

  • Syntax: /mode <channel> [+/-]b/e/q/I $o
  • Example: /mode #foo +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 #foobar +b $r:Foo?Bar

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 "Foo Bar".

 

$s - Server

  • Syntax: /mode <channel> [+/-]b/q $s:<mask>
  • Example: /mode #foo +b den.spicylemons.net

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 den.spicylemons.net.

 

With a ~ (Tilde)

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

---

Will ban anyone who isn't an IRC Operator:  

  • /mode #foo +b $~o

---

Will ban anyone who isn't also in #bar:

  • /mode #foo +b $~c:#bar