Send forward channel when bans are added/removed because of TS/bursts.
If a netburst adds bans or a channel TS change removes bans, +b/-b modes are generated. Make sure these contain the forward channel, if any. This appears also broken in ircd-seven.
This commit is contained in:
parent
7f0fc87d3c
commit
23f6b63af6
2 changed files with 10 additions and 3 deletions
|
@ -1268,7 +1268,8 @@ remove_ban_list(struct Channel *chptr, struct Client *source_p,
|
|||
banptr = ptr->data;
|
||||
|
||||
/* trailing space, and the mode letter itself */
|
||||
plen = strlen(banptr->banstr) + 2;
|
||||
plen = strlen(banptr->banstr) +
|
||||
(banptr->forward ? strlen(banptr->forward) + 1 : 0) + 2;
|
||||
|
||||
if(count >= MAXMODEPARAMS || (cur_len + plen) > BUFSIZE - 4)
|
||||
{
|
||||
|
@ -1286,6 +1287,9 @@ remove_ban_list(struct Channel *chptr, struct Client *source_p,
|
|||
|
||||
*mbuf++ = c;
|
||||
cur_len += plen;
|
||||
if (banptr->forward)
|
||||
pbuf += rb_sprintf(pbuf, "%s$%s ", banptr->banstr, banptr->forward);
|
||||
else
|
||||
pbuf += rb_sprintf(pbuf, "%s ", banptr->banstr);
|
||||
count++;
|
||||
|
||||
|
|
|
@ -346,7 +346,7 @@ ms_bmask(struct Client *client_p, struct Client *source_p, int parc, const char
|
|||
{
|
||||
*forward++ = '\0';
|
||||
if(*forward == '\0')
|
||||
forward = NULL;
|
||||
tlen--, forward = NULL;
|
||||
}
|
||||
|
||||
if(add_id(fakesource_p, chptr, s, forward, banlist, mode_type))
|
||||
|
@ -366,6 +366,9 @@ ms_bmask(struct Client *client_p, struct Client *source_p, int parc, const char
|
|||
plen = modecount = 0;
|
||||
}
|
||||
|
||||
if (forward != NULL)
|
||||
forward[-1] = '$';
|
||||
|
||||
*mbuf++ = parv[3][0];
|
||||
arglen = rb_sprintf(pbuf, "%s ", s);
|
||||
pbuf += arglen;
|
||||
|
|
Loading…
Reference in a new issue