| 1 |
/* |
| 2 |
* ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd) |
| 3 |
* |
| 4 |
* Copyright (c) 1997-2014 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., 59 Temple Place, Suite 330, Boston, MA 02111-1307 |
| 19 |
* USA |
| 20 |
*/ |
| 21 |
|
| 22 |
/*! \file send.h |
| 23 |
* \brief A header for the message sending functions. |
| 24 |
* \version $Id$ |
| 25 |
*/ |
| 26 |
|
| 27 |
#ifndef INCLUDED_send_h |
| 28 |
#define INCLUDED_send_h |
| 29 |
|
| 30 |
#include "fdlist.h" |
| 31 |
#include "numeric.h" |
| 32 |
|
| 33 |
enum { NOCAPS = 0 }; |
| 34 |
|
| 35 |
enum |
| 36 |
{ |
| 37 |
ALL_MEMBERS = 0, |
| 38 |
NON_CHANOPS = 1, |
| 39 |
ONLY_CHANOPS_VOICED = 2, |
| 40 |
ONLY_CHANOPS = 3, |
| 41 |
ONLY_SERVERS = 4 |
| 42 |
}; |
| 43 |
|
| 44 |
enum |
| 45 |
{ |
| 46 |
L_ALL = 0, |
| 47 |
L_OPER = 1, |
| 48 |
L_ADMIN = 2 |
| 49 |
}; |
| 50 |
|
| 51 |
enum |
| 52 |
{ |
| 53 |
SEND_NOTICE = 1, |
| 54 |
SEND_GLOBAL = 2, |
| 55 |
SEND_LOCOPS = 3 |
| 56 |
}; |
| 57 |
|
| 58 |
/* used when sending to #mask or $mask */ |
| 59 |
enum |
| 60 |
{ |
| 61 |
MATCH_SERVER = 1, |
| 62 |
MATCH_HOST = 2 |
| 63 |
}; |
| 64 |
|
| 65 |
/* |
| 66 |
* struct decls |
| 67 |
*/ |
| 68 |
struct Channel; |
| 69 |
struct Client; |
| 70 |
|
| 71 |
/* send.c prototypes */ |
| 72 |
extern void sendq_unblocked(fde_t *, struct Client *); |
| 73 |
extern void send_queued_write(struct Client *); |
| 74 |
extern void send_queued_all(void); |
| 75 |
extern void sendto_one(struct Client *, const char *, ...) AFP(2,3); |
| 76 |
extern void sendto_one_numeric(struct Client *, struct Client *, enum irc_numerics, ...); |
| 77 |
extern void sendto_one_notice(struct Client *, struct Client *, const char *, ...); |
| 78 |
extern void sendto_channel_butone(struct Client *, struct Client *, |
| 79 |
struct Channel *, unsigned int, |
| 80 |
const char *, ...) AFP(5,6); |
| 81 |
extern void sendto_common_channels_local(struct Client *, int, unsigned int, |
| 82 |
const char *, ...) AFP(4,5); |
| 83 |
extern void sendto_channel_local(unsigned int, int, struct Channel *, |
| 84 |
const char *, ...) AFP(4,5); |
| 85 |
extern void sendto_channel_local_butone(struct Client *, unsigned int, unsigned int, struct Channel *, |
| 86 |
const char *, ...) AFP(5,6); |
| 87 |
extern void sendto_server(struct Client *, |
| 88 |
const unsigned int, |
| 89 |
const unsigned int, const char *, ...) AFP(4,5); |
| 90 |
extern void sendto_match_butone(struct Client *, struct Client *, |
| 91 |
char *, int, const char *, ...) AFP(5,6); |
| 92 |
extern void sendto_match_servs(struct Client *, const char *, unsigned int, |
| 93 |
const char *, ...) AFP(4,5); |
| 94 |
extern void sendto_realops_flags(unsigned int, int, int, |
| 95 |
const char *, ...) AFP(4,5); |
| 96 |
extern void sendto_wallops_flags(unsigned int, struct Client *, |
| 97 |
const char *, ...) AFP(3,4); |
| 98 |
extern void sendto_realops_flags_ratelimited(const char *, ...) AFP(1,2); |
| 99 |
|
| 100 |
extern void sendto_anywhere(struct Client *, struct Client *, |
| 101 |
const char *, |
| 102 |
const char *, ...) AFP(4,5); |
| 103 |
extern void kill_client(struct Client *, struct Client *, |
| 104 |
const char *, ... ) AFP(3,4); |
| 105 |
extern void kill_client_serv_butone(struct Client *, struct Client *, |
| 106 |
const char *, ...) AFP(3,4); |
| 107 |
#endif /* INCLUDED_send_h */ |