report.md 2.9 KB

report

Requested by Valware, this module allows users to report bad stuff to the assigned IRC operators. By "assigned" I mean they have the proper operclass permissions to handle deez nuts reports (see bel0).

This shit doesn't impose too many restrictions, just exact case-insensitive duplicates of a certain report. Colours etc are stripped beforehand ofc 0fc. ;] Currently reports are listed in descending order, meaning the most recent rep0t is up top. Reports are synced across the entire network and they each have a unique ID to keep track of em, they are also kept through rehashes.

br0tip: combine this shit with the restrict-commands config block. Best idea is pr0lly to just set a minimum reputation, this should help prevent spam because people with enough reputation usually know better. Of course you could also enable m0ar restricti0nes. ;];];]

Some n0tes:

  • Reports must be unique, but the ID is (obviously) shared across all servers. If during a netsplit 2 separate/different reports are made on both ends, then when they sync that shit they'll both complain about a mismatch. You'll have to delete the ID on one end to resolve it. It doesn't matter if a report is added on one side only, because the other will simply accept the synced one in that case.
  • Right now the synctime logic for verifying "sane" reports is a little basic, if it causes (too many) problems then I can always revise em. =]] Like, right now you could have a report with the exact same comment but a different ID. On one hand that makes sense because it's a "new" report (likely by someone else) so you wanna know about it, but on the other you just handled a similar report. So, time will tell if this is excessive or nah. [==[=[[=[=[=
  • While IDs are persistent through rehashes, they will reset if the report list is entirely empty when the IRCd is rehashed.
  • Opers can still create reports themselves, I don't think it's really necessary to restrict that y0.

Config blocks:

operclass netadmin-report {
    parent netadmin;
    permissions {
        report {
            // These can be set individually, or to grant all of them you can just do like: permissions { report; };
            delete;
            list; // For e.g. "trainees" you could only let them view reports and have them let others know to delete a report when it's been handled
            notify; // All opers with this permission will receive notifications about new/deleted reports (both by users and those synced with other servers when linking)
        };
    };
};

report {
    // These are all optional ;]
    //min-chars 5; // Set a minimum amount of characters required for report comments (allowed range is 1-50, default = 10)
    //max-reports 100; // Set a maximum amount of stored rep0ts (allowed range is 1-200, default = 50)
};

Syntax:
Shit should be p self-explanatory lmao:
REPORT <comment>
REPORTLIST
REPORTDEL <id>