]> jfr.im git - solanum.git/blame - include/send.h
Keep propagated bans in a dictionary, not a list
[solanum.git] / include / send.h
CommitLineData
212380e3
AC
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
212380e3
AC
23 */
24
25#ifndef INCLUDED_send_h
26#define INCLUDED_send_h
27
fe037171 28#include "rb_lib.h"
212380e3 29#include "ircd_defs.h"
212380e3
AC
30
31struct Client;
32struct Channel;
8aba962d 33struct monitor;
212380e3
AC
34
35/* The nasty global also used in s_serv.c for server bursts */
36extern unsigned long current_serial;
37
ad13bb75
JT
38extern struct Client *remote_rehash_oper_p;
39
a235e410
VY
40extern void send_pop_queue(struct Client *);
41
3b2ebd04
JT
42extern void send_queued(struct Client *to);
43
212380e3
AC
44extern void sendto_one(struct Client *target_p, const char *, ...) AFP(2, 3);
45extern void sendto_one_notice(struct Client *target_p,const char *, ...) AFP(2, 3);
46extern void sendto_one_prefix(struct Client *target_p, struct Client *source_p,
47 const char *command, const char *, ...) AFP(4, 5);
48extern void sendto_one_numeric(struct Client *target_p,
49 int numeric, const char *, ...) AFP(3, 4);
50
51extern void sendto_server(struct Client *one, struct Channel *chptr,
52 unsigned long caps, unsigned long nocaps,
53 const char *format, ...) AFP(5, 6);
54
55extern void sendto_channel_flags(struct Client *one, int type, struct Client *source_p,
56 struct Channel *chptr, const char *, ...) AFP(5, 6);
c4d2d014
JT
57extern void sendto_channel_opmod(struct Client *one, struct Client *source_p,
58 struct Channel *chptr, const char *command,
59 const char *text);
212380e3 60
4b1cce65 61extern void sendto_channel_local(struct Client *, int type, struct Channel *, const char *, ...) AFP(4, 5);
d3fd88a4 62extern void sendto_channel_local_priv(struct Client *, int type, const char *priv, struct Channel *, const char *, ...) AFP(5, 6);
212380e3 63extern void sendto_channel_local_butone(struct Client *, int type, struct Channel *, const char *, ...) AFP(4, 5);
99cca61e 64
4b1cce65 65extern void sendto_channel_local_with_capability(struct Client *, int type, int caps, int negcaps, struct Channel *, const char *, ...) AFP(6, 7);
a695b0e4
SB
66extern void sendto_channel_local_with_capability_butone(struct Client *, int type, int caps, int negcaps, struct Channel *,
67 const char *, ...) AFP(6, 7);
99cca61e 68
583f064f
AC
69extern void sendto_common_channels_local(struct Client *, int cap, int negcap, const char *, ...) AFP(4, 5);
70extern void sendto_common_channels_local_butone(struct Client *, int cap, int negcap, const char *, ...) AFP(4, 5);
212380e3
AC
71
72
73extern void sendto_match_butone(struct Client *, struct Client *,
74 const char *, int, const char *, ...) AFP(5, 6);
55abcbb2 75extern void sendto_match_servs(struct Client *source_p, const char *mask,
212380e3
AC
76 int capab, int, const char *, ...) AFP(5, 6);
77
4b1cce65 78extern void sendto_monitor(struct Client *, struct monitor *monptr, const char *, ...) AFP(3, 4);
8aba962d 79
212380e3
AC
80extern void sendto_anywhere(struct Client *, struct Client *, const char *,
81 const char *, ...) AFP(4, 5);
e2d5ffd5
SA
82extern void sendto_anywhere_echo(struct Client *, struct Client *, const char *,
83 const char *, ...) AFP(4, 5);
984d80c9 84extern void sendto_local_clients_with_capability(int cap, const char *pattern, ...) AFP(2, 3);
212380e3 85
212380e3
AC
86extern void sendto_realops_snomask(int, int, const char *, ...) AFP(3, 4);
87extern void sendto_realops_snomask_from(int, int, struct Client *, const char *, ...) AFP(4, 5);
88
89extern void sendto_wallops_flags(int, struct Client *, const char *, ...) AFP(3, 4);
90
91extern void kill_client(struct Client *client_p, struct Client *diedie,
92 const char *pattern, ...) AFP(3, 4);
55abcbb2 93extern void kill_client_serv_butone(struct Client *one, struct Client *source_p,
212380e3
AC
94 const char *pattern, ...) AFP(3, 4);
95
8efff56f
DF
96enum multiline_item_result {
97 MULTILINE_FAILURE,
98 MULTILINE_SUCCESS,
99 MULTILINE_WRAPPED,
100};
101
102extern bool send_multiline_init(struct Client *target_p, const char *separator, const char *format, ...) AFP(3, 4);
103extern bool send_multiline_remote_pad(struct Client *target_p, struct Client *client_p);
104extern enum multiline_item_result send_multiline_item(struct Client *target_p, const char *format, ...) AFP(2, 3);
105extern bool send_multiline_fini(struct Client *target_p, const char *format, ...) AFP(2, 3);
106extern void send_multiline_reset(void);
107
212380e3
AC
108#define L_ALL 0
109#define L_OPER 1
110#define L_ADMIN 2
111#define L_NETWIDE 256 /* OR with L_ALL or L_OPER */
112
113#define NOCAPS 0 /* no caps */
114
115/* used when sending to #mask or $mask */
116#define MATCH_SERVER 1
117#define MATCH_HOST 2
118
119#endif /* INCLUDED_send_h */