Extended Bans: Difference between revisions

From HybridIRC Wiki
Jump to navigation Jump to search
Line 29: Line 29:
/mode #channel +b m:U:*!*@*abc.def.12.34.IP
/mode #channel +b m:U:*!*@*abc.def.12.34.IP
</pre>
</pre>
''This sets a mute ban for users connecting from the IP 123.45.67.89.   
''This sets a mute ban for users connecting from the host <code>abc.def.12.34.IP</code>, representing a cloaked or formatted IP.   
The <code>m:U:</code> prefix means they must be using a registered nickname to speak — otherwise, they are muted.''
The <code>m:U:</code> prefix means users must have a registered nickname to speak — otherwise, they are muted.''


<pre>
<pre>
/mode #channel +b m:*!*@abcd1234.fake.mask.0000.ffff.IP
/mode #channel +b m:*!*@abcd1234.fake.mask.0000.ffff.IP
</pre>
</pre>
''This is a general mute ban for all users from that IP, whether registered or not.   
''This is a general mute ban for all users from the host <code>abcd1234.fake.mask.0000.ffff.IP</code>, simulating a cloaked IPv6 address.   
No one from 123.45.67.89 can speak in the channel.''
All users from this host are muted in the channel, regardless of nickname registration.''


<pre>
<pre>
/mode #channel +b *!*@user123.cust-99.fakeisp-net.example
/mode #channel +b *!*@user123.cust-99.fakeisp-net.example
</pre>
</pre>
''This is a full ban
''This is a full ban for users connecting from the hostname <code>user123.cust-99.fakeisp-net.example</code>, a fake example of an ISP-style rDNS.
Anyone from 123.45.67.89 is blocked from joining the channel entirely.''
Users matching this host will be completely unable to join the channel.''
 
=== Acting Extended Bans ===
 
Acting extended bans restrict actions users can perform. These can include preventing a user from speaking in a channel (requires the <code>muteban</code> module) or from changing their nickname (requires the <code>nonicks</code> module). Acting extbans can also be combined with matching extbans.
</div>
</div>
</div>
</div>

Revision as of 11:19, 4 July 2025

👤 Extended Bans

Extended bans (extbans) are divided into two types:

  • Matching extbans: These match on users in additional ways beyond the standard nick!user@host mask.
  • Acting extbans: These restrict users in various ways beyond standard bans.

Some list modes, like channel mode b (ban), typically use a <nick>!<user>@<host> mask. These modes can be extended to support alternate forms of matching and actions.

To use an extban, set +b <ban> or +e <ban> with the extban mask instead of the usual nick!user@host mask to ban or exempt users. Ban exceptions on acting extbans prevent users from matching the extban or corresponding channel mode.

Matching extbans can also be used for invite exceptions by setting +I <extban>.

🔧 Usage

MODE <channel> +|-<modes> [<params>]

Examples of IRC Ban Modes

Below are some examples to help explain different types of bans that can be applied to users in an IRC channel:

  • +b <ban> sets a ban.
  • +e <ban> sets an exception (unbans someone from an existing ban).
/mode #channel +b m:U:*!*@*abc.def.12.34.IP

This sets a mute ban for users connecting from the host abc.def.12.34.IP, representing a cloaked or formatted IP. The m:U: prefix means users must have a registered nickname to speak — otherwise, they are muted.

/mode #channel +b m:*!*@abcd1234.fake.mask.0000.ffff.IP

This is a general mute ban for all users from the host abcd1234.fake.mask.0000.ffff.IP, simulating a cloaked IPv6 address. All users from this host are muted in the channel, regardless of nickname registration.

/mode #channel +b *!*@user123.cust-99.fakeisp-net.example

This is a full ban for users connecting from the hostname user123.cust-99.fakeisp-net.example, a fake example of an ISP-style rDNS. Users matching this host will be completely unable to join the channel.

Name Character Ban Syntax Description
blockinvite A A:<mask> Bans <mask> from using the `/INVITE` command.
blockcaps B B:<mask> Bans <mask> from sending messages with excessive capitalization.
noctcp C C:<mask> Bans <mask> from sending CTCP messages.
blockcolor c c:<mask> Bans <mask> from sending messages with IRC formatting codes.
mute m m:<mask> Bans <mask> from speaking in the channel.
nonick N N:<mask> Bans <mask> from changing their nickname in the channel.
partmsg p p:<mask> Bans <mask> from sending a `/PART` message.
nokick Q Q:<mask> Bans users from using the `/KICK` command if matching <mask>.
stripcolor S S:<mask> Strips IRC formatting codes from messages sent by <mask>.
nonotice T T:<mask> Bans <mask> from sending `/NOTICE` messages.

A ban given to an Acting extban can either use a nick!user@host mask (unless otherwise specified), matched like a normal ban, or a Matching extban.

Additionally, a redirect ban is a special type of acting extban:

Name Description
Redirect `n!u@h#channel` will redirect the banned user to `#channel` when they try to join (requires the `banredirect` module).

Matching Extended Bans

Matching extbans allow matching against extended user attributes, such as connection class (requires the `classban` module) or TLS (SSL) fingerprint (requires the `sslmodes` module).

Name Character Ban Syntax Description
realmask a a:<pattern> Matches nick!user@host+real mask against <pattern>.
country G G:<pattern> Matches the country code of the user's connection.
channel j j:<pattern> Checks if users are in a channel matching <pattern>.
class n n:<pattern> Checks if users are in a connect class matching <pattern>.
oper O O:<pattern> Checks if users are logged into an operator account matching <pattern>.
realname r r:<pattern> Checks if users have a real name matching <pattern>.
account R R:<pattern> Checks if users are logged into a services account matching <pattern>.
server s s:<pattern> Checks if users are on a server matching <pattern>.
unauthed U U:<pattern> Matches users not logged into a services account.
gateway w w:<pattern> Matches the name of the gateway WebIRC users are connecting from.
sslfp z z:<pattern> Checks if users have a TLS (SSL) client certificate with a fingerprint matching <pattern>.

References

Need Help?

If you have questions or need assistance:

  • * Join the help channel: #Help
  • * Visit Extended Bans.
  • or contact us via e-mail at: support@hybridirc.com