Cap FORBID and vhost LIST output so a huge list can't overflow the operator's receive queue
All checks were successful
CI / check (push) Successful in 5m25s

This commit is contained in:
Jean Chevronnet 2026-07-20 20:44:15 +00:00
parent 8b45d386c6
commit aa270e061e
No known key found for this signature in database
9 changed files with 24 additions and 8 deletions

View file

@ -280,6 +280,10 @@ pub fn chanmode_takes_param(m: char, adding: bool) -> bool {
// mask or value. Fallback before the ircd's live prefix set is learned.
pub const STATUS_MODES: &str = "qaohv";
/// Max entries a service prints for a LIST before truncating, so a huge list
/// can't exceed the client's receive queue and disconnect the operator.
pub const LIST_CAP: usize = 200;
/// How a channel mode consumes its parameter, from the ircd's `CAPAB CHANMODES`.
#[derive(Debug, Clone, Copy, PartialEq, Eq)]
pub enum ChanModeKind {