1
0
mirror of https://github.com/unrealircd/unrealircd.git synced 2026-07-05 11:53:13 +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:
Bram Matthys
2006-01-24 00:41:08 +00:00
parent ea02baae7b
commit 1d70016ef8
2 changed files with 8 additions and 0 deletions
+6
View File
@@ -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);