| 1 |
/* |
| 2 |
* ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd). |
| 3 |
* send.h: A header for the message sending functions. |
| 4 |
* |
| 5 |
* Copyright (C) 2002 by the past and present ircd coders, and others. |
| 6 |
* |
| 7 |
* This program is free software; you can redistribute it and/or modify |
| 8 |
* it under the terms of the GNU General Public License as published by |
| 9 |
* the Free Software Foundation; either version 2 of the License, or |
| 10 |
* (at your option) any later version. |
| 11 |
* |
| 12 |
* This program is distributed in the hope that it will be useful, |
| 13 |
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 14 |
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 15 |
* GNU General Public License for more details. |
| 16 |
* |
| 17 |
* You should have received a copy of the GNU General Public License |
| 18 |
* along with this program; if not, write to the Free Software |
| 19 |
* Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 20 |
* USA |
| 21 |
* |
| 22 |
* $Id: send.h,v 7.80 2005/09/24 09:27:17 michael Exp $ |
| 23 |
*/ |
| 24 |
|
| 25 |
#ifndef INCLUDED_send_h |
| 26 |
#define INCLUDED_send_h |
| 27 |
|
| 28 |
#include "fdlist.h" |
| 29 |
|
| 30 |
/* For those unfamiliar with GNU format attributes, a is the 1 based |
| 31 |
* argument number of the format string, and b is the 1 based argument |
| 32 |
* number of the variadic ... */ |
| 33 |
#if 0 /* __GNUC__ */ |
| 34 |
#define AFP(a,b) __attribute__((format (printf, a, b))) |
| 35 |
#else |
| 36 |
#define AFP(a,b) |
| 37 |
#endif |
| 38 |
|
| 39 |
/* |
| 40 |
* struct decls |
| 41 |
*/ |
| 42 |
struct Callback; |
| 43 |
struct Channel; |
| 44 |
struct Client; |
| 45 |
struct dlink_list; |
| 46 |
|
| 47 |
extern struct Callback *iosend_cb; |
| 48 |
extern struct Callback *iosendctrl_cb; |
| 49 |
|
| 50 |
/* send.c prototypes */ |
| 51 |
|
| 52 |
extern void sendq_unblocked(fde_t *, struct Client *); |
| 53 |
extern void send_queued_write(struct Client *); |
| 54 |
extern void send_queued_slink_write(struct Client *); |
| 55 |
extern void send_queued_all(void); |
| 56 |
extern void sendto_one(struct Client *, const char *, ...) AFP(2, 3); |
| 57 |
extern void sendto_channel_butone(struct Client *, struct Client *, |
| 58 |
struct Channel *, const char *, |
| 59 |
const char *, ...) AFP(5, 6); |
| 60 |
extern void sendto_common_channels_local(struct Client *, int, |
| 61 |
const char *, ...) AFP(3, 4); |
| 62 |
extern void sendto_channel_local(int, int, struct Channel *, |
| 63 |
const char *, ...) AFP(4, 5); |
| 64 |
extern void sendto_channel_local_butone(struct Client *, int, struct Channel *, |
| 65 |
const char *, ...) AFP(4, 5); |
| 66 |
extern void sendto_channel_remote(struct Client *, struct Client *, int, |
| 67 |
int, int, struct Channel *, |
| 68 |
const char *, ...) AFP(7, 8); |
| 69 |
extern void sendto_server(struct Client *, struct Client *, |
| 70 |
struct Channel *, unsigned long, |
| 71 |
unsigned long, unsigned long, |
| 72 |
const char *, ...) AFP(7, 8); |
| 73 |
extern void sendto_match_butone(struct Client *, struct Client *, |
| 74 |
char *, int, const char *, ...) AFP(5, 6); |
| 75 |
extern void sendto_match_servs(struct Client *, const char *, int, |
| 76 |
const char *, ...) AFP(4, 5); |
| 77 |
extern void sendto_realops_flags(unsigned int, int, |
| 78 |
const char *, ...) AFP(3, 4); |
| 79 |
extern void sendto_wallops_flags(unsigned int, struct Client *, |
| 80 |
const char *, ...) AFP(3, 4); |
| 81 |
extern void ts_warn(const char *, ...) AFP(1, 2); |
| 82 |
|
| 83 |
extern void sendto_anywhere(struct Client *, struct Client *, |
| 84 |
const char *, ...) AFP(3, 4); |
| 85 |
extern void kill_client(struct Client *, struct Client *, |
| 86 |
const char *, ... ) AFP(3, 4); |
| 87 |
extern void kill_client_ll_serv_butone(struct Client *, struct Client *, |
| 88 |
const char *, ...) AFP(3, 4); |
| 89 |
|
| 90 |
|
| 91 |
#define ALL_MEMBERS 0 |
| 92 |
#define NON_CHANOPS 1 |
| 93 |
#define ONLY_CHANOPS_VOICED 2 |
| 94 |
#define ONLY_CHANOPS 3 |
| 95 |
#define ONLY_SERVERS 4 /* for channel_mode.c */ |
| 96 |
|
| 97 |
#define L_ALL 0 |
| 98 |
#define L_OPER 1 |
| 99 |
#define L_ADMIN 2 |
| 100 |
|
| 101 |
#define NOCAPS 0 /* no caps */ |
| 102 |
#define NOFLAGS 0 /* no flags */ |
| 103 |
|
| 104 |
#define LL_ICLIENT 0x00000001 /* introduce unknown clients */ |
| 105 |
#define LL_ICHAN 0x00000002 /* introduce unknown chans */ |
| 106 |
|
| 107 |
/* used when sending to #mask or $mask */ |
| 108 |
#define MATCH_SERVER 1 |
| 109 |
#define MATCH_HOST 2 |
| 110 |
|
| 111 |
#endif /* INCLUDED_send_h */ |