OperServ: INFO staff notes on accounts and channels

INFO ADD <target> <note> / DEL <target> / <target> attaches a staff note
to an account or channel (a #name is a channel, else an account). The note
is shown in that service's INFO — but to operators only (Priv::Auspex),
never to the account's own owner. Admin-only to set.

Follows the typed-field-on-the-entity pattern: an oper_note field folded
through AccountOperNoteSet (Global) / ChannelOperNoteSet (Local) events,
read via dedicated Store getters so it stays out of the public views and
the directory feed.
This commit is contained in:
Jean Chevronnet 2026-07-14 01:15:00 +00:00
parent 8ccc9fa8ea
commit 51d4ebf789
No known key found for this signature in database
8 changed files with 216 additions and 9 deletions

View file

@ -31,4 +31,10 @@ pub fn handle(me: &str, from: &Sender, args: &[&str], ctx: &mut ServiceCtx, db:
ctx.notice(me, from.uid, format!(" Auto-join : {} channel(s) — see \x02AJOIN LIST\x02", ajoin.len()));
}
}
// A staff note is for operators' eyes only, never the account's owner.
if from.privs.has(Priv::Auspex) {
if let Some(note) = db.account_note(&acct.name) {
ctx.notice(me, from.uid, format!(" Staff note : {note}"));
}
}
}