6 #ifndef INCLUDED_send_h
7 #define INCLUDED_send_h
8 #ifndef INCLUDED_stdarg_h
9 #include <stdarg.h> /* va_list */
10 #define INCLUDED_stdarg_h
12 #ifndef INCLUDED_time_h
13 #include <time.h> /* time_t */
14 #define INCLUDED_time_h
25 extern struct SLink *opsarray[];
27 extern void send_buffer(struct Client* to, struct MsgBuf* buf, int prio);
29 extern void kill_highest_sendq(int servers_too);
30 extern void flush_connections(struct Client* cptr);
31 extern void send_queued(struct Client *to);
33 /* Send a raw message to one client; USE ONLY IF YOU MUST SEND SOMETHING
36 extern void sendrawto_one(struct Client *to, const char *pattern, ...);
38 /* Send a command to one client */
39 extern void sendcmdto_one(struct Client *from, const char *cmd,
40 const char *tok, struct Client *to,
41 const char *pattern, ...);
43 /* Same as above, except it puts the message on the priority queue */
44 extern void sendcmdto_prio_one(struct Client *from, const char *cmd,
45 const char *tok, struct Client *to,
46 const char *pattern, ...);
48 /* Send command to all servers except one */
49 extern void sendcmdto_serv_butone(struct Client *from, const char *cmd,
50 const char *tok, struct Client *one,
51 const char *pattern, ...);
53 /* Send command to all channels user is on */
54 extern void sendcmdto_common_channels_butone(struct Client *from,
58 const char *pattern, ...);
60 /* Send command to all channel users on this server */
61 extern void sendcmdto_channel_butserv_butone(struct Client *from,
67 const char *pattern, ...);
69 /* Send command to all servers interested in a channel */
70 extern void sendcmdto_channel_servers_butone(struct Client *from,
76 const char *pattern, ...);
78 /* Send command to all interested channel users */
79 extern void sendcmdto_channel_butone(struct Client *from, const char *cmd,
80 const char *tok, struct Channel *to,
81 struct Client *one, unsigned int skip,
82 const char *pattern, ...);
84 #define SKIP_DEAF 0x01 /**< skip users that are +d */
85 #define SKIP_BURST 0x02 /**< skip users that are bursting */
86 #define SKIP_NONOPS 0x04 /**< skip users that aren't chanops */
87 #define SKIP_NONVOICES 0x08 /**< skip users that aren't voiced (includes
90 /* Send command to all users having a particular flag set */
91 extern void sendwallto_group_butone(struct Client *from, int type,
92 struct Client *one, const char *pattern,
95 #define WALL_DESYNCH 1 /**< send as a DESYNCH message */
96 #define WALL_WALLOPS 2 /**< send to all +w opers */
97 #define WALL_WALLUSERS 3 /**< send to all +w users */
99 /* Send command to all matching clients */
100 extern void sendcmdto_match_butone(struct Client *from, const char *cmd,
101 const char *tok, const char *to,
102 struct Client *one, unsigned int who,
103 const char *pattern, ...);
105 /* Send server notice to opers but one--one can be NULL */
106 extern void sendto_opmask_butone(struct Client *one, unsigned int mask,
107 const char *pattern, ...);
109 /* Same as above, but rate limited */
110 extern void sendto_opmask_butone_ratelimited(struct Client *one,
111 unsigned int mask, time_t *rate,
112 const char *pattern, ...);
114 /* Same as above, but with variable argument list */
115 extern void vsendto_opmask_butone(struct Client *one, unsigned int mask,
116 const char *pattern, va_list vl);
118 #endif /* INCLUDED_send_h */