Implement invitation announcements (RPL_ISSUEDINVITE).
[ircu2.10.12-pk.git] / include / send.h
index 4e5ef56898f51fe880d04b4b5cb21611a29b12b8..11f7201a6f5be4cf0b3d1de2bd9b03679c5cd504 100644 (file)
@@ -9,6 +9,10 @@
 #include <stdarg.h>         /* va_list */
 #define INCLUDED_stdarg_h 
 #endif
+#ifndef INCLUDED_time_h
+#include <time.h>      /* time_t */
+#define INCLUDED_time_h
+#endif
 
 struct Channel;
 struct Client;
@@ -19,8 +23,8 @@ struct MsgBuf;
  * Prototypes
  */
 extern void send_buffer(struct Client* to, struct MsgBuf* buf, int prio);
-extern void flush_sendq_except(void);
 
+extern void kill_highest_sendq(int servers_too);
 extern void flush_connections(struct Client* cptr);
 extern void send_queued(struct Client *to);
 
@@ -34,11 +38,10 @@ extern void sendcmdto_one(struct Client *from, const char *cmd,
                          const char *tok, struct Client *to,
                          const char *pattern, ...);
 
-
-/* Same as above, except it takes a va_list */
-extern void vsendcmdto_one(struct Client *from, const char *cmd,
-                          const char *tok, struct Client *to,
-                          const char *pattern, va_list vl);
+/* Same as above, except it puts the message on the priority queue */
+extern void sendcmdto_prio_one(struct Client *from, const char *cmd,
+                              const char *tok, struct Client *to,
+                              const char *pattern, ...);
 
 /* Send command to all servers except one */
 extern void sendcmdto_serv_butone(struct Client *from, const char *cmd,
@@ -46,15 +49,29 @@ extern void sendcmdto_serv_butone(struct Client *from, const char *cmd,
                                  const char *pattern, ...);
 
 /* Send command to all channels user is on */
-extern void sendcmdto_common_channels(struct Client *from, const char *cmd,
-                                     const char *tok, const char *pattern,
-                                     ...);
-
+extern void sendcmdto_common_channels_butone(struct Client *from,
+                                            const char *cmd,
+                                            const char *tok,
+                                            struct Client *one,
+                                            const char *pattern, ...);
 
 /* Send command to all channel users on this server */
-extern void sendcmdto_channel_butserv(struct Client *from, const char *cmd,
-                                     const char *tok, struct Channel *to,
-                                     const char *pattern, ...);
+extern void sendcmdto_channel_butserv_butone(struct Client *from,
+                                            const char *cmd,
+                                            const char *tok,
+                                            struct Channel *to,
+                                            struct Client *one,
+                                             unsigned int skip,
+                                            const char *pattern, ...);
+
+/* Send command to all servers interested in a channel */
+extern void sendcmdto_channel_servers_butone(struct Client *from,
+                                             const char *cmd,
+                                             const char *tok,
+                                             struct Channel *to,
+                                             struct Client *one,
+                                             unsigned int skip,
+                                             const char *pattern, ...);
 
 /* Send command to all interested channel users */
 extern void sendcmdto_channel_butone(struct Client *from, const char *cmd,
@@ -65,11 +82,17 @@ extern void sendcmdto_channel_butone(struct Client *from, const char *cmd,
 #define SKIP_DEAF      0x01    /* skip users that are +d */
 #define SKIP_BURST     0x02    /* skip users that are bursting */
 #define SKIP_NONOPS    0x04    /* skip users that aren't chanops */
+#define SKIP_NONVOICES  0x08    /* skip users that aren't voiced (includes
+                                   chanops) */
 
 /* Send command to all users having a particular flag set */
-extern void sendcmdto_flag_butone(struct Client *from, const char *cmd,
-                                 const char *tok, struct Client *one,
-                                 unsigned int flag, const char *pattern, ...);
+extern void sendwallto_group_butone(struct Client *from, int type, 
+                                   struct Client *one, const char *pattern,
+                                   ...);
+
+#define WALL_DESYNCH   1
+#define WALL_WALLOPS   2
+#define WALL_WALLUSERS 3
 
 /* Send command to all matching clients */
 extern void sendcmdto_match_butone(struct Client *from, const char *cmd,
@@ -81,6 +104,11 @@ extern void sendcmdto_match_butone(struct Client *from, const char *cmd,
 extern void sendto_opmask_butone(struct Client *one, unsigned int mask,
                                 const char *pattern, ...);
 
+/* Same as above, but rate limited */
+extern void sendto_opmask_butone_ratelimited(struct Client *one,
+                                            unsigned int mask, time_t *rate,
+                                            const char *pattern, ...);
+
 /* Same as above, but with variable argument list */
 extern void vsendto_opmask_butone(struct Client *one, unsigned int mask,
                                  const char *pattern, va_list vl);