ERR_NOPRIVILEGES_MSG,
Client_ID(Origin));
break;
+ case 'B': /* Bot */
+ if (Client_HasMode(Client, 'r'))
+ ok = IRC_WriteStrClient(Origin,
+ ERR_RESTRICTED_MSG,
+ Client_ID(Origin));
+ else
+ x[0] = 'B';
+ break;
case 'c': /* Receive connect notices
* (only settable by IRC operators!) */
if (!set || Client_Type(Client) == CLIENT_SERVER
const char *Pattern)
{
const char *mask;
- struct list_head *list;
+ struct list_head *list = NULL;
+ 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,
const char *Pattern)
{
const char *mask;
- struct list_head *list;
+ struct list_head *list = NULL;
assert(Client != NULL);
assert(Channel != NULL);