]> arthur.barton.de Git - ngircd-alex.git/blobdiff - src/ngircd/irc-mode.c
Limit channel invite and ban lists to 50 entries
[ngircd-alex.git] / src / ngircd / irc-mode.c
index bb78bcb6656c8f1a5c2c3fe219d93d9d3db0e986..c85faa04d626f42569fe83c2a7e852bdeb768062 100644 (file)
@@ -863,6 +863,12 @@ Add_Ban_Invite(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel,
 
        if (Lists_CheckDupeMask(list, mask))
                return CONNECTED;
+       if (Client_Type(Client) == CLIENT_USER &&
+           Lists_Count(list) >= MAX_HNDL_CHANNEL_LISTS)
+               return IRC_WriteStrClient(Client, ERR_LISTFULL_MSG,
+                                         Client_ID(Client),
+                                         Channel_Name(Channel), mask,
+                                         MAX_HNDL_CHANNEL_LISTS);
 
        if (what == 'I') {
                if (!Channel_AddInvite(Channel, mask, false))