- sendto_one(source_p, "%s", buf);
- cur_len = mlen + extra_space;
- t = buf + mlen;
+ if((cur_len + strlen(chptr->chname) + 3) > (BUFSIZE - 5))
+ {
+ sendto_one(source_p, "%s", buf);
+ cur_len = mlen + extra_space;
+ t = buf + mlen;
+ }
+
+ tlen = ircsprintf(t, "%s%s%s ",
+ visible ? "" : "!",
+ find_channel_status(msptr, 1),
+ chptr->chname);
+ t += tlen;
+ cur_len += tlen;