listrestrict.md 2.3 KB

listrestrict

Allows you to impose certain restrictions on /LIST usage, such as requiring clients to have been online for a certain period of time. Simply load the module and add a new block to your unrealircd.conf, for which see bel0w. Opers, servers and U-Lines are exempt for obvious reasons. ;]

Even though Unreal now has a set::restrict-commands block you can use to delay /LIST usage, it doesn't provide the honeypot functionality, so I've kept this module as-is. listrestrict adds overrides with a higher priority though, so even if you configure both then listrestrict will run first.

Config block:

listrestrict {
    connectdelay 60; // How long a client must have been online for
    needauth 1; // Besides connectdelay, also require authentication w/ services
    authisenough 1; // Don't check connectdelay if user is identified OR exempt from authentication entirely
    fakechans 1; // Send a fake channel list if connectdelay and/or needauth checks fail
    glinetime 7d; // For channels with gline set to 1, use 0 for permanent bans

    fakechannel {
        // Only the name is required
        name "#honeypot";
        //topic "ayy lmao"; // Defaults to "DO NOT JOIN"
        //users 50; // Defaults to 2 users, must be >= 1
        //gline 0; // Defaults to 0
    };

    fakechannel {
        name "#fakelol";
        topic "top kek";
        users 10;
        gline 1; // G-Line won't kick in if connectdelay and needauth checks are satisfied, or if the user has a 'fakechans' exception
    };

    exceptions {
        all "user@*";
        connect "someone@some.isp"; // Only require auth
        auth "*@123.123.123.*"; // Only require connectdelay
        fakechans "ayy@lmao"; // Don't send a fake channel list, just prevent sending of the legit one

        // You can also specify multiple types for the same mask:
        auth "need@moar";
        fakechans "need@moar";
        // This user would only need to wait <connectdelay> seconds and won't get a fake channel list at all
    };
};

Omitting a directive entirely will make it default to off. If connectdelay is specified, the minimum required value is 10 as anything below seems pretty damn useless to me. =] The exceptions block should be pretty self explanatory. ;]

As usual with my mods, U-Lines, opers and servers are exempt from any restrictions.