A nick can be grouped to an account and then identifies to it; the store resolves an alias to its account everywhere it authenticates. GHOST (and RECOVER) rename off a session using a nick you own. Grouped nicks federate and are dropped with their account.
17 lines
659 B
Rust
17 lines
659 B
Rust
use crate::engine::db::Db;
|
|
use crate::engine::service::{Sender, ServiceCtx};
|
|
|
|
// GLIST: list the nicks grouped to your account.
|
|
pub fn handle(me: &str, from: &Sender, ctx: &mut ServiceCtx, db: &Db) {
|
|
let Some(account) = from.account else {
|
|
ctx.notice(me, from.uid, "You need to be logged in. Identify to NickServ first.");
|
|
return;
|
|
};
|
|
let mut nicks = db.grouped_nicks(account);
|
|
nicks.sort();
|
|
ctx.notice(me, from.uid, format!("Nicks grouped to \x02{account}\x02:"));
|
|
ctx.notice(me, from.uid, format!(" \x02{account}\x02 (main)"));
|
|
for n in nicks {
|
|
ctx.notice(me, from.uid, format!(" \x02{n}\x02"));
|
|
}
|
|
}
|