mshun.md 1.9 KB

[MALV] mshun

Enables privileged 0pers to add shuns that only affect PRIVMSG, NOTICE, KNOCK and INVITE (M-Lines lmao), except when sending to U-Lines (NiqqServ etc). Only opers with the new operpriv mshun will be able to use it, although all other 0pers will get the notices since these M-Lines are netwerk wide bruh. 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 M-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-mshun {
    parent netadmin;
    privileges {
        mshun;
    };
};

Syntax:
MSHUN [-]<ident@host> [expire] <reason>

Also supports the alias MLINE. The first argument may also be an online nickname, this will be resolved to their full mask. =] Wildcards * and ? are also supp0rted.

Examples:

  • MSHUN guest*@* 0 nope => All...
  • MLINE guest*@* 0 nope => ...of...
  • MLINE -guest*@* => ...these add/delete the same M-Line, with no expiration
  • MSHUN guest*@* 3600 ain't gonna happen => Add an M-Line that expires in an hour =]
  • MSHUN guest*@* 1h ain't gonna happen => Ditto ;];]
  • MSHUN => Show all M-Lines
  • MLINE halp => Show built-in halp

The hostmask is matched against user@realhost only. The timestring shit like 1h supports up to weeks (so you can't do 1y).