Set both +o and +a on first user join

If your UnrealIRCd is up and running but you have a question about it, then use this forum.
(NOT for installation or connecting issues! Use the other forum instead.)

Moderator: Supporters

Locked
exceptionall.null
Posts: 1
Joined: Sun Jul 08, 2018 2:44 am

Set both +o and +a on first user join

Post by exceptionall.null »

I would like to use the setting set::level-on-join "protect" but this causes an issue with anope services which requires a user to be a channel op to register.

Is there a way to set mode +oa on a user when they join rather than just +a?
Amiga00
Posts: 12
Joined: Sun Aug 05, 2018 2:51 pm

Re: Set both +o and +a on first user join

Post by Amiga00 »

Yes well I think maybe multiple options could be set in the level-on-join, such as say "owner,protect,op,halfop" for example, then it would set the modes specified on the user when they join, certainly would be a good addition.

So in this case, for example, you would type: level-on-join "protect,op";
Amiga600 @ irc.unrealircd.org #unreal-support
Gottem
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

Re: Set both +o and +a on first user join

Post by Gottem »

^ Lies. :D

Code: Select all

else if (!strcmp(cep->ce_varname, "level-on-join")) {
	char *p;
	CheckNull(cep);
	CheckDuplicate(cep, level_on_join, "level-on-join");
	if (!channellevel_to_int(cep->ce_vardata))
	{
		config_error("%s:%i: set::level-on-join: unknown value '%s', should be one of: none, voice, halfop, op, protect, owner",
			cep->ce_fileptr->cf_filename, cep->ce_varlinenum, cep->ce_vardata);
		errors++;
	}
}
Notice the should be one of; channellevel_to_int() needs an exact match on either of those values (none, voice, etc). Should probably just ask Syzop to implement support for multiple flags. ;]
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Locked