+
+void sendmsgto_channel_butone(struct Client *one, struct Client *from,
+ struct Channel *chptr, const char *sender,
+ const char *cmd, const char *chname, const char *msg)
+{
+ /*
+ * Sends a PRIVMSG/NOTICE to all members on a channel but 'one', translating
+ * TOKENS to full messages when sent to local clients. --Gte (12/12/99)
+ */
+ struct Membership* member;
+ struct Client *acptr;
+ char userbuf[2048];
+ char servbuf[2048];
+ int i;
+ int flag=-1;
+
+ /*
+ * Precalculate the buffers we sent to the clients instead of doing an
+ * expensive sprintf() per member that we send to. We still have to
+ * use strcpy() which is evil.
+ */
+ if (IsServer(from)) {
+ sprintf(userbuf,":%s %s %s :%s",
+ from->name,
+ ((cmd[0] == 'P') ? MSG_PRIVATE : MSG_NOTICE),
+ chname, msg);
+ sprintf(servbuf,"%s " TOK_PRIVATE " %s :%s",
+ NumServ(from), chname, msg);
+ } else {
+ sprintf(userbuf,":%s!%s@%s %s %s :%s",
+ from->name, from->username, from->user->host,
+ ((cmd[0] == 'P') ? MSG_PRIVATE : MSG_NOTICE),
+ chname, msg);
+ sprintf(servbuf,"%s%s %s %s :%s",
+ NumNick(from),
+ ((cmd[0] == 'P') ? TOK_PRIVATE : TOK_NOTICE),
+ chname, msg);
+ }
+
+ ++sentalong_marker;
+ for (member = chptr->members; member; member = member->next_member)
+ {
+ acptr = member->user;
+ /* ...was the one I should skip */
+ if (acptr->from == one || IsZombie(member) || IsDeaf(acptr))
+ continue;
+ if (MyConnect(acptr)) { /* (It is always a client) */
+ if (flag!=0)
+ strcpy(sendbuf,userbuf);
+ flag=0;
+ sendbufto_one(acptr);
+ }
+ else if (-1 < (i = acptr->from->fd) && sentalong[i] != sentalong_marker)
+ {
+ sentalong[i] = sentalong_marker;
+ if (!IsBurstOrBurstAck(acptr->from)) {
+ if (flag != 1)
+ strcpy(sendbuf,servbuf);
+ flag = 1;
+ sendbufto_one(acptr);
+ }
+ } /* of if MyConnect() */
+ } /* of for(members) */
+}
+
+void sendto_lchanops_butone(struct Client *one, struct Client *from, struct Channel *chptr,
+ const char* pattern, ...)