ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config.h
Revision: 7927
Committed: Sat Dec 31 13:59:46 2016 UTC (9 years, 6 months ago) by michael
Content type: text/x-chdr
File size: 2925 byte(s)
Log Message:
- Update copyright years

File Contents

# User Rev Content
1 michael 5351 /*
2     * Copyright (c) 2002 Erik Fears
3 michael 7927 * Copyright (c) 2014-2017 ircd-hybrid development team
4 michael 5351 *
5     * This program is free software; you can redistribute it and/or modify
6     * it under the terms of the GNU General Public License as published by
7     * the Free Software Foundation; either version 2 of the License, or
8     * (at your option) any later version.
9     *
10     * This program is distributed in the hope that it will be useful,
11     * but WITHOUT ANY WARRANTY; without even the implied warranty of
12     * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13     * GNU General Public License for more details.
14     *
15     * You should have received a copy of the GNU General Public License
16     * along with this program; if not, write to the Free Software
17     * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301
18     * USA
19     */
20    
21 michael 5052 #ifndef CONFIG_H
22     #define CONFIG_H
23    
24     #include <stdio.h>
25 michael 5198 #include <time.h>
26 michael 5052 #include "list.h"
27     #include "libopm/src/opm_types.h"
28    
29     extern char linebuf[512];
30 michael 7711 extern char conffilebuf[512];
31     extern unsigned int lineno;
32     extern FILE *conf_file;
33 michael 5052
34     struct IRCConf
35     {
36 michael 5120 char *nick;
37     char *username;
38     char *realname;
39     char *server;
40     int port;
41 michael 5198 time_t readtimeout;
42 michael 6078 time_t reconnectinterval;
43 michael 5120 char *password;
44     char *vhost;
45     char *nickserv;
46     char *oper;
47     char *mode;
48     char *away;
49     char *connregex;
50     char *kline;
51     list_t *channels; /* List of ChannelConf */
52     list_t *performs; /* List of char * */
53 michael 5405 list_t *notices; /* List of char * */
54 michael 5052 };
55    
56     struct ChannelConf
57     {
58 michael 5120 char *name;
59     char *key;
60     char *invite;
61 michael 5052 };
62    
63     struct OptionsConf
64     {
65 michael 7014 unsigned int command_queue_size;
66     time_t command_interval;
67     time_t command_timeout;
68 michael 6086 time_t negcache;
69 michael 5332 time_t negcache_rebuild;
70 michael 5120 unsigned int dns_fdlimit;
71 michael 6200 time_t dns_timeout;
72 michael 5120 char *pidfile;
73     char *scanlog;
74 michael 5052 };
75    
76     struct UserConf
77     {
78 michael 5120 list_t *masks; /* List of char * */
79     list_t *scanners; /* List of char * */
80 michael 5052 };
81    
82     struct ScannerConf
83     {
84 michael 5120 char *name;
85     list_t *protocols;
86     char *vhost;
87     int fd;
88     char *target_ip;
89     int target_port;
90     int timeout;
91     int max_read;
92     list_t *target_string;
93     int target_string_created;
94 michael 5052 };
95    
96     struct ProtocolConf
97     {
98 michael 5120 int type;
99     unsigned int port;
100 michael 5052 };
101    
102     struct OpmConf
103     {
104 michael 5120 list_t *blacklists;
105     char *dnsbl_from;
106     char *dnsbl_to;
107     char *sendmail;
108 michael 5052 };
109    
110 michael 5120 enum BlacklistType
111     {
112 michael 5052 A_BITMASK = 1,
113     A_REPLY
114     };
115    
116     struct BlacklistConf
117     {
118 michael 5120 char *name;
119     char *kline;
120     enum BlacklistType type;
121     int ban_unknown;
122     list_t *reply;
123     unsigned int stats_recv;
124 michael 5052 };
125    
126     struct BlacklistReplyConf
127     {
128 michael 5879 unsigned char number;
129 michael 5120 char *type;
130 michael 5052 };
131    
132     struct ExemptConf
133     {
134 michael 5120 list_t *masks;
135 michael 5052 };
136    
137    
138     /* Extern to actual config data declared in config.c */
139     extern struct IRCConf *IRCItem;
140     extern struct OptionsConf *OptionsItem;
141     extern struct OpmConf *OpmItem;
142     extern struct ExemptConf *ExemptItem;
143     extern list_t *UserItemList;
144     extern list_t *ScannerItemList;
145    
146 michael 6149 extern void yyerror(const char *);
147     extern void config_load(const char *);
148 michael 5052 #endif /* CONFIG_H */

Properties

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