[DONE] Looking for delaylist.c port for unreal4

Need a module converted from 3.2.x to UnrealIRCd 4? Or looking for a certain module? Ask here.

Moderators: Gottem, Supporters

Post Reply
HeXiLeD
Posts: 31
Joined: Mon Jan 16, 2017 8:07 pm
Location: online

[DONE] Looking for delaylist.c port for unreal4

Post by HeXiLeD » Fri Mar 17, 2017 2:03 am

/*
* ==================================================================
* Module: delaylist.c
* Author: w00t <surreal.w00t@gmail.com>
* Version: 1.0.0
* Written For: Stskeeps
* Licence: GPL
* Description: Delays list for newly connected clients.
* ==================================================================
*/
*/
Original code here

If anyone could port it, it would be great.
Constructive criticism leads to evolution and progress. Negative criticism leads to obsolescence. We should not be living in 1990s irc management & developing standards just because it was cool.

Gottem
Posts: 165
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Looking for delaylist.c port for unreal4

Post by Gottem » Fri Mar 17, 2017 6:42 pm

Saw your request in the channel before I headed off to work and made a note. ;] Decided not to port this one but instead use my m_pmdelay as base (since it's very similar anyways), as such the same restrictions apply (delay must be >= 10). Also renamed it slightly to m_listdelay to be consistent with m_pmdelay. =]

Change the delay with:

Code: Select all

set {
	listdelay 60;
};
Checkem here
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

HeXiLeD
Posts: 31
Joined: Mon Jan 16, 2017 8:07 pm
Location: online

Re: [DONE] Looking for delaylist.c port for unreal4

Post by HeXiLeD » Sat Sep 02, 2017 10:29 am

In the past (u3.2*) we also had m_listreg.c which also has it's usefulness and although i was thinking about requesting a port of for for u4.*, I thought maybe adding it's functionalities to delaylist.c,. given the use a it's specific configuration file.

Original code here.

example:

Code: Select all

set {
			list_delay yes|no;
			delay_time 60;
			require_reg yes|no; 
};
notes:
* list_delay no; should obviously ignore delay_time
* require_reg yes; should not bypass delay_time

This would mean merging two modules in one and thus making it more versatile and perhaps the module could e renamed to, list_options.c or something similar.

I do not really see the point of having to separate modules, but should there be a technical good reason not to merge the modules, it would still be nice to have m_listreg.c ported to urealircd4.

Part 2: (optional but nice to have)

Always /list based on mask/ip/host that is white listed:

Code: Select all

set {
			list_delay yes|no;	# it set to yes, it should still obey bypass white list option for white listed people
			delay_time 60;
			require_reg yes|no;
			bypass_options yes|no;	# if set to no, it will ignore bypass options bellow
						# if set to yes, it will activate white listed people
};

# Bypass white list options will have the last word in regards to list_delay and require_reg:

Code: Select all

set {
	bypass_delay { 
				some@ip|mask;
				user@localhost;
				etc... };

        bypass_reg { 
				some@ip|mask;
				user@localhost; 
				etc... };
};
Note: identified opers should never should never be affected by this module
Constructive criticism leads to evolution and progress. Negative criticism leads to obsolescence. We should not be living in 1990s irc management & developing standards just because it was cool.

Gottem
Posts: 165
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Looking for delaylist.c port for unreal4

Post by Gottem » Sat Sep 02, 2017 3:05 pm

We good. =] The config block is a lil different than you described, but it does the same. Add a new top level block (so not within set):

Code: Select all

listrestrict {
	connectdelay 60; // How long a client must have been online for
	needauth 1; // Besides connectdelay, also require authentication w/ services

	exceptions {
		all "user@*";
		auth "*@123.123.123.*";
		connect "someone@some.isp";
		connect "need@moar";
	};
};
Omitting a directive entirely will make it default to off. If connectdelay is specified, the minimum required value is (still) 10 as anything below seems pretty damn useless to me. =] The exceptions block should be pretty self explanatory. ;] If multiple masks match a user, only the first one will be checked/used.

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

Get it here
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

HeXiLeD
Posts: 31
Joined: Mon Jan 16, 2017 8:07 pm
Location: online

Re: [DONE] Looking for delaylist.c port for unreal4

Post by HeXiLeD » Thu Dec 28, 2017 12:11 pm

So far the module looks great 8)
I was wondering if it would be easy to implement the possibility of customizing the replies send by the module:
You have to be connected for at least 60 seconds before being able to /LIST
You have to be identified with services before being able to /LIST
The customization would be done in the module config file.

Example:

Code: Select all

listrestrict {
	connectdelay 60; // How long a client must have been online for
        delay_msg "blah blab blah /list";

	needauth 1; // Besides connectdelay, also require authentication w/ services
        auth_msg "blah blab blah /list";

exceptions {
		all "user@*";
		auth "*@123.123.123.*";
		connect "someone@some.isp";
		connect "need@moar";
	};
};
Reason being to provide specific information on how to proceed next and or services details without have to edit the code every time the module gets compiled.

8)
Constructive criticism leads to evolution and progress. Negative criticism leads to obsolescence. We should not be living in 1990s irc management & developing standards just because it was cool.

Gottem
Posts: 165
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Looking for delaylist.c port for unreal4

Post by Gottem » Thu Dec 28, 2017 6:33 pm

I don't really see a reason why you would need to edit those. =] It already sends both those messages (as you mentioned) and they should be pretty clear anyways.
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

Amiga00
Posts: 10
Joined: Sun Aug 05, 2018 2:51 pm

Re: [DONE] Looking for delaylist.c port for unreal4

Post by Amiga00 » Thu Aug 09, 2018 9:51 am

Well being able to set the messages themselves (and perhaps use a default if not set), would enable different languages to be used as well, for example, perhaps the server does not use English as its first language, therefore, they could set that instead of using the English version.
Amiga600 @ irc.unrealircd.org #unreal-support

Gottem
Posts: 165
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: [DONE] Looking for delaylist.c port for unreal4

Post by Gottem » Sun Aug 12, 2018 10:11 pm

Maybe I can hack up something like m_localisation which would export some functions so my other mods can use it (if it's not loaded then every mod would just use the English defaults). Then unrealircd.conf could contain something like:

Code: Select all

localisation {
    listrestrict {
        delay "You have to be connected for at least %d seconds before being able to /LIST";
        auth "You have to be identified with services before being able to /LIST";
    };
    message_commonchans {
        deny "You need to be on a common channel with %s to privately message them";
    };
    // etcetctetctetcetcetcectttece
};
Cuz right now, only some of the modules have configurable messages and only for user-facing shit. I'd imagine opers would want their debug messages in their own language too, in which case it makes more sense to have a localisation module instead of having configurables for each module separately.

Would need to figure out a clean/efficient way for handling template vars such as %d and %s in above example though. :>
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

Post Reply