kiwiirc / kiwibnc

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Support anonymous connections until SASL response

prawnsalad opened this issue · comments

I haven't thought of the best way to go about this as yet, but an easier way to use kiwibnc as a frontend to a network without integration hassles is to make use of the networks existing SASL support.

  1. When a connection attempts to log into kiwibnc, and if the user does not already exist in kiwibnc, accept the connection anyway but under an anonymous state that has no kiwibnc account affiliation (state.auth* properties set to 0 probably makes sense)
  2. If an anonymous connection does not support SASL, close the connection and clean it up with a client error of 'Logging into this network is not supported'.
  3. If an anonymous connection receives a SASL error such as invalid auth, close the connection and clean it up with a client invalid password error.
  4. If an anonymous connection receives a valid SASL auth response, create a kiwibnc account with that user+pass, create the network under the users account with the SASL account credentials, and assign this anonymous connection to that newly created user.

This will probably require a config option to set a single IRC network address.