nickserv: email confirmation (CONFIRM) on registration
When email is configured and a REGISTER includes an address, the account starts unverified and a confirmation code is emailed. CONFIRM <code> verifies it (a federated AccountVerified event); INFO shows an unconfirmed email until then. Emailed codes now carry a purpose (reset vs confirm).
This commit is contained in:
parent
a2957ffe02
commit
fbcf0eaac7
6 changed files with 140 additions and 20 deletions
|
|
@ -13,7 +13,8 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
|
|||
ctx.notice(me, from.uid, format!(" Registered : {}", human_time(acct.ts)));
|
||||
if from.account == Some(acct.name.as_str()) {
|
||||
match &acct.email {
|
||||
Some(email) => ctx.notice(me, from.uid, format!(" Email : {email}")),
|
||||
Some(email) if acct.verified => ctx.notice(me, from.uid, format!(" Email : {email}")),
|
||||
Some(email) => ctx.notice(me, from.uid, format!(" Email : {email} (unconfirmed)")),
|
||||
None => ctx.notice(me, from.uid, " Email : (none set)"),
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue