textshun.md 2.2 KB

[UNC] textshun

Enables privileged 0pers to drop messages based on nick and body regexes (T-Lines), similar to badwords and spamfilter but more specific. It only supports (PCRE) regexes because regular wildcards seem ineffective to me, fucken deal w/ it. ;] Also, you can't have spaces (due to how IRC works) so you'll have to use \s and shit. Unreal creates a case-insensitive match so no worries there, it also tells you if you fucked up your regex (and what obv). Only opers with the new operpriv textshun will be able to use it, although all others will get the notices since these T-Lines are netwerk wide bruh. You'll also get a server notice for when a T-Line is matched. Servers, U-Lines and opers are exempt for obvious raisins.

Expiring shuns is done with an EVENT thingy in Unreal, which is set to run every 10 seconds. This means if you set a shun for 5 seconds (why would you anyways?) it may not expire after eggzacktly 5 seconds. ;] When no expiration is specified the value in set::default-bantime is used. Every server checks the expirations themselves. =] Also, they store it in a ModData struct so it persists through a rehash without the need for a .db fiel. ;] Furthermore, they sync their known T-Lines upon server linkage. =]] Other lines such as G-Lines, Z-Lines are also stored in memory and get resynced during a link so these are pretty similar aye.

Config block:

operclass netadmin-textshun {
    parent netadmin;
    permissions {

TEXTSHUN <ADD/DEL> <nickrgx> <bodyrgx> [expire] <reason>

Also supports the aliases TS and TLINE. =]


  • TLINE add guest.+ h[o0]+m[o0]+ 0 nope => All...
  • TEXTSHUN add guest.+ h[o0]+m[o0]+ nope => ...of...
  • TS del guest.+ .+ => ...these add/delete the same T-Line, with no expiration
  • TLINE add guest.+ h[o0]+m[o0]+ 3600 ain't gonna happen => Add a T-Line that expires in an hour =]
  • TLINE add guest.+ h[o0]+m[o0]+ 1h ain't gonna happen => Ditto ;];]
  • TLINE => Show all T-Lines
  • TS halp => Show built-in halp

The nick regex is matched against both nick!user@realhost and nick!user@vhost masks. The timestring shit like 1h supports up to weeks (so you can't do 1y).