ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/trunk/include/conf_shared.h
Revision: 7209
Committed: Wed Feb 3 15:10:39 2016 UTC (9 years, 6 months ago) by michael
Content type: text/x-chdr
File size: 1823 byte(s)
Log Message:
- Clustering has been broken in -r7159. Rewrote most of the shared/cluster implementation to be less obscure.
  This introduces a little bit of code duplication, but increases readability, is less error prone, and
  reduces memory consumption a bit.

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 *
4 * Copyright (c) 1997-2016 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 conf_shared.h
23 * \brief Implements shared {} block configuration management.
24 * \version $Id: conf_shared.h 7158 2016-01-28 11:25:55Z michael $
25 */
26
27 #ifndef INCLUDED_conf_shared_h
28 #define INCLUDED_conf_shared_h
29 #include "stdinc.h"
30
31 enum
32 {
33 SHARED_KLINE = 0x00000001U,
34 SHARED_UNKLINE = 0x00000002U,
35 SHARED_XLINE = 0x00000004U,
36 SHARED_UNXLINE = 0x00000008U,
37 SHARED_RESV = 0x00000010U,
38 SHARED_UNRESV = 0x00000020U,
39 SHARED_LOCOPS = 0x00000040U,
40 SHARED_DLINE = 0x00000080U,
41 SHARED_UNDLINE = 0x00000100U,
42 SHARED_REHASH = 0x00000200U,
43 SHARED_ALL = 0xFFFFFFFFU
44 };
45
46 struct SharedItem
47 {
48 dlink_node node;
49 char *server;
50 char *user;
51 char *host;
52 unsigned int type;
53 };
54
55 extern const dlink_list *shared_get_list(void);
56 extern void shared_clear(void);
57 extern struct SharedItem *shared_make(void);
58 extern const struct SharedItem *shared_find(unsigned int, const char *, const char *, const char *);
59 #endif