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:
parent
87bad7fbcc
commit
271e06fa77
8 changed files with 81 additions and 28 deletions
|
|
@ -14,7 +14,7 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
|
|||
ctx.notice(me, from.uid, format!("There's no offer #\x02{n}\x02. See \x02OFFERLIST\x02."));
|
||||
return;
|
||||
};
|
||||
match db.set_vhost(account, &host, "offer") {
|
||||
match db.set_vhost(account, &host, "offer", None) {
|
||||
Ok(()) => {
|
||||
ctx.apply_vhost(from.uid, &host);
|
||||
ctx.notice(me, from.uid, format!("You now have the vhost \x02{host}\x02."));
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue