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

These are old archives. They are kept for historic purposes only.

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 »

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

====================

[Gottem EDIT 20181104] Current information should probably be displayed in the first post and not somewhere down the thread. :>


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
alhoceima
Posts: 32
Joined: Mon Jul 18, 2016 10:35 pm

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

Post by alhoceima »

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 »

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: 32
Joined: Mon Jul 18, 2016 10:35 pm

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

Post by alhoceima »

that might need a module i would think
Amiga00
Posts: 12
Joined: Sun Aug 05, 2018 2:51 pm

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

Post by Amiga00 »

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 »

@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: 12
Joined: Sun Aug 05, 2018 2:51 pm

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

Post by Amiga00 »

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 »

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
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

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

Post by Gottem »

I moved all relevant information to the OP to keep it in one place and easily accessible [20181104].
If you like my modules, pls consider donating (credit card or iDEAL, use the custom job fee option in my shop) ;];]
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 »

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 »

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
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

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

Post by Gottem »

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 (credit card or iDEAL, use the custom job fee option in my shop) ;];]
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 »

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 »

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
UnrealIRCd coder
Posts: 192
Joined: Fri Aug 19, 2016 5:26 pm
Location: NL

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

Post by Gottem »

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 (credit card or iDEAL, use the custom job fee option in my shop) ;];]
Post Reply