1 /*
2  *  ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3  *
4  *  Copyright (c) 1997-2021 ircd-hybrid development team
5  *
6  *  This program is free software; you can redistribute it and/or modify
7  *  it under the terms of the GNU General Public License as published by
8  *  the Free Software Foundation; either version 2 of the License, or
9  *  (at your option) any later version.
10  *
11  *  This program is distributed in the hope that it will be useful,
12  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14  *  GNU General Public License for more details.
15  *
16  *  You should have received a copy of the GNU General Public License
17  *  along with this program; if not, write to the Free Software
18  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19  *  USA
20  */
21 
22 /*! \file send.h
23  * \brief A header for the message sending functions.
24  * \version $Id: send.h 10005 2021-06-28 12:10:15Z michael $
25  */
26 
27 #ifndef INCLUDED_send_h
28 #define INCLUDED_send_h
29 
30 #include "fdlist.h"
31 #include "numeric.h"
32 
33 enum
34 {
35   L_ALL,
36   L_OPER,
37   L_ADMIN
38 };
39 
40 enum
41 {
42   SEND_NOTICE,
43   SEND_GLOBAL,
44   SEND_LOCOPS
45 };
46 
47 /* Used when sending to $#mask or $$mask */
48 enum
49 {
50   MATCH_SERVER,
51   MATCH_HOST
52 };
53 
54 /*
55  * struct decls
56  */
57 struct Channel;
58 struct Client;
59 
60 /* send.c prototypes */
61 extern void sendq_unblocked(fde_t *, void *);
62 extern void send_queued_write(struct Client *);
63 extern void sendto_one(struct Client *, const char *, ...) AFP(2,3);
64 extern void sendto_one_numeric(struct Client *, const struct Client *, enum irc_numerics, ...);
65 extern void sendto_one_notice(struct Client *, const struct Client *, const char *, ...) AFP(3,4);
66 extern void sendto_channel_butone(struct Client *, const struct Client *, struct Channel *, unsigned int, const char *, ...) AFP(5,6);
67 extern void sendto_common_channels_local(struct Client *, bool, unsigned int, unsigned int, const char *, ...) AFP(5,6);
68 extern void sendto_channel_local(const struct Client *, struct Channel *, unsigned int, unsigned int, unsigned int, const char *, ...) AFP(6,7);
69 extern void sendto_server(const struct Client *, const unsigned int, const unsigned int, const char *, ...) AFP(4,5);
70 extern void sendto_match_butone(const struct Client *, const struct Client *, const char *, int, const char *, ...) AFP(5,6);
71 extern void sendto_match_servs(const struct Client *, const char *, unsigned int, const char *, ...) AFP(4,5);
72 extern void sendto_realops_flags(unsigned int, int, int, const char *, ...) AFP(4,5);
73 extern void sendto_wallops_flags(unsigned int, const struct Client *, const char *, ...) AFP(3,4);
74 extern void sendto_realops_flags_ratelimited(uintmax_t *, const char *, ...) AFP(2,3);
75 extern void sendto_anywhere(struct Client *, const struct Client *, const char *, const char *, ...) AFP(4,5);
76 #endif  /* INCLUDED_send_h */
77