Page 1 of 1

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

Posted: Fri Aug 10, 2018 2:00 pm
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

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

Posted: Fri Aug 10, 2018 2:24 pm
by alhoceima
u could use:
* deny/allow blocks to prevent users creating channels
* set all open channels to +R

just as a suggestion

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

Posted: Fri Aug 10, 2018 2:27 pm
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 :)

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

Posted: Fri Aug 10, 2018 3:03 pm
by alhoceima
that might need a module i would think

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

Posted: Fri Aug 10, 2018 3:05 pm
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!

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

Posted: Fri Aug 10, 2018 3:12 pm
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 :)

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

Posted: Fri Aug 10, 2018 3:15 pm
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

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

Posted: Fri Aug 10, 2018 3:16 pm
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

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

Posted: Sun Aug 12, 2018 10:04 pm
by Gottem
I moved all relevant information to the OP to keep it in one place and easily accessible [20181104].

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

Posted: Sat Aug 18, 2018 12:54 am
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

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

Posted: Tue Aug 28, 2018 10:48 pm
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

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

Posted: Wed Aug 29, 2018 6:00 am
by Gottem
You mean the already existing umode +R? ;]
usermodes/regonlymsg Only receive private messages from users who are "registered users" (authenticated by Services)

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

Posted: Wed Aug 29, 2018 2:22 pm
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 :)

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

Posted: Wed Aug 29, 2018 2:53 pm
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

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

Posted: Wed Aug 29, 2018 4:32 pm
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. ;]