inspircd-contrib icon indicating copy to clipboard operation
inspircd-contrib copied to clipboard

m_connjoin: add exceptions

Open manavortex opened this issue 6 years ago • 1 comments

Hey there, I'm running an inspired, and I've got several accounts I keep around for test purposes. Is there a way to block those from m_connjoin? I would like to exclude a host mask or maybe a user mode.

Thanks in advance.

manavortex avatar May 10 '18 12:05 manavortex

Already possible. Looked in the source of the m_conn_join.cpp module. Then I tested it and it works wonderfully.

And you simply specify autojoin parameter in the connect blocks.

Here is an example of exempting 192.168.0.0/16 from autojoin to #main but not #help, while localhost, 127.0.0.1, is exempt from all autojoins:

<connect allow="127.0.0.1/32"
         name="local">
<connect allow="192.168.0.0/16"
         name="lan"
         autojoin="#help">
<connect allow="*"
         name="default"
         autojoin="#main,#help">

Note that the default config of the <autojoin channel="xxx"> should NOT be specified. Note also that I have excluded the timeout and flood settings, you need to just add autojoin="" to each connect block it should apply to.

And create connect blocks (without autojoin tag - remember to put them BEFORE the catchall) for those that should be exempt from autojoin.

sebastiannielsen avatar May 11 '18 00:05 sebastiannielsen