[DONE] Prevent users without +r (registered) from joining channels

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

Moderators: Gottem, Supporters

Post Reply
Paul DK
Posts: 12
Joined: Sat Feb 24, 2018 12:33 am

[DONE] Prevent users without +r (registered) from joining channels

Post by Paul DK » Fri Aug 10, 2018 2:00 pm

Hey :)

I don't know if this is possible, but could a module be created that would disallow any non registered (or unidentified) users from joining ANY channels other than those which have an exception to allow them.

In otherwords, make it so a user can't join a room, or even just type /join #randomroomname but have a channelmode that can be set by admins only to make exceptions to rooms like #Help.

At the moment I have +R automatically set on rooms, but this doesn't disallow the room's creation by non-registered nick.

I hope I've explained myself well enough, if you have any questions, I'll be happy to expand.

Thanks for your consideration,

Paul

alhoceima
Posts: 25
Joined: Mon Jul 18, 2016 10:35 pm

Re: [REQUEST] Prevent users without +r (registered) from joining channels

Post by alhoceima » Fri Aug 10, 2018 2:24 pm

u could use:
* deny/allow blocks to prevent users creating channels
* set all open channels to +R

just as a suggestion

Paul DK
Posts: 12
Joined: Sat Feb 24, 2018 12:33 am

Re: [REQUEST] Prevent users without +r (registered) from joining channels

Post by Paul DK » Fri Aug 10, 2018 2:27 pm

Thanks for the suggestion, can you give me an example of how this would work? Because right now, if a non-registered nick types:

Code: Select all

/join #somechannelname
and the channel doesn't already exist, it will let them in and THEN set chmode +R, but at this point they're already in the room. lol

And I wouldn't want to stop all users from creating channels, just non-registered users.

Any help would be appreciated :)

alhoceima
Posts: 25
Joined: Mon Jul 18, 2016 10:35 pm

Re: [REQUEST] Prevent users without +r (registered) from joining channels

Post by alhoceima » Fri Aug 10, 2018 3:03 pm

that might need a module i would think

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

Re: [REQUEST] Prevent users without +r (registered) from joining channels

Post by Amiga00 » Fri Aug 10, 2018 3:05 pm

You can try something like this:

deny channel { channel "*"; reason "Please ask in #Help if you want to create a channel"; }; // Deny ALL Channels
allow channel { channel "#Chan1"; }; // Allow this one
allow channel { channel "#Chan2"; }; // Allow this one

You will need to add all your existing channels into an "allow channel" block so that users can still join them!
Amiga600 @ irc.unrealircd.org #unreal-support

Paul DK
Posts: 12
Joined: Sat Feb 24, 2018 12:33 am

Re: [REQUEST] Prevent users without +r (registered) from joining channels

Post by Paul DK » Fri Aug 10, 2018 3:12 pm

@Amiga00

This looks like a sorta workaround that I could live with for a while if a module can't be written. Thanks very much for the tip.

If possible though, I would much rather this was handled within a module :)

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

Re: [REQUEST] Prevent users without +r (registered) from joining channels

Post by Amiga00 » Fri Aug 10, 2018 3:15 pm

Yeah I know its not ideal like that, But if you feed Gottem some cookies, he may write the module for you :D
Amiga600 @ irc.unrealircd.org #unreal-support

Paul DK
Posts: 12
Joined: Sat Feb 24, 2018 12:33 am

Re: [REQUEST] Prevent users without +r (registered) from joining channels

Post by Paul DK » Fri Aug 10, 2018 3:16 pm

Amiga00 wrote:
Fri Aug 10, 2018 3:15 pm
... But if you feed Gottem some cookies, he may write the module for you :D
Gets to the kitchen to prepare copious amounts of cookies for @Gottem ;) heheh

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

Re: [DONE] Prevent users without +r (registered) from joining channels

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

Someone say cookies?

You can exempt them from the restriction on a per-channel basis by using the new channel mode +A (we runnin' out of chmodes lol). It doesn't take arguments as that would needlessly complicate things, so think of +A as an inverse of +R. ;] As always, opers/U:Lines/servers are not restricted. =]

Users trying to join will get the dankass numeric reply 477: You need a registered nick to join that channel
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

Paul DK
Posts: 12
Joined: Sat Feb 24, 2018 12:33 am

Re: [DONE] Prevent users without +r (registered) from joining channels

Post by Paul DK » Sat Aug 18, 2018 12:54 am

Hey Gottem!!

I've not had a chance to test this too intensively but it looks ideal so far!! Thanks sooooooooo much and I'm blown away by how quickly you were able to sort this out for me.

Thanks again!!

Paul

Paul DK
Posts: 12
Joined: Sat Feb 24, 2018 12:33 am

Re: [DONE] Prevent users without +r (registered) from joining channels

Post by Paul DK » Tue Aug 28, 2018 10:48 pm

Hiya @Gottem!!

The module is working really well, thanks for that. I was wondering if it could be extended somewhat with a "NO_PM" for unregistered nicks, or that would be best suited to its own module?

(so that only nicks that are identified to services can /query users) If it can be that they can still PM IRCops then that would be great but not absolutely necessary ;)

/me gets the oven going again and prepares super special cookies for Gottem

Thanks in advance for looking into this :)

Paul

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

Re: [DONE] Prevent users without +r (registered) from joining channels

Post by Gottem » Wed Aug 29, 2018 6:00 am

You mean the already existing umode +R? ;]
usermodes/regonlymsg Only receive private messages from users who are "registered users" (authenticated by Services)
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

Paul DK
Posts: 12
Joined: Sat Feb 24, 2018 12:33 am

Re: [DONE] Prevent users without +r (registered) from joining channels

Post by Paul DK » Wed Aug 29, 2018 2:22 pm

I would need it to work the other way, so that it was a mode enforced on unregistered nicks so that they couldn't SEND pvt messages until that had usermode +r (regsitered/identified) ... although it would need to exclude u:lines so that they could still communicate with NickServ.

Hope you understand what I mean :)

Paul DK
Posts: 12
Joined: Sat Feb 24, 2018 12:33 am

Re: [DONE] Prevent users without +r (registered) from joining channels

Post by Paul DK » Wed Aug 29, 2018 2:53 pm

Hey Gottem,

I think you can ignore the above request concerning PM restriction. When you mentioned +R I realized I could use it in conjunction with set::modes-on-connect and set::restrict-usermodes to get the effect I needed.

Sorry for wasting your time, and thanks for the hint ... much appreciated :)

Paul

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

Re: [DONE] Prevent users without +r (registered) from joining channels

Post by Gottem » Wed Aug 29, 2018 4:32 pm

Das okay, it made me write a script to keep track of available chmodes/umodes/snomasks/extbans so it's not a total loss. ;]
If you like my modules, pls consider donating (through PayPal) or becoming a monthly Patron ;];]

Post Reply