ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/server_capab.h
Revision: 9857
Committed: Fri Jan 1 04:43:22 2021 UTC (5 years, 6 months ago) by michael
Content type: text/x-chdr
File size: 2320 byte(s)
Log Message:
- Bump copyright years

File Contents

# User Rev Content
1 michael 8170 /*
2     * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3     *
4 michael 9857 * Copyright (c) 1997-2021 ircd-hybrid development team
5 michael 8170 *
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 michael 8172 * \version $Id$
25 michael 8170 */
26    
27     #ifndef INCLUDED_server_capab_h
28     #define INCLUDED_server_capab_h
29    
30     /** Server capability flags */
31     enum
32     {
33 michael 9625 CAPAB_EOB = 1 << 0, /**< Can do EOB message */
34     CAPAB_KLN = 1 << 1, /**< Can do KLINE message */
35     CAPAB_KNOCK = 1 << 2, /**< Supports KNOCK */
36     CAPAB_UNKLN = 1 << 3, /**< Can do UNKLINE message */
37     CAPAB_CLUSTER = 1 << 4, /**< Supports server clustering */
38     CAPAB_ENCAP = 1 << 5, /**< Supports ENCAP message */
39     CAPAB_TBURST = 1 << 6, /**< Supports TBURST */
40     CAPAB_DLN = 1 << 7, /**< Can do DLINE message */
41     CAPAB_UNDLN = 1 << 8, /**< Can do UNDLINE message */
42     CAPAB_RHOST = 1 << 9 /**< Can do extended realhost UID messages */
43 michael 8170 };
44    
45     /*
46     * Capability macros.
47     */
48 michael 9790 #define IsCapable(x, cap) ((x)->connection->capab & (cap))
49     #define SetCapable(x, cap) ((x)->connection->capab |= (cap))
50     #define ClearCap(x, cap) ((x)->connection->capab &= ~(cap))
51 michael 8170
52     /* Capabilities */
53     struct Capability
54     {
55 michael 8437 dlink_node node; /**< List node; linked into capab_list */
56 michael 8170 char *name; /**< Name of capability */
57     unsigned int cap; /**< Mask value */
58     };
59    
60     extern void capab_init(void);
61     extern void capab_add(const char *, unsigned int);
62     extern void capab_del(const char *);
63     extern unsigned int capab_find(const char *);
64     extern const char *capab_get(const void *);
65     #endif /* INCLUDED_server_capab_h */

Properties

Name Value
svn:eol-style native
svn:keywords Id