Skip to main content
Version: 2.0.0 🚧

Extended bans

Extended bans allow different checks than the usual nick!user@host (hostmask) match. That is, they extend the functionality of channels bans (+b), ban exceptions (+e), invite exceptions (+I), and quiets (+q).

Syntax: $[~]<type>:<data>

Where type is a single character (case sensitive) that determines the type of match that is to be used. If the type character is prefixed with a tilde (~), then the result of the match is inverted (i.e. has the opposte effect).

The following extended ban types are provided by ircd-yeti:

TypeNameDescription
aAccountMatches users logged into a matching account.
cChannelMatches users that are on the given channel.
jShared listsAlso checks against the corresponding list for the specified channel.
mMarksMatches users with a matching mark.
nNick changePrevents matching users from changing their nickname.
oNon-operatorMatches users that are not IRC operators.
rRealnameMatches users with a matching realname.
tText banBlocks messages matching the given text.
uUnauthenticatedMatches unauthenticated users matching the nick!user@ident mask.
wGatewayMatches users using the given WebIRC gateway.
ZTLS infoMatches users based on TLS protocol verion and/or cipher suite.
zFingerprintMatches users having the given TLS certificate fingerprint.

Account#

Syntax: $a:<accountmask|accountID>

The account extended ban type matches users that are logged into a matching account. Wildcards are accepted.

Usage examples#

  • /mode #chat +b $a:trip - Bans all users logged into the account trip.
  • /mode #chat +e $a:trip - Ban exempts all users logged into the account trip.
  • /mode #chat +q $a:*troll* - Quiets all users logged into an account with troll in its name.
  • /mode #chat +q $~a:* - Quiets all users who have not logged into an account.
  • /mode #chat +I $a:1 - Invite exemption for all users logged into an account that was assigned ID 1.

Channel#

Syntax: $c:[@|%|-]<#channel>

The channel extended ban type matches users who present in the given channel.

Usage examples#

  • /mode #chat +b $c:#trollchan - Bans all users who are present in #trollchan.
  • /mode #chat +b $~c:#darenet - Bans all user who have not join #darenet.
  • /mode #chat +I $c:@#chat-ops - Invite exempts all users who are present in #chat-ops and are opped.

Shared list#

Syntax: $j:<#channel>

The shared list extended ban type allows checking users against another channel's ban, ban exception, invite exception, and/or quiet lists. To set a shared list extended ban, you must also be a channel operator in the channel who's list you are trying to share, and that channel must not be private or secret.

Usage examples#

  • /mode #chat +b $j:#darenet - Bans all users who match an entry on #darenet's ban list.
  • /mode #chat +e $j:#darenet - Ban exempt all users who match an entry on #darenet’s ban exception list.

Mark#

Syntax: $m:<key>:<value>

The mark extended ban type matches users that have the given mark set.

Syntax: $m:<key>:<data>

Usage examples#

  • /mode #chat +b $m:tor:tor - Bans all users who have been marked as using Tor.
  • /mode #chat +q $m:tor:tor - Quiets all users who have been marked as using Tor.

Nick change#

Syntax: $n:<n!u@h>

The nick change extended ban type prevents nickname changes from users matching the given n!u@h mask.

note

This extended ban type only works with channel bans (+b).

Usage example#

  • /mode #chat +b $n:*!*@* - Prevents all users from changing their nickname while on the channel.

Non-operator#

Syntax: $o

The non-operator extended ban type matches users who are not an IRC operator.

Usage examples#

  • /mode #sekret +b $o - Bans all users who are not an IRC operator.
  • /mode #announcements +q $~o - Quiets all users who are not an IRC operator.

Realname#

The realname extended ban type matches users with the given realname.

Syntax: $r:<realname>

Usage examples#

  • /mode #chat +b $r:*sub7* - Bans all users with the text sub7 anywhere in their realname field.
  • /mode #chat +b $~r:awesome* - Bans all users who’s realname field doesn’t start with the word awesome
  • /mode #chat +e $r:*jason* - Ban exempts all users who have the name Jason anywhere in their realname field
  • /mode #chat +q $r:*script* - Quiets all users with the text script anywhere in their realname field

Text ban#

Syntax: $t:<text>

The text ban extended ban type blocks messages that contain the given text. Wildcards are accepted.

note

This extended ban type only works with channel bans, and cannot be inverted.

Usage examples#

  • /mode #chat +b $t:*damn* - Blocks all messages that contain the word damn

Unauthenticated#

Syntax: $u:<n!u@h>

The unauthenticated extended ban type matches unauthenticated users matching the given hostmask.

Usage examples#

  • /mode #chat +I $u:sid*!*@*.irccloud.com - Invite exception for unauthed paid users using IRCCloud.
  • /mode #chat +q $u:uid*!*@*.irccloud.com - Quiets all unauthed users using IRCCloud's free plan.
  • /mode #chat +q $u*!*@* - Quiets all unauthed users.

Gateway#

Syntax: $w:<gateway>

The gateway extended ban type matches users that are connected via the given gateway.

Usage examples#

  • /mode #chat +b $w:kiwiirc.com - Bans all users who are connected via KiwiIRC.com.

TLS info#

Syntax: $Z:<tlsinfo>

The TLS info exentended ban type matches users based on the TLS protocol version and/or cipher suite they are using.

Usage examples#

  • /mode #channel +b $~Z:TLSv1.3* - Bans all users using a TLS protocol version below 1.3.

Fingerprint#

The fingerprint extended ban type matches users having the given TLS certificate fingerprint.

Syntax: $z:<fingerprint>

Usage examples#

  • /mode #chat +b $z:FC46F3DBA1405B550CA06A597AF16A83194B6D1F62B9F594E6657AD429B9BB4D - Bans users with this certfp.
  • /mode #chat +I $z:FC46F3DBA1405B550CA06A597AF16A83194B6D1F62B9F594E6657AD429B9BB4D - Invite exempts users for with this certfp.