kiwiirc / irc-framework

🛠️ A better IRC framework for node.js. For bots and full clients.
MIT License
181 stars 63 forks source link

Store capability values from CAP v3.2 handshakes + honor SASL v3.2 mechanism lists #322

Closed progval closed 1 year ago

progval commented 2 years ago
  1. Store capability values in 'CAP LS 302' negotiations.

    So it can be retrieved later (eg. to know what SASL mechanisms are available).

    https://ircv3.net/specs/extensions/capability-negotiation.html#the-cap-ls-subcommand

  2. Honor SASL v3.2 mechanism lists

    From https://ircv3.net/specs/extensions/sasl-3.2#usage:

    Clients SHOULD pick a mechanism present in the CAP LS reply they get from the server and attempt to use that mechanism for authentication after they request the sasl capability.

Tested on The Lounge.

ItsOnlyBinary commented 2 years ago

As this is tracking available caps it seems it would be also wise for it to track cap-notify (CAP NEW|DEL) events to keep the list accurate

https://github.com/kiwiirc/irc-framework/blob/cae2d67eb9d4814123da78733ba05891b49ba597/src/commands/handlers/registration.js#L236

https://github.com/kiwiirc/irc-framework/blob/cae2d67eb9d4814123da78733ba05891b49ba597/src/commands/handlers/registration.js#L253

progval commented 1 year ago

Done (but not tested)

ItsOnlyBinary commented 1 year ago

forcing checks to re-run

ItsOnlyBinary commented 1 year ago

:) thanks