ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid/branches/8.2.x/include/server.h
Revision: 6157
Committed: Thu Jun 18 09:22:51 2015 UTC (8 years, 9 months ago) by michael
Content type: text/x-chdr
File size: 3613 byte(s)
Log Message:
- Automatically generate sid on startup if none is configured. Patch provided by Adam

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced, lightweight Internet Relay Chat Daemon (ircd)
3 *
4 * Copyright (c) 1997-2015 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.h
23 * \brief A header for the server functions.
24 * \version $Id$
25 */
26
27 #ifndef INCLUDED_serv_h
28 #define INCLUDED_serv_h
29
30
31 /*
32 * number of seconds to wait after server starts up, before
33 * starting try_connections()
34 * TOO SOON and you can nick collide like crazy.
35 */
36 #define STARTUP_CONNECTIONS_TIME 60
37
38 struct Client;
39 struct MaskItem;
40 struct Channel;
41
42 /* Capabilities */
43 struct Capability
44 {
45 dlink_node node;
46 char *name; /* name of capability */
47 unsigned int cap; /* mask value */
48 };
49
50 #define CAP_QS 0x00000001 /* Can handle quit storm removal */
51 #define CAP_EX 0x00000002 /* Can do channel +e exemptions */
52 #define CAP_IE 0x00000004 /* Can do invite exceptions */
53 #define CAP_EOB 0x00000008 /* Can do EOB message */
54 #define CAP_KLN 0x00000010 /* Can do KLINE message */
55 #define CAP_KNOCK 0x00000020 /* supports KNOCK */
56 #define CAP_UNKLN 0x00000040 /* Can do UNKLINE message */
57 #define CAP_CLUSTER 0x00000080 /* supports server clustering */
58 #define CAP_ENCAP 0x00000100 /* supports ENCAP message */
59 #define CAP_HOPS 0x00000200 /* supports HALFOPS */
60 #define CAP_TBURST 0x00000400 /* supports TBURST */
61 #define CAP_SVS 0x00000800 /* supports services */
62 #define CAP_DLN 0x00001000 /* Can do DLINE message */
63 #define CAP_UNDLN 0x00002000 /* Can do UNDLINE message */
64 #define CAP_CHW 0x00004000 /* Can do channel wall @# */
65
66 /*
67 * Capability macros.
68 */
69 #define IsCapable(x, cap) ((x)->connection->caps & (cap))
70 #define SetCapable(x, cap) ((x)->connection->caps |= (cap))
71 #define ClearCap(x, cap) ((x)->connection->caps &= ~(cap))
72
73
74 /*
75 * return values for hunt_server()
76 */
77 enum
78 {
79 HUNTED_NOSUCH = -1, /* If the hunted server is not found */
80 HUNTED_ISME = 0, /* If this server should execute the command */
81 HUNTED_PASS = 1 /* If message passed onwards successfully */
82 };
83
84 extern int valid_servname(const char *);
85 extern int check_server(const char *, struct Client *);
86 extern int hunt_server(struct Client *, const char *, const int, const int, char *[]);
87 extern void add_capability(const char *, unsigned int);
88 extern void delete_capability(const char *);
89 extern int unsigned find_capability(const char *);
90 extern void send_capabilities(struct Client *);
91 extern void write_links_file(void *);
92 extern void read_links_file(void);
93 extern const char *show_capabilities(const struct Client *);
94 extern void try_connections(void *);
95 extern int serv_connect(struct MaskItem *, struct Client *);
96 extern struct Client *find_servconn_in_progress(const char *);
97 extern struct Server *make_server(struct Client *);
98 extern void generate_sid(void);
99 #endif /* INCLUDED_server.h */

Properties

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