From 0517b5571dd9241cf5587b338663875d9a57aa51 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 3 Jun 2024 23:39:08 -0400 Subject: [PATCH] fix #2081 Increase default/recommended mask list size limit to 150; SAMODE overrides enforcement of the limit. --- default.yaml | 2 +- irc/modes.go | 2 +- traditional.yaml | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/default.yaml b/default.yaml index 3c8f72da..6be5c449 100644 --- a/default.yaml +++ b/default.yaml @@ -885,7 +885,7 @@ limits: whowas-entries: 100 # maximum length of channel lists (beI modes) - chan-list-modes: 60 + chan-list-modes: 150 # maximum number of messages to accept during registration (prevents # DoS / resource exhaustion attacks): diff --git a/irc/modes.go b/irc/modes.go index 97bccefa..e6079e24 100644 --- a/irc/modes.go +++ b/irc/modes.go @@ -215,7 +215,7 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c mask := change.Arg switch change.Op { case modes.Add: - if channel.lists[change.Mode].Length() >= client.server.Config().Limits.ChanListModes { + if !isSamode && channel.lists[change.Mode].Length() >= client.server.Config().Limits.ChanListModes { if !listFullWarned[change.Mode] { rb.Add(nil, client.server.name, ERR_BANLISTFULL, details.nick, chname, change.Mode.String(), client.t("Channel list is full")) listFullWarned[change.Mode] = true diff --git a/traditional.yaml b/traditional.yaml index d10b4e55..6691039e 100644 --- a/traditional.yaml +++ b/traditional.yaml @@ -856,7 +856,7 @@ limits: whowas-entries: 100 # maximum length of channel lists (beI modes) - chan-list-modes: 60 + chan-list-modes: 150 # maximum number of messages to accept during registration (prevents # DoS / resource exhaustion attacks):