1 /*
2  *  ircd-ratbox: A slightly useful ircd.
3  *  send.h: A header for the message sending functions.
4  *
5  *  Copyright (C) 1990 Jarkko Oikarinen and University of Oulu, Co Center
6  *  Copyright (C) 1996-2002 Hybrid Development Team
7  *  Copyright (C) 2002-2012 ircd-ratbox development team
8  *
9  *  This program is free software; you can redistribute it and/or modify
10  *  it under the terms of the GNU General Public License as published by
11  *  the Free Software Foundation; either version 2 of the License, or
12  *  (at your option) any later version.
13  *
14  *  This program is distributed in the hope that it will be useful,
15  *  but WITHOUT ANY WARRANTY; without even the implied warranty of
16  *  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
17  *  GNU General Public License for more details.
18  *
19  *  You should have received a copy of the GNU General Public License
20  *  along with this program; if not, write to the Free Software
21  *  Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301
22  *  USA
23  *
24  *  $Id: send.h 28697 2015-10-02 20:57:42Z androsyn $
25  */
26 
27 #ifndef INCLUDED_send_h
28 #define INCLUDED_send_h
29 
30 struct Client;
31 struct Channel;
32 struct rb_dlink_list;
33 struct monitor;
34 
35 void send_pop_queue(struct Client *);
36 void
37 sendto_one(struct Client *target_p, const char *, ...)
38 AFP(2, 3);
39      void sendto_one_buffer(struct Client *target_p, const char *buffer);
40      void sendto_one_notice(struct Client *target_p, const char *, ...) AFP(2, 3);
41      void sendto_one_prefix(struct Client *target_p, struct Client *source_p,
42 			    const char *command, const char *, ...) AFP(4, 5);
43      void sendto_one_numeric(struct Client *target_p, int numeric, const char *, ...) AFP(3, 4);
44 
45      void sendto_server(struct Client *one, struct Channel *chptr,
46 			unsigned long caps, unsigned long nocaps,
47 			const char *format, ...) AFP(5, 6);
48 
49      void sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
50 			       struct Channel *chptr, const char *, ...) AFP(5, 6);
51 
52      void sendto_channel_local(int type, struct Channel *, const char *, ...) AFP(3, 4);
53      void sendto_common_channels_local(struct Client *, const char *, ...) AFP(2, 3);
54 
55 
56      void sendto_match_butone(struct Client *, struct Client *,
57 			      const char *, int, const char *, ...) AFP(5, 6);
58      void sendto_match_servs(struct Client *source_p, const char *mask,
59 			     int capab, int, const char *, ...) AFP(5, 6);
60 
61      void sendto_monitor(struct monitor *monptr, const char *, ...) AFP(2, 3);
62 
63      void sendto_anywhere(struct Client *, struct Client *, const char *,
64 			  const char *, ...) AFP(4, 5);
65 
66      void sendto_realops_flags(int, int, const char *, ...) AFP(3, 4);
67      void sendto_wallops_flags(int, struct Client *, const char *, ...) AFP(3, 4);
68 
69      void kill_client(struct Client *client_p, struct Client *diedie,
70 		      const char *pattern, ...) AFP(3, 4);
71      void kill_client_serv_butone(struct Client *one, struct Client *source_p,
72 				  const char *pattern, ...) AFP(3, 4);
73 
74 #define L_ALL 	0
75 #define L_OPER 	1
76 #define L_ADMIN	2
77 
78 #define NOCAPS          0	/* no caps */
79 
80 /* used when sending to #mask or $mask */
81 #define MATCH_SERVER  1
82 #define MATCH_HOST    2
83 
84 #endif /* INCLUDED_send_h */
85