OperServ: NEWS — logon and oper announcements

NEWS ADD <LOGON|OPER> <text> / DEL <LOGON|OPER> <number> / LIST. Logon news
is shown to every user as they connect; oper news is shown to an operator
when they log in. Admin-only to manage. Each item carries a stable id
assigned at add time and embedded in the log, so deletion is order-
independent under replay (DEL by number resolves to that id).

Enabling groundwork: the replicated network-wide lists (bans, now news)
are consolidated into one NetData struct threaded through apply() as a
single parameter — this replaces the akill parameter rather than adding
one, so the fold stays within its argument budget as the lists grow.
This commit is contained in:
Jean Chevronnet 2026-07-14 01:26:12 +00:00
parent 51d4ebf789
commit e45eab2cd6
No known key found for this signature in database
6 changed files with 281 additions and 26 deletions

View file

@ -170,7 +170,9 @@ fn to_wire(entry: &LogEntry) -> Option<ReplicationEvent> {
| Event::AccountExpiryWarned { .. }
| Event::ChannelExpiryWarned { .. }
| Event::AccountOperNoteSet { .. }
| Event::ChannelOperNoteSet { .. } => return None,
| Event::ChannelOperNoteSet { .. }
| Event::NewsAdded { .. }
| Event::NewsDeleted { .. } => return None,
};
Some(ReplicationEvent { origin: entry.origin().to_string(), seq: entry.seq(), lamport: entry.lamport(), kind: Some(kind) })
}