NickServ: show last-seen (and online status) in INFO
The account's last-active time was tracked but never surfaced. INFO now reports it, reading 'now (online)' when the account has a live session. Threads NetView into the INFO handler for the session lookup and carries last_seen on AccountView.
This commit is contained in:
parent
2c4bc9079c
commit
39d7421c06
5 changed files with 22 additions and 4 deletions
|
|
@ -11,6 +11,7 @@ impl Store for Db {
|
|||
ts: a.ts,
|
||||
verified: a.verified,
|
||||
greet: a.greet.clone(),
|
||||
last_seen: a.last_seen,
|
||||
})
|
||||
}
|
||||
fn resolve_account(&self, name: &str) -> Option<&str> {
|
||||
|
|
@ -19,7 +20,7 @@ impl Store for Db {
|
|||
fn accounts_matching(&self, pattern: &str) -> Vec<AccountView> {
|
||||
self.accounts()
|
||||
.filter(|a| super::glob_match(pattern, &a.name))
|
||||
.map(|a| AccountView { name: a.name.clone(), email: a.email.clone(), ts: a.ts, verified: a.verified, greet: a.greet.clone() })
|
||||
.map(|a| AccountView { name: a.name.clone(), email: a.email.clone(), ts: a.ts, verified: a.verified, greet: a.greet.clone(), last_seen: a.last_seen })
|
||||
.collect()
|
||||
}
|
||||
fn accounts_by_email(&self, pattern: &str) -> Vec<String> {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue