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, char* buf);
22 extern void flush_sendq_except(const struct DBuf* one);
24 extern void sendto_one(struct Client *to, const char* fmt, ...);
25 extern void sendbufto_one(struct Client *to);
26 extern void sendto_ops(const char* fmt, ...);
27 extern void sendto_channel_butserv(struct Channel *chptr, struct Client *from,
28 const char* fmt, ...);
29 extern void sendto_serv_butone(struct Client *one, const char* fmt, ...);
30 extern void sendto_match_servs(struct Channel* chptr, struct Client* from,
31 const char* fmt, ...);
32 extern void sendto_lowprot_butone(struct Client *cptr, int p,
33 const char* fmt, ...);
34 extern void sendto_highprot_butone(struct Client *cptr, int p,
35 const char* fmt, ...);
36 extern void sendto_prefix_one(struct Client *to, struct Client *from,
37 const char* fmt, ...);
38 extern void flush_connections(struct Client* cptr);
39 extern void send_queued(struct Client *to);
40 extern void vsendto_one(struct Client *to, const char* fmt, va_list vl);
41 extern void sendto_channel_butone(struct Client *one, struct Client *from,
42 struct Channel *chptr, const char* fmt, ...);
43 extern void sendmsgto_channel_butone(struct Client *one, struct Client *from,
44 struct Channel *chptr, const char *sender,
45 const char *cmd, const char *chname, const char *msg);
46 extern void sendto_lchanops_butone(struct Client *one, struct Client *from,
47 struct Channel *chptr, const char* fmt, ...);
48 extern void sendto_chanopsserv_butone(struct Client *one, struct Client *from,
49 struct Channel *chptr, const char* fmt, ...);
50 extern void sendto_common_channels(struct Client *user, const char* fmt, ...);
51 extern void sendto_match_butone(struct Client *one, struct Client *from,
52 const char *mask, int what, const char* fmt, ...);
53 extern void sendto_lops_butone(struct Client *one, const char* fmt, ...);
54 extern void vsendto_ops(const char *pattern, va_list vl);
55 extern void sendto_ops_butone(struct Client *one, struct Client *from,
56 const char* fmt, ...);
57 extern void sendto_g_serv_butone(struct Client *one, const char* fmt, ...);
58 extern void sendto_realops(const char* fmt, ...);
59 extern void vsendto_op_mask(unsigned int mask,
60 const char* fmt, va_list vl);
61 extern void sendto_op_mask(unsigned int mask, const char* fmt, ...);
62 extern void sendbufto_op_mask(unsigned int mask);
63 extern void sendbufto_serv_butone(struct Client *one);
65 extern char sendbuf[2048];
67 #define IRC_BUFSIZE 512
69 /* Send a raw message to one client; USE ONLY IF YOU MUST SEND SOMETHING
72 extern void sendrawto_one(struct Client *to, const char *pattern, ...);
74 /* Send a command to one client */
75 extern void sendcmdto_one(struct Client *from, const char *cmd,
76 const char *tok, struct Client *to,
77 const char *pattern, ...);
80 /* Same as above, except it takes a va_list */
81 extern void vsendcmdto_one(struct Client *from, const char *cmd,
82 const char *tok, struct Client *to,
83 const char *pattern, va_list vl);
85 /* Send command to all servers except one */
86 extern void sendcmdto_serv_butone(struct Client *from, const char *cmd,
87 const char *tok, struct Client *one,
88 const char *pattern, ...);
90 /* Send command to all channels user is on */
91 extern void sendcmdto_common_channels(struct Client *from, const char *cmd,
92 const char *tok, const char *pattern,
96 /* Send command to all channel users on this server */
97 extern void sendcmdto_channel_butserv(struct Client *from, const char *cmd,
98 const char *tok, struct Channel *to,
99 const char *pattern, ...);
101 /* Send command to all interested channel users */
102 extern void sendcmdto_channel_butone(struct Client *from, const char *cmd,
103 const char *tok, struct Channel *to,
104 struct Client *one, unsigned int skip,
105 const char *pattern, ...);
107 #define SKIP_DEAF 0x01 /* skip users that are +d */
108 #define SKIP_BURST 0x02 /* skip users that are bursting */
109 #define SKIP_NONOPS 0x04 /* skip users that aren't chanops */
111 /* Send command to all users having a particular flag set */
112 extern void sendcmdto_flag_butone(struct Client *from, const char *cmd,
113 const char *tok, struct Client *one,
114 unsigned int flag, const char *pattern, ...);
116 /* Send command to all matching clients */
117 extern void sendcmdto_match_butone(struct Client *from, const char *cmd,
118 const char *tok, const char *to,
119 struct Client *one, unsigned int who,
120 const char *pattern, ...);
122 /* Send server notice to opers but one--one can be NULL */
123 extern void sendto_opmask_butone(struct Client *one, unsigned int mask,
124 const char *pattern, ...);
126 /* Same as above, but with variable argument list */
127 extern void vsendto_opmask_butone(struct Client *one, unsigned int mask,
128 const char *pattern, va_list vl);
130 #endif /* INCLUDED_send_h */