Add file-level doxygen comment blocks where they were missing.
[ircu2.10.12-pk.git] / include / send.h
1 /** @file send.h
2  * @brief Send messages to certain targets.
3  * @version $Id$
4  */
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 
10 #endif
11 #ifndef INCLUDED_time_h
12 #include <time.h>       /* time_t */
13 #define INCLUDED_time_h
14 #endif
15
16 struct Channel;
17 struct Client;
18 struct DBuf;
19 struct MsgBuf;
20
21 /*
22  * Prototypes
23  */
24 extern struct SLink *opsarray[];
25
26 extern void send_buffer(struct Client* to, struct MsgBuf* buf, int prio);
27
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);
31
32 /* Send a raw message to one client; USE ONLY IF YOU MUST SEND SOMETHING
33  * WITHOUT A PREFIX!
34  */
35 extern void sendrawto_one(struct Client *to, const char *pattern, ...);
36
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, ...);
41
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, ...);
46
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, ...);
51
52 /* Send command to all channels user is on */
53 extern void sendcmdto_common_channels_butone(struct Client *from,
54                                              const char *cmd,
55                                              const char *tok,
56                                              struct Client *one,
57                                              const char *pattern, ...);
58
59 /* Send command to all channel users on this server */
60 extern void sendcmdto_channel_butserv_butone(struct Client *from,
61                                              const char *cmd,
62                                              const char *tok,
63                                              struct Channel *to,
64                                              struct Client *one,
65                                              unsigned int skip,
66                                              const char *pattern, ...);
67
68 /* Send command to all servers interested in a channel */
69 extern void sendcmdto_channel_servers_butone(struct Client *from,
70                                              const char *cmd,
71                                              const char *tok,
72                                              struct Channel *to,
73                                              struct Client *one,
74                                              unsigned int skip,
75                                              const char *pattern, ...);
76
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, ...);
82
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
87                                    chanops) */
88
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,
92                                     ...);
93
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 */
97
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, ...);
103
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, ...);
107
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, ...);
112
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);
116
117 #endif /* INCLUDED_send_h */