BotServ: BOTSTATS per-channel activity

BOTSTATS <#channel> reports the lines the bot has seen this session and
the top talkers. Tracked live in the network view (bounded per-nick map),
recorded for bot-assigned channels only, and also fed to the shared stats
registry as botserv.messages.
This commit is contained in:
Jean Chevronnet 2026-07-13 19:20:52 +00:00
parent bddf13459d
commit 766ef6ca47
No known key found for this signature in database
5 changed files with 75 additions and 0 deletions

View file

@ -642,6 +642,8 @@ pub trait NetView {
fn channel_members(&self, channel: &str) -> Vec<String>;
fn channel_key(&self, channel: &str) -> Option<&str>;
fn last_seen(&self, nick: &str) -> Option<SeenView>;
// BOTSTATS: (lines seen this session, top talkers by count desc).
fn channel_activity(&self, channel: &str) -> Option<(u64, Vec<(String, u64)>)>;
}
// A pseudo-client (NickServ, ChanServ, ...). Introduced at burst, receives the