HostServ: temporary vhosts (expiry)

SET <account> <host> [duration] assigns a vhost that lapses after the
duration (e.g. 30d); a Vhost carries an optional expiry and the store hides
an expired one lazily (like a suspension), so it stops applying on identify/
ON without a sweep. LIST flags temporary vhosts.
This commit is contained in:
Jean Chevronnet 2026-07-13 22:53:04 +00:00
parent 87bad7fbcc
commit 271e06fa77
No known key found for this signature in database
8 changed files with 81 additions and 28 deletions

View file

@ -12,6 +12,7 @@ pub fn handle(me: &str, from: &Sender, ctx: &mut ServiceCtx, db: &dyn Store) {
}
ctx.notice(me, from.uid, format!("Assigned vhosts ({}):", vhosts.len()));
for v in &vhosts {
ctx.notice(me, from.uid, format!(" \x02{}\x02{} (by {})", v.account, v.host, v.setter));
let temp = if v.expires.is_some() { ", temporary" } else { "" };
ctx.notice(me, from.uid, format!(" \x02{}\x02{} (by {}{temp})", v.account, v.host, v.setter));
}
}