Author: Isomer <isomer@coders.net>
[ircu2.10.12-pk.git] / include / send.h
index 088da8c47817749ff455ce4add83c8f0c276643c..a37f628aedd3a60adade993a11471f1b1cd232c3 100644 (file)
 struct Channel;
 struct Client;
 struct DBuf;
+struct MsgBuf;
 
+#define WALL_DESYNCH   1
+#define WALL_WALLOPS   2
+#define WALL_WALLUSERS 3
 
 /*
  * Prototypes
  */
-extern void send_buffer(struct Client* to, char* buf);
-extern void flush_sendq_except(const struct DBuf* one);
-
-extern void sendto_one(struct Client *to, const char* fmt, ...);
-extern void sendbufto_one(struct Client *to);
-extern void sendto_ops(const char* fmt, ...);
-extern void sendto_channel_butserv(struct Channel *chptr, struct Client *from,
-                                   const char* fmt, ...);
-extern void sendto_serv_butone(struct Client *one, const char* fmt, ...);
-extern void sendto_lowprot_butone(struct Client *cptr, int p,
-                                  const char* fmt, ...);
-extern void sendto_highprot_butone(struct Client *cptr, int p,
-                                   const char* fmt, ...);
-extern void sendto_prefix_one(struct Client *to, struct Client *from,
-                              const char* fmt, ...);
+extern void send_buffer(struct Client* to, struct MsgBuf* buf, int prio);
+
 extern void flush_connections(struct Client* cptr);
 extern void send_queued(struct Client *to);
-extern void vsendto_one(struct Client *to, const char* fmt, va_list vl);
-extern void sendmsgto_channel_butone(struct Client *one, struct Client *from,
-                                  struct Channel *chptr, const char *sender,
-                                  const char *cmd, const char *chname, const char *msg);
-extern void sendto_lchanops_butone(struct Client *one, struct Client *from,
-                                   struct Channel *chptr, const char* fmt, ...);
-extern void sendto_chanopsserv_butone(struct Client *one, struct Client *from,
-                                   struct Channel *chptr, const char* fmt, ...);
-extern void sendto_common_channels(struct Client *user, const char* fmt, ...);
-extern void sendto_match_butone(struct Client *one, struct Client *from,
-                                const char *mask, int what, const char* fmt, ...);
-extern void vsendto_ops(const char *pattern, va_list vl);
-extern void sendto_ops_butone(struct Client *one, struct Client *from,
-                              const char* fmt, ...);
-extern void sendto_g_serv_butone(struct Client *one, const char* fmt, ...);
-extern void sendto_realops(const char* fmt, ...);
-extern void vsendto_op_mask(unsigned int mask,
-                            const char* fmt, va_list vl);
-extern void sendto_op_mask(unsigned int mask, const char* fmt, ...);
-extern void sendbufto_op_mask(unsigned int mask);
-extern void sendbufto_serv_butone(struct Client *one);
-
-extern char sendbuf[2048];
-
-#define IRC_BUFSIZE    512
 
 /* Send a raw message to one client; USE ONLY IF YOU MUST SEND SOMETHING
  * WITHOUT A PREFIX!
@@ -71,11 +37,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,
@@ -104,9 +69,8 @@ extern void sendcmdto_channel_butone(struct Client *from, const char *cmd,
 #define SKIP_NONOPS    0x04    /* skip users that aren't 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, ...);
 
 /* Send command to all matching clients */
 extern void sendcmdto_match_butone(struct Client *from, const char *cmd,