Limnoria icon indicating copy to clipboard operation
Limnoria copied to clipboard

Allow plugins to request new IRCv3 capabilities on load

Open jlu5 opened this issue 4 years ago • 0 comments

I imagine this looking something like:

  • irc.requestIRCv3Cap("name-of-cap"), which gets translated to CAP REQ :name-of-cap
  • irc.removeIRCv3Cap("name-of-cap"), which gets translated to CAP REQ :-name-of-cap
  • Both commands should reject attempts to remove capabilities requested by Limnoria core (see Irc.REQUEST_CAPABILITIES)
  • Both of these methods should fail in a consistent manner if sending CAP REQ post-connection is not supported by the server. (I think this requires CAP LS 302 to work?)
  • This code needs to handle reconnections, so we probably need to store a set of all plugin-requested capabilities and ask for them at connect time.
  • Since we already keep track of which capabilities the server supports, we can probably check the request against to save a CAP REQ round trip. Or can servers reject capabilities even if they're shown as available for whatever reason?

jlu5 avatar Dec 12 '20 19:12 jlu5