HostServ: ident@host vhosts (CHGIDENT)
A vhost may be ident@host, not just host: apply_vhost splits it and sends CHGIDENT for the ident plus CHGHOST for the host. valid_vhost validates the optional ident part; ON/SET/ACTIVATE/identify all route through apply_vhost, so a bare host still works unchanged. New SetIdent action.
This commit is contained in:
parent
1edf250952
commit
898461d1c2
8 changed files with 65 additions and 8 deletions
|
|
@ -29,7 +29,7 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, net:
|
|||
match db.set_vhost(account, &host, from.nick) {
|
||||
Ok(()) => {
|
||||
for uid in net.uids_logged_into(account) {
|
||||
ctx.set_host(&uid, &host);
|
||||
ctx.apply_vhost(&uid, &host);
|
||||
}
|
||||
ctx.notice(me, from.uid, format!("Activated vhost \x02{host}\x02 for \x02{account}\x02."));
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue