ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/include/server_capab.h
Revision: 8169
Committed: Sun Apr 9 16:13:28 2017 UTC (6 years, 11 months ago) by michael
Content type: text/x-chdr
File size: 2530 byte(s)
Log Message:
- Add server_capab files

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 *
4 * Copyright (c) 1997-2017 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., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
19 * USA
20 */
21
22 /*! \file server_capab.h
23 * \brief A header for the server CAPAB functions.
24 * \version $Id: server.h 8002 2017-03-14 14:20:50Z michael $
25 */
26
27 #ifndef INCLUDED_server_capab_h
28 #define INCLUDED_server_capab_h
29
30 /** Server capability flags */
31 enum
32 {
33 CAPAB_QS = 0x00000001U, /**< Can handle quit storm removal */
34 CAPAB_EOB = 0x00000002U, /**< Can do EOB message */
35 CAPAB_KLN = 0x00000004U, /**< Can do KLINE message */
36 CAPAB_KNOCK = 0x00000008U, /**< Supports KNOCK */
37 CAPAB_UNKLN = 0x00000010U, /**< Can do UNKLINE message */
38 CAPAB_CLUSTER = 0x00000020U, /**< Supports server clustering */
39 CAPAB_ENCAP = 0x00000040U, /**< Supports ENCAP message */
40 CAPAB_HOPS = 0x00000080U, /**< Supports HALFOPS */
41 CAPAB_TBURST = 0x00000100U, /**< Supports TBURST */
42 CAPAB_SVS = 0x00000200U, /**< Supports services */
43 CAPAB_DLN = 0x00000400U, /**< Can do DLINE message */
44 CAPAB_UNDLN = 0x00000800U, /**< Can do UNDLINE message */
45 CAPAB_CHW = 0x00001000U /**< Can do channel wall @# */
46 };
47
48 /*
49 * Capability macros.
50 */
51 #define IsCapable(x, cap) ((x)->connection->caps & (cap))
52 #define SetCapable(x, cap) ((x)->connection->caps |= (cap))
53 #define ClearCap(x, cap) ((x)->connection->caps &= ~(cap))
54
55 /* Capabilities */
56 struct Capability
57 {
58 dlink_node node;
59 char *name; /**< Name of capability */
60 unsigned int cap; /**< Mask value */
61 };
62
63 extern void capab_init(void);
64 extern void capab_add(const char *, unsigned int);
65 extern void capab_del(const char *);
66 extern unsigned int capab_find(const char *);
67 extern const char *capab_get(const void *);
68 #endif /* INCLUDED_server_capab_h */