2 * IRC - Internet Relay Chat, common/send.c
3 * Copyright (C) 1990 Jarkko Oikarinen and
4 * University of Oulu, Computing Center
6 * This program is free software; you can redistribute it and/or modify
7 * it under the terms of the GNU General Public License as published by
8 * the Free Software Foundation; either version 1, or (at your option)
11 * This program is distributed in the hope that it will be useful,
12 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14 * GNU General Public License for more details.
16 * You should have received a copy of the GNU General Public License
17 * along with this program; if not, write to the Free Software
18 * Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
21 * @brief Send messages to certain targets.
22 * @version $Id: send.c 1835 2007-10-30 01:14:50Z entrope $
31 #include "ircd_features.h"
33 #include "ircd_snprintf.h"
34 #include "ircd_string.h"
48 /* #include <assert.h> -- Now using assert in ircd_log.h */
52 /** Last used marker value. */
53 static int sentalong_marker;
54 /** Array of users with the corresponding server notice mask bit set. */
55 struct SLink *opsarray[32]; /* don't use highest bit unless you change
56 atoi to strtoul in sendto_op_mask() */
57 /** Linked list of all connections with data queued to send. */
58 static struct Connection *send_queues;
59 char *GlobalForwards[256];
64 * An error has been detected. The link *must* be closed,
65 * but *cannot* call ExitClient (m_bye) from here.
66 * Instead, mark it with FLAG_DEADSOCKET. This should
67 * generate ExitClient from the main loop.
69 * If 'notice' is not NULL, it is assumed to be a format
70 * for a message to local opers. It can contain only one
71 * '%s', which will be replaced by the sockhost field of
74 * Also, the notice is skipped for "uninteresting" cases,
75 * like Persons and yet unknown connections...
77 /** Mark a client as dead, even if they are not the current message source.
78 * This is done by setting the DEADSOCKET flag on the user and letting the
79 * main loop perform the actual exit logic.
80 * @param[in,out] to Client being killed.
81 * @param[in] notice Message for local opers.
83 static void dead_link(struct Client *to, char *notice)
85 SetFlag(to, FLAG_DEADSOCKET);
87 * If because of BUFFERPOOL problem then clean dbuf's now so that
88 * notices don't hurt operators below.
90 DBufClear(&(cli_recvQ(to)));
91 MsgQClear(&(cli_sendQ(to)));
92 client_drop_sendq(cli_connect(to));
95 * Keep a copy of the last comment, for later use...
97 ircd_strncpy(cli_info(to), notice, REALLEN);
99 if (!IsUser(to) && !IsUnknown(to) && !HasFlag(to, FLAG_CLOSING))
100 sendto_opmask_butone(0, SNO_OLDSNO, "%s for %s", cli_info(to), cli_name(to));
101 Debug((DEBUG_ERROR, cli_info(to)));
104 /** Test whether we can send to a client.
105 * @param[in] to Client we want to send to.
106 * @return Non-zero if we can send to the client.
108 static int can_send(struct Client* to)
111 return (IsDead(to) || IsMe(to) || -1 == cli_fd(to)) ? 0 : 1;
114 /** Close the connection with the highest sendq.
115 * This should be called when we need to free buffer memory.
116 * @param[in] servers_too If non-zero, consider killing servers, too.
119 kill_highest_sendq(int servers_too)
122 unsigned int highest_sendq = 0;
123 struct Client *highest_client = 0;
125 for (i = HighestFd; i >= 0; i--)
127 if (!LocalClientArray[i] || (!servers_too && cli_serv(LocalClientArray[i])))
128 continue; /* skip servers */
130 /* If this sendq is higher than one we last saw, remember it */
131 if (MsgQLength(&(cli_sendQ(LocalClientArray[i]))) > highest_sendq)
133 highest_client = LocalClientArray[i];
134 highest_sendq = MsgQLength(&(cli_sendQ(highest_client)));
139 dead_link(highest_client, "Buffer allocation error");
145 * Used to empty all output buffers for all connections. Should only
146 * be called once per scan of connections. There should be a select in
147 * here perhaps but that means either forcing a timeout or doing a poll.
148 * When flushing, all we do is empty the obuffer array for each local
149 * client and try to send it. if we cant send it, it goes into the sendQ
152 /** Flush data queued for one or all connections.
153 * @param[in] cptr Client to flush (if NULL, do all).
155 void flush_connections(struct Client* cptr)
161 struct Connection* con;
162 for (con = send_queues; con; con = con_next(con)) {
163 assert(0 < MsgQLength(&(con_sendQ(con))));
164 send_queued(con_client(con));
172 * This function is called from the main select-loop (or whatever)
173 * when there is a chance that some output would be possible. This
174 * attempts to empty the send queue as far as possible...
176 /** Attempt to send data queued for a client.
177 * @param[in] to Client to send data to.
179 void send_queued(struct Client *to)
182 assert(0 != cli_local(to));
184 if (IsBlocked(to) || !can_send(to))
185 return; /* Don't bother */
187 while (MsgQLength(&(cli_sendQ(to))) > 0) {
190 if ((len = deliver_it(to, &(cli_sendQ(to))))) {
191 msgq_delete(&(cli_sendQ(to)), len);
192 cli_lastsq(to) = MsgQLength(&(cli_sendQ(to))) / 1024;
201 sprintf(tmp,"Write error: %s",(strerror(cli_error(to))) ? (strerror(cli_error(to))) : "Unknown error" );
208 /* Ok, sendq is now empty... */
209 client_drop_sendq(cli_connect(to));
213 /** Try to send a buffer to a client, queueing it if needed.
214 * @param[in,out] to Client to send message to.
215 * @param[in] buf Message to send.
216 * @param[in] prio If non-zero, send as high priority.
218 void send_buffer(struct Client* to, struct MsgBuf* buf, int prio)
228 * This socket has already been marked as dead
232 if (MsgQLength(&(cli_sendQ(to))) > get_sendq(to)) {
234 sendto_opmask_butone(0, SNO_OLDSNO, "Max SendQ limit exceeded for %C: "
235 "%zu > %zu", to, MsgQLength(&(cli_sendQ(to))),
237 dead_link(to, "Max sendQ exceeded");
241 Debug((DEBUG_SEND, "Sending [%p] to %s", buf, cli_name(to)));
243 msgq_add(&(cli_sendQ(to)), buf, prio);
244 client_add_sendq(cli_connect(to), &send_queues);
248 * Update statistics. The following is slightly incorrect
249 * because it counts messages even if queued, but bytes
250 * only really sent. Queued bytes get updated in SendQueued.
255 * This little bit is to stop the sendQ from growing too large when
256 * there is no need for it to. Thus we call send_queued() every time
257 * 2k has been added to the queue since the last non-fatal write.
258 * Also stops us from deliberately building a large sendQ and then
259 * trying to flood that link with data (possible during the net
260 * relinking done by servers with a large load).
262 if (MsgQLength(&(cli_sendQ(to))) / 1024 > cli_lastsq(to))
267 * Send a msg to all ppl on servers/hosts that match a specified mask
268 * (used for enhanced PRIVMSGs)
270 * addition -- Armin, 8jun90 (gruner@informatik.tu-muenchen.de)
273 /** Check whether a client matches a target mask.
274 * @param[in] from Client trying to send a message (ignored).
275 * @param[in] one Client being considered as a target.
276 * @param[in] mask Mask for matching against.
277 * @param[in] what Type of match (either MATCH_HOST or MATCH_SERVER).
278 * @return Non-zero if \a one matches, zero if not.
280 static int match_it(struct Client *from, struct Client *one, const char *mask, int what)
285 return (match(mask, cli_user(one)->host) == 0 ||
286 (HasHiddenHost(one) && match(mask, cli_user(one)->realhost) == 0));
289 return (match(mask, cli_name(cli_user(one)->server)) == 0);
293 /** Send an unprefixed line to a client.
294 * @param[in] to Client receiving message.
295 * @param[in] pattern Format string of message.
297 void sendrawto_one(struct Client *to, const char *pattern, ...)
302 va_start(vl, pattern);
303 mb = msgq_vmake(to, pattern, vl);
306 send_buffer(to, mb, 0);
311 /** Send a (prefixed) command to a single client.
312 * @param[in] from Client sending the command.
313 * @param[in] cmd Long name of command (used if \a to is a user).
314 * @param[in] tok Short name of command (used if \a to is a server).
315 * @param[in] to Destination of command.
316 * @param[in] pattern Format string for command arguments.
318 void sendcmdto_one(struct Client *from, const char *cmd, const char *tok,
319 struct Client *to, const char *pattern, ...)
326 vd.vd_format = pattern; /* set up the struct VarData for %v */
327 va_start(vd.vd_args, pattern);
329 mb = msgq_make(to, "%:#C %s %v", from, IsServer(to) || IsMe(to) ? tok : cmd,
334 send_buffer(to, mb, 0);
340 * Send a (prefixed) command to a single client in the priority queue.
341 * @param[in] from Client sending the command.
342 * @param[in] cmd Long name of command (used if \a to is a user).
343 * @param[in] tok Short name of command (used if \a to is a server).
344 * @param[in] to Destination of command.
345 * @param[in] pattern Format string for command arguments.
347 void sendcmdto_prio_one(struct Client *from, const char *cmd, const char *tok,
348 struct Client *to, const char *pattern, ...)
355 vd.vd_format = pattern; /* set up the struct VarData for %v */
356 va_start(vd.vd_args, pattern);
358 mb = msgq_make(to, "%:#C %s %v", from, IsServer(to) || IsMe(to) ? tok : cmd,
363 send_buffer(to, mb, 1);
369 * Send a (prefixed) command to all servers matching or not matching a
371 * @param[in] from Client sending the command.
372 * @param[in] cmd Long name of command (ignored).
373 * @param[in] tok Short name of command.
374 * @param[in] one Client direction to skip (or NULL).
375 * @param[in] require Only send to servers with this Flag bit set.
376 * @param[in] forbid Do not send to servers with this Flag bit set.
377 * @param[in] pattern Format string for command arguments.
379 void sendcmdto_flag_serv_butone(struct Client *from, const char *cmd,
380 const char *tok, struct Client *one,
381 int require, int forbid,
382 const char *pattern, ...)
388 vd.vd_format = pattern; /* set up the struct VarData for %v */
389 va_start(vd.vd_args, pattern);
392 mb = msgq_make(&me, "%C %s %v", from, tok, &vd);
395 /* send it to our downlinks */
396 for (lp = cli_serv(&me)->down; lp; lp = lp->next) {
397 if (one && lp->value.cptr == cli_from(one))
399 if ((require < FLAG_LAST_FLAG) && !HasFlag(lp->value.cptr, require))
401 if ((forbid < FLAG_LAST_FLAG) && HasFlag(lp->value.cptr, forbid))
403 send_buffer(lp->value.cptr, mb, 0);
410 * Send a (prefixed) command to all servers but one.
411 * @param[in] from Client sending the command.
412 * @param[in] cmd Long name of command (ignored).
413 * @param[in] tok Short name of command.
414 * @param[in] one Client direction to skip (or NULL).
415 * @param[in] pattern Format string for command arguments.
417 void sendcmdto_serv_butone(struct Client *from, const char *cmd,
418 const char *tok, struct Client *one,
419 const char *pattern, ...)
425 vd.vd_format = pattern; /* set up the struct VarData for %v */
426 va_start(vd.vd_args, pattern);
429 mb = msgq_make(&me, "%C %s %v", from, tok, &vd);
432 /* send it to our downlinks */
433 for (lp = cli_serv(&me)->down; lp; lp = lp->next) {
434 if (one && lp->value.cptr == cli_from(one))
436 send_buffer(lp->value.cptr, mb, 0);
442 /** Safely increment the sentalong marker.
443 * This increments the sentalong marker. Since new connections will
444 * have con_sentalong() == 0, and to avoid confusion when the counter
445 * wraps, we reset all sentalong markers to zero when the sentalong
447 * @param[in,out] one Client to mark with new sentalong marker (if any).
450 bump_sentalong(struct Client *one)
452 if (!++sentalong_marker)
455 for (ii = 0; ii < HighestFd; ++ii)
456 if (LocalClientArray[ii])
457 cli_sentalong(LocalClientArray[ii]) = 0;
461 cli_sentalong(one) = sentalong_marker;
464 /** Send a (prefixed) command to all channels that \a from is on.
465 * @param[in] from Client originating the command.
466 * @param[in] cmd Long name of command.
467 * @param[in] tok Short name of command.
468 * @param[in] one Client direction to skip (or NULL).
469 * @param[in] pattern Format string for command arguments.
471 void sendcmdto_common_channels_butone(struct Client *from, const char *cmd,
472 const char *tok, struct Client *one,
473 const char *pattern, ...)
477 struct Membership *chan;
478 struct Membership *member;
481 assert(0 != cli_from(from));
482 assert(0 != pattern);
483 assert(!IsServer(from) && !IsMe(from));
485 vd.vd_format = pattern; /* set up the struct VarData for %v */
487 va_start(vd.vd_args, pattern);
489 /* build the buffer */
490 mb = msgq_make(0, "%:#C %s %v", from, cmd, &vd);
493 bump_sentalong(from);
495 * loop through from's channels, and the members on their channels
497 for (chan = cli_user(from)->channel; chan; chan = chan->next_channel) {
498 if (IsZombie(chan) || IsDelayedJoin(chan))
500 for (member = chan->channel->members; member;
501 member = member->next_member)
502 if (MyConnect(member->user)
503 && -1 < cli_fd(cli_from(member->user))
504 && member->user != one
505 && cli_sentalong(member->user) != sentalong_marker) {
506 cli_sentalong(member->user) = sentalong_marker;
507 send_buffer(member->user, mb, 0);
511 if (MyConnect(from) && from != one)
512 send_buffer(from, mb, 0);
517 /** Send a (prefixed) command to all local users on a channel.
518 * @param[in] from Client originating the command.
519 * @param[in] cmd Long name of command.
520 * @param[in] tok Short name of command (ignored).
521 * @param[in] to Destination channel.
522 * @param[in] one Client direction to skip (or NULL).
523 * @param[in] skip Bitmask of SKIP_DEAF, SKIP_NONOPS, SKIP_NONVOICES indicating which clients to skip.
524 * @param[in] pattern Format string for command arguments.
526 void sendcmdto_channel_butserv_butone(struct Client *from, const char *cmd,
527 const char *tok, struct Channel *to,
528 struct Client *one, unsigned int skip,
529 const char *pattern, ...)
533 struct Membership *member;
535 vd.vd_format = pattern; /* set up the struct VarData for %v */
536 va_start(vd.vd_args, pattern);
538 /* build the buffer */
539 mb = msgq_make(0, "%:#C %s %v", from, cmd, &vd);
542 /* send the buffer to each local channel member */
543 for (member = to->members; member; member = member->next_member) {
544 if (!MyConnect(member->user)
545 || member->user == one
547 || (skip & SKIP_DEAF && IsDeaf(member->user))
548 || (skip & SKIP_NONOPS && !IsChanOp(member))
549 || (skip & SKIP_NONVOICES && !IsChanOp(member) && !HasVoice(member)))
551 send_buffer(member->user, mb, 0);
557 /** Send a (prefixed) command to all servers with users on \a to.
558 * Skip \a from and \a one plus those indicated in \a skip.
559 * @param[in] from Client originating the command.
560 * @param[in] cmd Long name of command (ignored).
561 * @param[in] tok Short name of command.
562 * @param[in] to Destination channel.
563 * @param[in] one Client direction to skip (or NULL).
564 * @param[in] skip Bitmask of SKIP_NONOPS and SKIP_NONVOICES indicating which clients to skip.
565 * @param[in] pattern Format string for command arguments.
567 void sendcmdto_channel_servers_butone(struct Client *from, const char *cmd,
568 const char *tok, struct Channel *to,
569 struct Client *one, unsigned int skip,
570 const char *pattern, ...)
573 struct MsgBuf *serv_mb;
574 struct Membership *member;
576 /* build the buffer */
577 vd.vd_format = pattern;
578 va_start(vd.vd_args, pattern);
579 serv_mb = msgq_make(&me, "%:#C %s %v", from, tok, &vd);
582 /* send the buffer to each server */
584 cli_sentalong(from) = sentalong_marker;
585 for (member = to->members; member; member = member->next_member) {
586 if (MyConnect(member->user)
588 || cli_fd(cli_from(member->user)) < 0
589 || cli_sentalong(member->user) == sentalong_marker
590 || (skip & SKIP_NONOPS && !IsChanOp(member))
591 || (skip & SKIP_NONVOICES && !IsChanOp(member) && !HasVoice(member)))
593 cli_sentalong(member->user) = sentalong_marker;
594 send_buffer(member->user, serv_mb, 0);
600 /** Send a (prefixed) command to all users on this channel, except for
601 * \a one and those matching \a skip.
602 * @warning \a pattern must not contain %v.
603 * @param[in] from Client originating the command.
604 * @param[in] cmd Long name of command.
605 * @param[in] tok Short name of command.
606 * @param[in] to Destination channel.
607 * @param[in] one Client direction to skip (or NULL).
608 * @param[in] skip Bitmask of SKIP_NONOPS, SKIP_NONVOICES, SKIP_DEAF, SKIP_BURST.
609 * @param[in] pattern Format string for command arguments.
611 void sendcmdto_channel_butone(struct Client *from, const char *cmd,
612 const char *tok, struct Channel *to,
613 struct Client *one, unsigned int skip,
614 unsigned char prefix, const char *pattern, ...)
616 struct Membership *member;
618 struct MsgBuf *user_mb;
619 struct MsgBuf *serv_mb;
620 struct Client *service;
622 vd.vd_format = pattern;
624 /* Build buffer to send to users */
625 va_start(vd.vd_args, pattern);
626 user_mb = msgq_make(0, skip & (SKIP_NONOPS | SKIP_NONVOICES) ? "%:#C %s @%v" : "%:#C %s %v",
627 from, skip & (SKIP_NONOPS | SKIP_NONVOICES) ? MSG_NOTICE : cmd, &vd);
630 /* Build buffer to send to servers */
631 va_start(vd.vd_args, pattern);
632 serv_mb = msgq_make(&me, "%C %s %v", from, tok, &vd);
635 /* send buffer along! */
637 for (member = to->members; member; member = member->next_member) {
638 /* skip one, zombies, and deaf users... */
639 if (IsZombie(member) ||
640 (skip & SKIP_DEAF && IsDeaf(member->user)) ||
641 (skip & SKIP_NONOPS && !IsChanOp(member)) ||
642 (skip & SKIP_NONVOICES && !IsChanOp(member) && !HasVoice(member)) ||
643 (skip & SKIP_BURST && IsBurstOrBurstAck(cli_from(member->user))) ||
644 cli_fd(cli_from(member->user)) < 0 ||
645 cli_sentalong(member->user) == sentalong_marker)
647 cli_sentalong(member->user) = sentalong_marker;
649 if (MyConnect(member->user)) /* pick right buffer to send */
650 send_buffer(member->user, user_mb, 0);
652 send_buffer(member->user, serv_mb, 0);
655 /* Consult service forwarding table. */
656 if(GlobalForwards[prefix]
657 && (service = FindServer(GlobalForwards[prefix]))
658 && cli_sentalong(service) != sentalong_marker) {
659 cli_sentalong(service) = sentalong_marker;
660 send_buffer(service, serv_mb, 0);
663 if(GlobalForwards['*']
664 && (service = FindServer(GlobalForwards['*']))
665 && cli_sentalong(service) != sentalong_marker) {
666 cli_sentalong(service) = sentalong_marker;
667 send_buffer(service, serv_mb, 0);
674 /** Send a (prefixed) WALL of type \a type to all users except \a one.
675 * @warning \a pattern must not contain %v.
676 * @param[in] from Source of the command.
677 * @param[in] type One of WALL_DESYNCH, WALL_WALLOPS or WALL_WALLUSERS.
678 * @param[in] one Client direction to skip (or NULL).
679 * @param[in] pattern Format string for command arguments.
681 void sendwallto_group_butone(struct Client *from, int type, struct Client *one,
682 const char *pattern, ...)
693 vd.vd_format = pattern;
695 /* Build buffer to send to users */
696 va_start(vd.vd_args, pattern);
713 mb = msgq_make(0, "%:#C " MSG_WALLOPS " :%s%v", from, prefix,&vd);
716 /* send buffer along! */
717 his_wallops = feature_bool(FEAT_HIS_WALLOPS);
718 for (i = 0; i <= HighestFd; i++)
720 if (!(cptr = LocalClientArray[i]) ||
721 (cli_fd(cli_from(cptr)) < 0) ||
722 (type == WALL_DESYNCH && !SendDebug(cptr)) ||
723 (type == WALL_WALLOPS &&
724 (!SendWallops(cptr) || (his_wallops && !IsAnOper(cptr)))) ||
725 (type == WALL_WALLUSERS && !SendWallops(cptr)))
726 continue; /* skip it */
727 send_buffer(cptr, mb, 1);
732 /* Build buffer to send to servers */
733 va_start(vd.vd_args, pattern);
734 mb = msgq_make(&me, "%C %s :%v", from, tok, &vd);
737 /* send buffer along! */
738 for (lp = cli_serv(&me)->down; lp; lp = lp->next) {
739 if (one && lp->value.cptr == cli_from(one))
741 send_buffer(lp->value.cptr, mb, 1);
747 /** Send a (prefixed) command to all users matching \a to as \a who.
748 * @warning \a pattern must not contain %v.
749 * @param[in] from Source of the command.
750 * @param[in] cmd Long name of command.
751 * @param[in] tok Short name of command.
752 * @param[in] to Destination host/server mask.
753 * @param[in] one Client direction to skip (or NULL).
754 * @param[in] who Type of match for \a to (either MATCH_HOST or MATCH_SERVER).
755 * @param[in] pattern Format string for command arguments.
757 void sendcmdto_match_butone(struct Client *from, const char *cmd,
758 const char *tok, const char *to,
759 struct Client *one, unsigned int who,
760 const char *pattern, ...)
764 struct MsgBuf *user_mb;
765 struct MsgBuf *serv_mb;
767 vd.vd_format = pattern;
769 /* Build buffer to send to users */
770 va_start(vd.vd_args, pattern);
771 user_mb = msgq_make(0, "%:#C %s %v", from, cmd, &vd);
774 /* Build buffer to send to servers */
775 va_start(vd.vd_args, pattern);
776 serv_mb = msgq_make(&me, "%C %s %v", from, tok, &vd);
779 /* send buffer along */
781 for (cptr = GlobalClientList; cptr; cptr = cli_next(cptr)) {
782 if (!IsRegistered(cptr) || IsServer(cptr) || cli_fd(cli_from(cptr)) < 0 ||
783 cli_sentalong(cptr) == sentalong_marker ||
784 !match_it(from, cptr, to, who))
785 continue; /* skip it */
786 cli_sentalong(cptr) = sentalong_marker;
788 if (MyConnect(cptr)) /* send right buffer */
789 send_buffer(cptr, user_mb, 0);
791 send_buffer(cptr, serv_mb, 0);
798 /** Send a server notice to all users subscribing to the indicated \a
799 * mask except for \a one.
800 * @param[in] one Client direction to skip (or NULL).
801 * @param[in] mask One of the SNO_* constants.
802 * @param[in] pattern Format string for server notice.
804 void sendto_opmask_butone(struct Client *one, unsigned int mask,
805 const char *pattern, ...)
809 va_start(vl, pattern);
810 vsendto_opmask_butone(one, mask, pattern, vl);
814 /** Send a server notice to all users subscribing to the indicated \a
815 * mask except for \a one, rate-limited to once per 30 seconds.
816 * @param[in] one Client direction to skip (or NULL).
817 * @param[in] mask One of the SNO_* constants.
818 * @param[in,out] rate Pointer to the last time the message was sent.
819 * @param[in] pattern Format string for server notice.
821 void sendto_opmask_butone_ratelimited(struct Client *one, unsigned int mask,
822 time_t *rate, const char *pattern, ...)
826 if ((CurrentTime - *rate) < 30)
831 va_start(vl, pattern);
832 vsendto_opmask_butone(one, mask, pattern, vl);
837 /** Send a server notice to all users subscribing to the indicated \a
838 * mask except for \a one.
839 * @param[in] one Client direction to skip (or NULL).
840 * @param[in] mask One of the SNO_* constants.
841 * @param[in] pattern Format string for server notice.
842 * @param[in] vl Argument list for format string.
844 void vsendto_opmask_butone(struct Client *one, unsigned int mask,
845 const char *pattern, va_list vl)
849 int i = 0; /* so that 1 points to opsarray[0] */
850 struct SLink *opslist;
855 if (!(opslist = opsarray[i]))
859 * build string; I don't want to bother with client nicknames, so I hope
862 vd.vd_format = pattern;
863 va_copy(vd.vd_args, vl);
864 mb = msgq_make(0, ":%s " MSG_NOTICE " * :*** Notice -- %v", cli_name(&me),
867 for (; opslist; opslist = opslist->next)
868 if (opslist->value.cptr != one)
869 send_buffer(opslist->value.cptr, mb, 0);