ergochat / ergo

A modern IRC server (daemon/ircd) written in Go.
https://ergo.chat/
MIT License
2.22k stars 177 forks source link

support KNOCK #1047

Open slingamn opened 4 years ago

slingamn commented 4 years ago

@aster1sk was asking about this:

https://en.wikipedia.org/wiki/List_of_Internet_Relay_Chat_commands#KNOCK

Dan says it's widely supported, let's do this in 2.2.

slingamn commented 4 years ago

https://github.com/ircv3/ircv3-specifications/issues/50

Mikaela commented 2 years ago

I think knocking would be especially good match with Ergo considering with always-on it becomes more persistent than on average IRCd. I think it could also be used to gauge interest in a room.

Dan says it's widely supported…

I observe this being supported at least by Hybrid (OFTC), InspIRCd (HybridIRC, Snoonet, TildeChat), Solanum (LiberaChat) and in other protocols at least Matrix has it.

yunginnanet commented 2 years ago

yeah this is overdue

slingamn commented 2 years ago

Is there a spec for it? https://github.com/ircv3/ircv3-specifications/issues/50 seemed inconclusive. I could just copy the Inspircd implementation?

Mikaela commented 2 years ago

I don't seem to find one, but I think the solution is something of a mix between Hybrid/Solanum and InspIRCd.

Hybrid & Solanum

They seem to be the exact same, probably due to OFTC's plans to migrate to Solanum, so S likely copied H

knock KNOCK <channel>
knock 
knock KNOCK requests access to a channel that
knock for some reason is not open.
knock 
knock KNOCK cannot be used if you are banned, the
knock channel is +p, or it is open.
knock 
knock End of /HELP.

InspIRCd

knock /KNOCK <channel> :<reason>
knock 
knock Sends a notice to a channel indicating you wish to join.
knock 
knock End of /HELPOP.

In this case InspIRCd doesn't mention any opt-out, open may be given, Ergo doesn't implement p though (maybe it should for this, considering I think it's part of either RFC?) and I don't think processing knocks while banned is necessary. +M and +R in my opinion should filter unidentified knocks.

yunginnanet commented 2 years ago

You're not wrong though, it's out of spec.