]> jfr.im git - solanum.git/commitdiff
Include forward channels when bursting bans to servers.
authorJilles Tjoelker <redacted>
Thu, 16 Feb 2012 22:36:05 +0000 (23:36 +0100)
committerJilles Tjoelker <redacted>
Thu, 16 Feb 2012 22:36:05 +0000 (23:36 +0100)
Obtained from: ircd-seven (spb)

src/s_serv.c

index 784be844b5ec9e8d58956efb675fe8eec36c0276..e09f484da734912ae9ab516b1546fb072eb597f0 100644 (file)
@@ -500,7 +500,7 @@ burst_modes_TS6(struct Client *client_p, struct Channel *chptr,
        {
                banptr = ptr->data;
 
-               tlen = strlen(banptr->banstr) + 1;
+               tlen = strlen(banptr->banstr) + (banptr->forward ? strlen(banptr->forward) + 1 : 0) + 1;
 
                /* uh oh */
                if(cur_len + tlen > BUFSIZE - 3)
@@ -519,7 +519,10 @@ burst_modes_TS6(struct Client *client_p, struct Channel *chptr,
                        t = buf + mlen;
                }
 
-               rb_sprintf(t, "%s ", banptr->banstr);
+               if (banptr->forward)
+                       rb_sprintf(t, "%s$%s ", banptr->banstr, banptr->forward);
+               else
+                       rb_sprintf(t, "%s ", banptr->banstr);
                t += tlen;
                cur_len += tlen;
        }