feat(irc): SASL PLAIN login and IRCv3 server-time
Registration now opens with CAP LS 302 (servers without IRCv3 ignore it and register as before). From the offered capabilities (multi-line LS lists included) the client requests server-time and, when the profile enables it, sasl; then AUTHENTICATE PLAIN with the account (defaulting to the nick) and a stored SASL password (irc-sasl-password), base64 in 400-byte chunks, and CAP END on success or failure — failures are shown on the Server tab and the connection carries on (NickServ still works). server-time tags stamp events with the server's clock, so replayed history shows real times. Tested against the fake IRC server: multi-line LS, REQ/ACK, the PLAIN exchange, 903, CAP END, and a tagged message's timestamp.
This commit is contained in:
@@ -466,6 +466,11 @@ pub struct IrcConfig {
|
||||
pub nick_serv_identify: bool,
|
||||
pub nick_serv_account: String,
|
||||
pub nick_serv_mode: SecretMode,
|
||||
/// Log in with SASL PLAIN during registration (needs the network to offer it).
|
||||
pub sasl: bool,
|
||||
/// SASL account (defaults to the nick).
|
||||
pub sasl_account: String,
|
||||
pub sasl_mode: SecretMode,
|
||||
#[serde(deserialize_with = "nd")]
|
||||
pub auto_join_rooms: Vec<String>,
|
||||
pub ssh_tunnel: bool,
|
||||
|
||||
Reference in New Issue
Block a user