ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config.h
Revision: 7014
Committed: Fri Jan 1 16:08:57 2016 UTC (9 years, 7 months ago) by michael
Content type: text/x-chdr
File size: 2872 byte(s)
Log Message:
- Added 'command_queue_size', 'command_interval', and 'command_timeout', configuration directives to the options {} block. Removed hardcoded settings from options.h.

File Contents

# User Rev Content
1 michael 5351 /*
2     * Copyright (c) 2002 Erik Fears
3 michael 7005 * Copyright (c) 2014-2016 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 6043 extern unsigned int linenum;
31 michael 5052
32     struct IRCConf
33     {
34 michael 5120 char *nick;
35     char *username;
36     char *realname;
37     char *server;
38     int port;
39 michael 5198 time_t readtimeout;
40 michael 6078 time_t reconnectinterval;
41 michael 5120 char *password;
42     char *vhost;
43     char *nickserv;
44     char *oper;
45     char *mode;
46     char *away;
47     char *connregex;
48     char *kline;
49     list_t *channels; /* List of ChannelConf */
50     list_t *performs; /* List of char * */
51 michael 5405 list_t *notices; /* List of char * */
52 michael 5052 };
53    
54     struct ChannelConf
55     {
56 michael 5120 char *name;
57     char *key;
58     char *invite;
59 michael 5052 };
60    
61     struct OptionsConf
62     {
63 michael 7014 unsigned int command_queue_size;
64     time_t command_interval;
65     time_t command_timeout;
66 michael 6086 time_t negcache;
67 michael 5332 time_t negcache_rebuild;
68 michael 5120 unsigned int dns_fdlimit;
69 michael 6200 time_t dns_timeout;
70 michael 5120 char *pidfile;
71     char *scanlog;
72 michael 5052 };
73    
74     struct UserConf
75     {
76 michael 5120 list_t *masks; /* List of char * */
77     list_t *scanners; /* List of char * */
78 michael 5052 };
79    
80     struct ScannerConf
81     {
82 michael 5120 char *name;
83     list_t *protocols;
84     char *vhost;
85     int fd;
86     char *target_ip;
87     int target_port;
88     int timeout;
89     int max_read;
90     list_t *target_string;
91     int target_string_created;
92 michael 5052 };
93    
94     struct ProtocolConf
95     {
96 michael 5120 int type;
97     unsigned int port;
98 michael 5052 };
99    
100     struct OpmConf
101     {
102 michael 5120 list_t *blacklists;
103     char *dnsbl_from;
104     char *dnsbl_to;
105     char *sendmail;
106 michael 5052 };
107    
108 michael 5120 enum BlacklistType
109     {
110 michael 5052 A_BITMASK = 1,
111     A_REPLY
112     };
113    
114     struct BlacklistConf
115     {
116 michael 5120 char *name;
117     char *kline;
118     enum BlacklistType type;
119     int ban_unknown;
120     list_t *reply;
121     unsigned int stats_recv;
122 michael 5052 };
123    
124     struct BlacklistReplyConf
125     {
126 michael 5879 unsigned char number;
127 michael 5120 char *type;
128 michael 5052 };
129    
130     struct ExemptConf
131     {
132 michael 5120 list_t *masks;
133 michael 5052 };
134    
135    
136     /* Extern to actual config data declared in config.c */
137     extern struct IRCConf *IRCItem;
138     extern struct OptionsConf *OptionsItem;
139     extern struct OpmConf *OpmItem;
140     extern struct ExemptConf *ExemptItem;
141     extern list_t *UserItemList;
142     extern list_t *ScannerItemList;
143    
144 michael 6149 extern void yyerror(const char *);
145     extern void config_load(const char *);
146 michael 5052 #endif /* CONFIG_H */

Properties

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