nickserv: add SET (password/email) and DROP
SET PASSWORD changes your password (derived off-thread like register) and SET EMAIL sets an address. DROP deletes your account, releases and drops the channels you founded, and logs you out. A dropped account federates, and each node logs out any local session that was relying on it.
This commit is contained in:
parent
0427819f86
commit
ef89f97158
9 changed files with 249 additions and 23 deletions
|
|
@ -280,8 +280,8 @@ impl Protocol for InspIrcd {
|
|||
vec![format!(":{} INVITE {} {} 1 0", from, uid, channel)]
|
||||
}
|
||||
NetAction::Raw(s) => vec![s.clone()],
|
||||
// Internal: the link layer handles this before serialization.
|
||||
NetAction::DeferRegister { .. } => vec![],
|
||||
// Internal: the link layer handles these before serialization.
|
||||
NetAction::DeferRegister { .. } | NetAction::DeferPassword { .. } => vec![],
|
||||
}
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -68,6 +68,9 @@ pub enum NetAction {
|
|||
// still needs its (expensive) key derivation. The link layer runs the
|
||||
// derivation off-thread, then calls Engine::complete_register.
|
||||
DeferRegister { account: String, password: String, email: Option<String>, reply: RegReply },
|
||||
// Internal only: a password change awaiting the same off-thread derivation.
|
||||
// The link layer derives, then calls Engine::complete_password_change.
|
||||
DeferPassword { account: String, password: String, agent: String, uid: String },
|
||||
}
|
||||
|
||||
// How to answer a registration once its credentials have been derived.
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue