mirror of
https://github.com/unrealircd/unrealircd.git
synced 2026-06-28 19:16:38 +02:00
- Made it so a set::maxbanlength and/or set::maxbans of 0 denies all bans properly, and
fixes the first-ban-can-be-as-long-as-you-want bug, both reported by Trocotronic (#2762).
This commit is contained in:
@@ -1000,3 +1000,5 @@
|
||||
some good testing ;).
|
||||
- Removed some old config.h stuff + clarified some text, reported by Jason (#2765, #2766).
|
||||
** internal 3.2.4-pre2 release **
|
||||
- Made it so a set::maxbanlength and/or set::maxbans of 0 denies all bans properly, and
|
||||
fixes the first-ban-can-be-as-long-as-you-want bug, both reported by Trocotronic (#2762).
|
||||
|
||||
@@ -369,6 +369,12 @@ int add_listmode(Ban **list, aClient *cptr, aChannel *chptr, char *banid)
|
||||
(void)collapse(banid);
|
||||
|
||||
len = strlen(banid);
|
||||
if (!*list && ((len > MAXBANLENGTH) || (MAXBANS < 1)))
|
||||
{
|
||||
sendto_one(cptr, err_str(ERR_BANLISTFULL),
|
||||
me.name, cptr->name, chptr->chname, banid);
|
||||
return -1;
|
||||
}
|
||||
for (ban = *list; ban; ban = ban->next)
|
||||
{
|
||||
len += strlen(ban->banstr);
|
||||
|
||||
Reference in New Issue
Block a user