3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 20:09:41 +01:00

Merge pull request #2165 from slingamn/banlimit

fix #2081
This commit is contained in:
Shivaram Lingamneni 2024-06-04 05:53:47 +02:00 committed by GitHub
commit 6326982767
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 3 additions and 3 deletions

View File

@ -885,7 +885,7 @@ limits:
whowas-entries: 100 whowas-entries: 100
# maximum length of channel lists (beI modes) # maximum length of channel lists (beI modes)
chan-list-modes: 60 chan-list-modes: 150
# maximum number of messages to accept during registration (prevents # maximum number of messages to accept during registration (prevents
# DoS / resource exhaustion attacks): # DoS / resource exhaustion attacks):

View File

@ -215,7 +215,7 @@ func (channel *Channel) ApplyChannelModeChanges(client *Client, isSamode bool, c
mask := change.Arg mask := change.Arg
switch change.Op { switch change.Op {
case modes.Add: 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] { if !listFullWarned[change.Mode] {
rb.Add(nil, client.server.name, ERR_BANLISTFULL, details.nick, chname, change.Mode.String(), client.t("Channel list is full")) rb.Add(nil, client.server.name, ERR_BANLISTFULL, details.nick, chname, change.Mode.String(), client.t("Channel list is full"))
listFullWarned[change.Mode] = true listFullWarned[change.Mode] = true

View File

@ -856,7 +856,7 @@ limits:
whowas-entries: 100 whowas-entries: 100
# maximum length of channel lists (beI modes) # maximum length of channel lists (beI modes)
chan-list-modes: 60 chan-list-modes: 150
# maximum number of messages to accept during registration (prevents # maximum number of messages to accept during registration (prevents
# DoS / resource exhaustion attacks): # DoS / resource exhaustion attacks):