2 * @brief Send messages to certain targets.
5 #ifndef INCLUDED_send_h
6 #define INCLUDED_send_h
7 #ifndef INCLUDED_stdarg_h
8 #include <stdarg.h> /* va_list */
9 #define INCLUDED_stdarg_h
11 #ifndef INCLUDED_time_h
12 #include <time.h> /* time_t */
13 #define INCLUDED_time_h
24 extern struct SLink *opsarray[];
26 extern void send_buffer(struct Client* to, struct MsgBuf* buf, int prio);
28 extern void kill_highest_sendq(int servers_too);
29 extern void flush_connections(struct Client* cptr);
30 extern void send_queued(struct Client *to);
32 /* Send a raw message to one client; USE ONLY IF YOU MUST SEND SOMETHING
35 extern void sendrawto_one(struct Client *to, const char *pattern, ...);
37 /* Send a command to one client */
38 extern void sendcmdto_one(struct Client *from, const char *cmd,
39 const char *tok, struct Client *to,
40 const char *pattern, ...);
42 /* Same as above, except it puts the message on the priority queue */
43 extern void sendcmdto_prio_one(struct Client *from, const char *cmd,
44 const char *tok, struct Client *to,
45 const char *pattern, ...);
47 /* Send command to all servers except one */
48 extern void sendcmdto_serv_butone(struct Client *from, const char *cmd,
49 const char *tok, struct Client *one,
50 const char *pattern, ...);
52 /* Send command to all channels user is on */
53 extern void sendcmdto_common_channels_butone(struct Client *from,
57 const char *pattern, ...);
59 /* Send command to all channel users on this server */
60 extern void sendcmdto_channel_butserv_butone(struct Client *from,
66 const char *pattern, ...);
68 /* Send command to all servers interested in a channel */
69 extern void sendcmdto_channel_servers_butone(struct Client *from,
75 const char *pattern, ...);
77 /* Send command to all interested channel users */
78 extern void sendcmdto_channel_butone(struct Client *from, const char *cmd,
79 const char *tok, struct Channel *to,
80 struct Client *one, unsigned int skip,
81 const char *pattern, ...);
83 #define SKIP_DEAF 0x01 /**< skip users that are +d */
84 #define SKIP_BURST 0x02 /**< skip users that are bursting */
85 #define SKIP_NONOPS 0x04 /**< skip users that aren't chanops */
86 #define SKIP_NONVOICES 0x08 /**< skip users that aren't voiced (includes
89 /* Send command to all users having a particular flag set */
90 extern void sendwallto_group_butone(struct Client *from, int type,
91 struct Client *one, const char *pattern,
94 #define WALL_DESYNCH 1 /**< send as a DESYNCH message */
95 #define WALL_WALLOPS 2 /**< send to all +w opers */
96 #define WALL_WALLUSERS 3 /**< send to all +w users */
98 /* Send command to all matching clients */
99 extern void sendcmdto_match_butone(struct Client *from, const char *cmd,
100 const char *tok, const char *to,
101 struct Client *one, unsigned int who,
102 const char *pattern, ...);
104 /* Send server notice to opers but one--one can be NULL */
105 extern void sendto_opmask_butone(struct Client *one, unsigned int mask,
106 const char *pattern, ...);
108 /* Same as above, but rate limited */
109 extern void sendto_opmask_butone_ratelimited(struct Client *one,
110 unsigned int mask, time_t *rate,
111 const char *pattern, ...);
113 /* Same as above, but with variable argument list */
114 extern void vsendto_opmask_butone(struct Client *one, unsigned int mask,
115 const char *pattern, va_list vl);
117 #endif /* INCLUDED_send_h */