commit - 8c46067b34b71dac23b388c0acc28fdf8db111fa
commit + b6f19ea8feceeb2246995222f03790e6f00b0dfd
blob - ad83ae98a7aa93d0ee0931e5e6396de91cfa8d57
blob + 80b2949038b7cce6084537f771d21dd398f095a7
--- src/ngircd/irc-mode.c
+++ src/ngircd/irc-mode.c
{
const char *mask;
struct list_head *list;
+ long int current_count;
assert(Client != NULL);
assert(Channel != NULL);
assert(what == 'I' || what == 'b' || what == 'e');
mask = Lists_MakeMask(Pattern);
+ current_count = Lists_Count(Channel_GetListInvites(Channel))
+ + Lists_Count(Channel_GetListExcepts(Channel))
+ + Lists_Count(Channel_GetListBans(Channel));
switch(what) {
case 'I':
if (Lists_CheckDupeMask(list, mask))
return CONNECTED;
if (Client_Type(Client) == CLIENT_USER &&
- Lists_Count(list) >= MAX_HNDL_CHANNEL_LISTS)
+ current_count >= MAX_HNDL_CHANNEL_LISTS)
return IRC_WriteStrClient(Client, ERR_LISTFULL_MSG,
Client_ID(Client),
Channel_Name(Channel), mask,