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
21 extern void send_buffer(struct Client* to, struct MsgBuf* buf, int prio);
22 extern void flush_sendq_except(void);
24 extern void flush_connections(struct Client* cptr);
25 extern void send_queued(struct Client *to);
27 /* Send a raw message to one client; USE ONLY IF YOU MUST SEND SOMETHING
30 extern void sendrawto_one(struct Client *to, const char *pattern, ...);
32 /* Send a command to one client */
33 extern void sendcmdto_one(struct Client *from, const char *cmd,
34 const char *tok, struct Client *to,
35 const char *pattern, ...);
38 /* Same as above, except it takes a va_list */
39 extern void vsendcmdto_one(struct Client *from, const char *cmd,
40 const char *tok, struct Client *to,
41 const char *pattern, va_list vl);
43 /* Send command to all servers except one */
44 extern void sendcmdto_serv_butone(struct Client *from, const char *cmd,
45 const char *tok, struct Client *one,
46 const char *pattern, ...);
48 /* Send command to all channels user is on */
49 extern void sendcmdto_common_channels(struct Client *from, const char *cmd,
50 const char *tok, const char *pattern,
54 /* Send command to all channel users on this server */
55 extern void sendcmdto_channel_butserv(struct Client *from, const char *cmd,
56 const char *tok, struct Channel *to,
57 const char *pattern, ...);
59 /* Send command to all interested channel users */
60 extern void sendcmdto_channel_butone(struct Client *from, const char *cmd,
61 const char *tok, struct Channel *to,
62 struct Client *one, unsigned int skip,
63 const char *pattern, ...);
65 #define SKIP_DEAF 0x01 /* skip users that are +d */
66 #define SKIP_BURST 0x02 /* skip users that are bursting */
67 #define SKIP_NONOPS 0x04 /* skip users that aren't chanops */
69 /* Send command to all users having a particular flag set */
70 extern void sendcmdto_flag_butone(struct Client *from, const char *cmd,
71 const char *tok, struct Client *one,
72 unsigned int flag, const char *pattern, ...);
74 /* Send command to all matching clients */
75 extern void sendcmdto_match_butone(struct Client *from, const char *cmd,
76 const char *tok, const char *to,
77 struct Client *one, unsigned int who,
78 const char *pattern, ...);
80 /* Send server notice to opers but one--one can be NULL */
81 extern void sendto_opmask_butone(struct Client *one, unsigned int mask,
82 const char *pattern, ...);
84 /* Same as above, but with variable argument list */
85 extern void vsendto_opmask_butone(struct Client *one, unsigned int mask,
86 const char *pattern, va_list vl);
88 #endif /* INCLUDED_send_h */