ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/ircd-hybrid-8/include/s_serv.h
Revision: 1302
Committed: Wed Mar 21 17:48:54 2012 UTC (12 years ago) by michael
Content type: text/x-chdr
File size: 4594 byte(s)
Log Message:
- remove servlink in preparation for tls links/compression

File Contents

# Content
1 /*
2 * ircd-hybrid: an advanced Internet Relay Chat Daemon(ircd).
3 * s_serv.h: A header for the server functions.
4 *
5 * Copyright (C) 2002 by the past and present ircd coders, and others.
6 *
7 * This program is free software; you can redistribute it and/or modify
8 * it under the terms of the GNU General Public License as published by
9 * the Free Software Foundation; either version 2 of the License, or
10 * (at your option) any later version.
11 *
12 * This program is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15 * GNU General Public License for more details.
16 *
17 * You should have received a copy of the GNU General Public License
18 * along with this program; if not, write to the Free Software
19 * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307
20 * USA
21 *
22 * $Id$
23 */
24
25 #ifndef INCLUDED_serv_h
26 #define INCLUDED_serv_h
27 #include "config.h"
28
29 struct ConfItem;
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 AccessItem;
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_CAP 0x00000001 /* received a CAP to begin with */
51 #define CAP_QS 0x00000002 /* Can handle quit storm removal */
52 #define CAP_EX 0x00000004 /* Can do channel +e exemptions */
53 #define CAP_CHW 0x00000008 /* Can do channel wall @# */
54 #define CAP_IE 0x00000010 /* Can do invite exceptions */
55 #define CAP_EOB 0x00000020 /* Can do EOB message */
56 #define CAP_KLN 0x00000040 /* Can do KLINE message */
57 #define CAP_GLN 0x00000080 /* Can do GLINE message */
58 #define CAP_TS6 0x00000100 /* Can do TS6 */
59 #define __CAP_UNUSED__ 0x00000200 /* UNUSED */
60 #define __CAP_UNUSED___ 0x00000400 /* UNUSED */
61 #define CAP_KNOCK 0x00000800 /* supports KNOCK */
62 #define CAP_TB 0x00001000 /* supports TB */
63 #define CAP_UNKLN 0x00002000 /* Can do UNKLINE message */
64 #define CAP_CLUSTER 0x00004000 /* supports server clustering */
65 #define CAP_ENCAP 0x00008000 /* supports ENCAP message */
66 #define CAP_HOPS 0x00010000 /* supports HALFOPS */
67 #define CAP_TBURST 0x00020000 /* supports TBURST */
68 #define CAP_SVS 0x00040000 /* supports services */
69 #define CAP_DLN 0x00080000 /* Can do DLINE message */
70 #define CAP_UNDLN 0x00100000 /* Can do UNDLINE message */
71
72 /*
73 * Capability macros.
74 */
75 #define IsCapable(x, cap) ((x)->localClient->caps & (cap))
76 #define SetCapable(x, cap) ((x)->localClient->caps |= (cap))
77 #define ClearCap(x, cap) ((x)->localClient->caps &= ~(cap))
78
79 /*
80 * Globals
81 *
82 *
83 * list of recognized server capabilities. "TS" is not on the list
84 * because all servers that we talk to already do TS, and the kludged
85 * extra argument to "PASS" takes care of checking that. -orabidoo
86 */
87 extern struct Capability captab[];
88
89 /*
90 * return values for hunt_server()
91 */
92 #define HUNTED_NOSUCH (-1) /* if the hunted server is not found */
93 #define HUNTED_ISME 0 /* if this server should execute the command */
94 #define HUNTED_PASS 1 /* if message passed onwards successfully */
95
96 extern int valid_servname(const char *);
97 extern int check_server(const char *, struct Client *);
98 extern int hunt_server(struct Client *, struct Client *,
99 const char *, int, int, char **);
100 extern void add_capability(const char *, int, int);
101 extern int delete_capability(const char *);
102 extern int find_capability(const char *);
103 extern void send_capabilities(struct Client *, struct AccessItem *, int);
104 extern void write_links_file(void *);
105 extern void server_estab(struct Client *);
106 extern const char *show_capabilities(struct Client *);
107 extern void try_connections(void *);
108 extern void burst_channel(struct Client *client_p, struct Channel *);
109 extern void sendnick_TS(struct Client *, struct Client *);
110 extern int serv_connect(struct AccessItem *, struct Client *);
111 extern struct Client *find_servconn_in_progress(const char *);
112 extern struct Server *make_server(struct Client *);
113 #endif /* INCLUDED_s_serv_h */

Properties

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