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 void send_buffer(struct Client* to, struct MsgBuf* buf, int prio);
27 extern void flush_connections(struct Client* cptr);
28 extern void send_queued(struct Client *to);
30 /* Send a raw message to one client; USE ONLY IF YOU MUST SEND SOMETHING
33 extern void sendrawto_one(struct Client *to, const char *pattern, ...);
35 /* Send a command to one client */
36 extern void sendcmdto_one(struct Client *from, const char *cmd,
37 const char *tok, struct Client *to,
38 const char *pattern, ...);
40 /* Same as above, except it puts the message on the priority queue */
41 extern void sendcmdto_prio_one(struct Client *from, const char *cmd,
42 const char *tok, struct Client *to,
43 const char *pattern, ...);
45 /* Send command to all servers except one */
46 extern void sendcmdto_serv_butone(struct Client *from, const char *cmd,
47 const char *tok, struct Client *one,
48 const char *pattern, ...);
50 /* Send command to all channels user is on */
51 extern void sendcmdto_common_channels(struct Client *from, const char *cmd,
52 const char *tok, const char *pattern,
56 /* Send command to all channel users on this server */
57 extern void sendcmdto_channel_butserv(struct Client *from, const char *cmd,
58 const char *tok, struct Channel *to,
59 const char *pattern, ...);
61 /* Send command to all interested channel users */
62 extern void sendcmdto_channel_butone(struct Client *from, const char *cmd,
63 const char *tok, struct Channel *to,
64 struct Client *one, unsigned int skip,
65 const char *pattern, ...);
67 #define SKIP_DEAF 0x01 /* skip users that are +d */
68 #define SKIP_BURST 0x02 /* skip users that are bursting */
69 #define SKIP_NONOPS 0x04 /* skip users that aren't chanops */
71 /* Send command to all users having a particular flag set */
72 extern void sendwallto_group_butone(struct Client *from, int type,
73 struct Client *one, const char *pattern,
76 #define WALL_DESYNCH 1
77 #define WALL_WALLOPS 2
78 #define WALL_WALLUSERS 3
80 /* Send command to all matching clients */
81 extern void sendcmdto_match_butone(struct Client *from, const char *cmd,
82 const char *tok, const char *to,
83 struct Client *one, unsigned int who,
84 const char *pattern, ...);
86 /* Send server notice to opers but one--one can be NULL */
87 extern void sendto_opmask_butone(struct Client *one, unsigned int mask,
88 const char *pattern, ...);
90 /* Same as above, but rate limited */
91 extern void sendto_opmask_butone_ratelimited(struct Client *one,
92 unsigned int mask, time_t *rate,
93 const char *pattern, ...);
95 /* Same as above, but with variable argument list */
96 extern void vsendto_opmask_butone(struct Client *one, unsigned int mask,
97 const char *pattern, va_list vl);
99 #endif /* INCLUDED_send_h */