X-Git-Url: https://arthur.barton.de/cgi-bin/gitweb.cgi?p=ngircd-alex.git;a=blobdiff_plain;f=src%2Fngircd%2Firc-mode.c;h=9cad32493d84b2ddb55520913b64e6628e0cfc7e;hp=ad83ae98a7aa93d0ee0931e5e6396de91cfa8d57;hb=c2b39fdedef18b7cb634509bb3f1dd67bf47c214;hpb=f2fa1045e24f81e5c844dd50d6e299cb1ad9acb2 diff --git a/src/ngircd/irc-mode.c b/src/ngircd/irc-mode.c index ad83ae98..9cad3249 100644 --- a/src/ngircd/irc-mode.c +++ b/src/ngircd/irc-mode.c @@ -229,6 +229,14 @@ Client_Mode( CLIENT *Client, REQUEST *Req, CLIENT *Origin, CLIENT *Target ) 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 @@ -856,7 +864,8 @@ Add_To_List(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, 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); @@ -864,6 +873,9 @@ Add_To_List(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, 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': @@ -880,7 +892,7 @@ Add_To_List(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) + current_count >= MAX_HNDL_CHANNEL_LISTS) return IRC_WriteStrClient(Client, ERR_LISTFULL_MSG, Client_ID(Client), Channel_Name(Channel), mask, @@ -919,7 +931,7 @@ Del_From_List(char what, CLIENT *Prefix, CLIENT *Client, CHANNEL *Channel, const char *Pattern) { const char *mask; - struct list_head *list; + struct list_head *list = NULL; assert(Client != NULL); assert(Channel != NULL);