]> jfr.im git - irc/rqf/shadowircd.git/blob - include/send.h
[svn] Call add_to_hostname_hash() with correct (orig) hostname.
[irc/rqf/shadowircd.git] / include / send.h
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-2004 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307
22 * USA
23 *
24 * $Id: send.h 661 2006-02-03 04:20:31Z gxti $
25 */
26
27 #ifndef INCLUDED_send_h
28 #define INCLUDED_send_h
29
30 #include "ircd_defs.h"
31 #include "config.h" /* HAVE_STDARG_H */
32
33 struct Client;
34 struct Channel;
35 struct dlink_list;
36
37 /* The nasty global also used in s_serv.c for server bursts */
38 extern unsigned long current_serial;
39
40 extern void send_queued_write(int fd, void *data);
41 extern void send_queued_slink_write(int fd, void *data);
42
43 extern void sendto_one(struct Client *target_p, const char *, ...) AFP(2, 3);
44 extern void sendto_one_notice(struct Client *target_p,const char *, ...) AFP(2, 3);
45 extern void sendto_one_prefix(struct Client *target_p, struct Client *source_p,
46 const char *command, const char *, ...) AFP(4, 5);
47 extern void sendto_one_numeric(struct Client *target_p,
48 int numeric, const char *, ...) AFP(3, 4);
49
50 extern void sendto_server(struct Client *one, struct Channel *chptr,
51 unsigned long caps, unsigned long nocaps,
52 const char *format, ...) AFP(5, 6);
53
54 extern void sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
55 struct Channel *chptr, const char *, ...) AFP(5, 6);
56
57 extern void sendto_channel_local(int type, struct Channel *, const char *, ...) AFP(3, 4);
58 extern void sendto_channel_local_butone(struct Client *, int type, struct Channel *, const char *, ...) AFP(4, 5);
59 extern void sendto_common_channels_local(struct Client *, const char *, ...) AFP(2, 3);
60 extern void sendto_common_channels_local_butone(struct Client *, const char *, ...) AFP(2, 3);
61
62
63 extern void sendto_match_butone(struct Client *, struct Client *,
64 const char *, int, const char *, ...) AFP(5, 6);
65 extern void sendto_match_servs(struct Client *source_p, const char *mask,
66 int capab, int, const char *, ...) AFP(5, 6);
67
68 extern void sendto_anywhere(struct Client *, struct Client *, const char *,
69 const char *, ...) AFP(4, 5);
70
71 extern void sendto_realops_flags(int, int, const char *, ...) AFP(3, 4);
72 extern void sendto_realops_snomask(int, int, const char *, ...) AFP(3, 4);
73 extern void sendto_realops_snomask_from(int, int, struct Client *, const char *, ...) AFP(4, 5);
74
75 extern void sendto_wallops_flags(int, struct Client *, const char *, ...) AFP(3, 4);
76
77 extern void kill_client(struct Client *client_p, struct Client *diedie,
78 const char *pattern, ...) AFP(3, 4);
79 extern void kill_client_serv_butone(struct Client *one, struct Client *source_p,
80 const char *pattern, ...) AFP(3, 4);
81
82 #define L_ALL 0
83 #define L_OPER 1
84 #define L_ADMIN 2
85 #define L_NETWIDE 256 /* OR with L_ALL or L_OPER */
86
87 #define NOCAPS 0 /* no caps */
88
89 /* used when sending to #mask or $mask */
90 #define MATCH_SERVER 1
91 #define MATCH_HOST 2
92
93 #endif /* INCLUDED_send_h */