ircnet / ircd

17 stars 6 forks source link

K-Line flags to exclude SASL and ident #23

Closed patrick-irc closed 1 month ago

patrick-irc commented 1 month ago

Add flags to K-Line in ircd.conf and TKLINE command to restrict the K-Line.

This way we can easily tell users on problematic IP ranges that they should either use SASL or identd.

TKLINE

Previous TKLINE syntax:

TKLINE <timeformat> <user@host> :<reason>

New TKLINE syntax:

TKLINE <timeformat[%flags]> <user@host> :<reason>

Example:

TKLINE 60s%SI *@127.0.0.1 :reason

Apply K-Line for hostmask *@127.0.0.1 expiring in 60 seconds unless they are: a) SASL authenticated (S) or b) using identd (I)

K-Line

As above:

K|127.0.0.1|reason|*|0|SI

RPL_STATSKLINE (216)

Old syntax:

K <host> * <username> <port> <port|time> <class>

New syntax:

K <host> * <username> <port> <port|time> <class> <flags>

Example:

stats K
:nova.irc.it 216 test K 127.0.0.1 reason * 0 0 -
:nova.irc.it 216 test K 127.0.0.2 reason * 0 0 SI
:nova.irc.it 219 test K :End of STATS report
stats k
:nova.irc.it 216 test K 127.0.0.3 reason * 981 0 SI
:nova.irc.it 216 test K 127.0.0.4 reason * 985 0 -
:nova.irc.it 219 test k :End of STATS report