exirc icon indicating copy to clipboard operation
exirc copied to clipboard

IRCv3 Extensions Handling

Open rockerBOO opened this issue 10 years ago • 8 comments

As a general question, does this library wish to handle these specifically?

A lot of the extensions are sort of odd cases, but if servers are implementing a ircv3 spec, it might be worth it to support it. Or maybe a exirc-extensions library with the extra extensions?

https://github.com/ircv3/ircv3-specifications/tree/master/extensions

Happy little accidents

rockerBOO avatar Jun 20 '15 11:06 rockerBOO

I think it would be great to add support for it! I'm thinking I'd like to approach adding the ability to plug in these kinds of extensions, and implement the v3 extensions within exirc using that functionality. This way people can handle adding custom extensions as well, but we don't have to maintain a separate lib for the v3 stuff. Thoughts?

bitwalker avatar Jun 24 '15 14:06 bitwalker

I think that sounds great. How would this be done? I would be glad to start adding the CAP (capability) support.

rockerBOO avatar Jun 27 '15 16:06 rockerBOO

@rockerBOO I've pushed a branch feature/extensions. Take a look at lib/extensions/* where I've defined a behaviour for extensions, with an example extension for handling CAP LS responses. In client.ex you'll see in the diff where I plugged this in. Right now it's pretty much read only (though I added support to ClientState to store capabilities returned in the CAP LS response).

Could you take a look and let me know how we can improve this so that the support is flexible enough to support implementing IRCv3 extensions?

bitwalker avatar Jun 28 '15 08:06 bitwalker

I am honestly not familiar enough with the extensions to know what would be flexible. Might be good to make the extension names match the name in the specification "cap-notify" CapNotifyExtension.

Might be good to think about a adding in a custom command handler too. Some servers I am interacting with, adding capabilities sometimes adds new commands. They won't be specifically in an extension, so some custom way of handling them might be good.

Thanks bitwalker! Been helping me out a lot =).

rockerBOO avatar Jul 03 '15 10:07 rockerBOO

Good point on the extension naming!

I'm pretty unfamiliar with the IRCv3 stuff as well at the moment, but that link you provided has some decent documentation, it'll just take a bit of time to wrap my head around what all the implications are.

The extensions infrastructure I've added should allow you to write "unofficial" extensions (such as a capability not defined in a spec, but added to a server anyway), but if there are awkward bits, let me know and I can tweak how it works.

bitwalker avatar Jul 06 '15 15:07 bitwalker

Just had some time to look this over. Looks great to me.

:+1:

rockerBOO avatar Jul 10 '15 03:07 rockerBOO

Could definitely use the away-notify V3 capability so I could get NOTIFY messages, has this gone anywhere or should I look into other methods?

OvermindDL1 avatar Nov 29 '18 23:11 OvermindDL1

It ended up being really easy to implement it in your own handler, the direct spec page if anyone wants to do so themselves is at: https://ircv3.github.io/specs/core/capability-negotiation-3.1.html

OvermindDL1 avatar Nov 30 '18 18:11 OvermindDL1