rwho: only show active users by default
Some checks failed
Build and test / check (push) Failing after 1m8s
Build and test / build (push) Successful in 1m26s
Build and test / test (push) Successful in 2m58s
Build and test / docs (push) Successful in 3m21s

This commit is contained in:
2026-01-06 01:45:28 +09:00
parent 458dc3150c
commit fa789c43a6

View File

@@ -40,6 +40,10 @@ async fn main() -> anyhow::Result<()> {
.context("Failed to send rwho request")?
.map_err(|e| anyhow::anyhow!("Server returned an error for rwho request: {:?}", e))?;
if !args.all {
reply.retain(|(_, user)| user.idle_time.num_minutes() <= 11);
}
reply.sort_by(|(host, user), (host2, user2)| {
user.user_id
.cmp(&user2.user_id)