ViewVC Help
View File | Revision Log | Show Annotations | View Changeset | Root Listing
root/svn/hopm/trunk/src/config.h
Revision: 5405
Committed: Tue Jan 20 19:14:40 2015 UTC (10 years, 7 months ago) by michael
Content type: text/x-chdr
File size: 2716 byte(s)
Log Message:
- Added irc::notice configuration option (notice(s) to send to a newly connected client).

File Contents

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

Properties

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