]> jfr.im git - irc/quakenet/qwebirc.git/blob - config.py.example
Fixes issue #149
[irc/quakenet/qwebirc.git] / config.py.example
1 # qwebirc configuration file
2 #
3 # This a Python program that is imported, so feel free to use any
4 # Python here!
5 #
6 # Note that some changes to this configuration file require re-running
7 # compile.py and others require restarting qwebirc (and some require
8 # both!)
9 # If in doubt always re-compile and restart.
10
11 # The following line is required, don't remove it!
12 from qwebirc.config_options import *
13
14 # IRC OPTIONS
15 # ---------------------------------------------------------------------
16 #
17 # OPTION: IRCSERVER
18 # Hostname (or IP address) of IRC server to connect to.
19 # OPTION: IRCPORT
20 # Port of IRC server to connect to.
21 IRCSERVER, IRCPORT = "irc.myserver.com", 6667
22
23 # OPTION: SSLPORT
24 # SSL port of IRC server to connect to.
25 # If this option is uncommented it will override IRCPORT.
26 #SSLPORT = 6697
27
28 # OPTION: REALNAME
29 # The realname field of IRC clients will be set to this value.
30 REALNAME = "http://moo.com/"
31
32 # OPTION: IDENT
33 # ident to use on irc, possible values include:
34 # - a string, e.g. IDENT = "webchat"
35 # - the literal value IDENT_HEX, this will set the ident to the
36 # a hexadecimal version of the users IP address, e.g
37 # IDENT = IDENT_HEX
38 # - the literal value IDENT_NICKNAME, this will use the users
39 # supplied nickname as their ident.
40 IDENT = "webchat"
41
42 # OPTION: OUTGOING_IP
43 # The IP address to bind to when connecting to the IRC server.
44 #
45 # This will not change the IP address that qwebirc listens on.
46 # You will need to call run.py with the --ip/-i option if you
47 # want that.
48 #OUTGOING_IP = "127.0.0.1"
49
50 # OPTION: WEBIRC_MODE
51 # This option controls how the IP/hostname of the connecting
52 # browser will be sent to IRC.
53 #
54 # Possible values include:
55 # - the string "webirc", i.e. WEBIRC_MODE = "webirc"
56 # Use WEBIRC type blocks, with a server configuration of
57 # the following style:
58 #
59 # cgiirc {
60 # type webirc;
61 # hostname <qwebirc's ip address>;
62 # password <password>;
63 # };
64 #
65 # Remember to set the WEBIRC_PASSWORD value to be the
66 # same as <password>.
67 # - the string "cgiirc", i.e. WEBIRC_MODE = "cgiirc"
68 # old style CGIIRC command, set CGIIRC_STRING to be the
69 # command used to set the ip/hostname, and set
70 # WEBIRC_PASSWORD to be the password used in the server's
71 # configuration file.
72 # - the literal value None, i.e. WEBIRC_MODE = None
73 # Send the IP and hostname in the realname field, overrides
74 # the REALNAME option.
75 WEBIRC_MODE = None
76
77 # OPTION: WEBIRC_PASSWORD
78 # Used for WEBIRC_MODE webirc and cgiirc, see WEBIRC_MODE
79 # option documentation.
80 #WEBIRC_PASSWORD = "fish"
81
82 # OPTION: CGIIRC_STRING
83 # Command sent to IRC server in for cgiirc WEBIRC_MODE.
84 # See WEBIRC_MODE option documentation.
85 #CGIIRC_STRING = "CGIIRC"
86
87 # UI OPTIONS
88 # ---------------------------------------------------------------------
89 #
90 # OPTION: BASE_URL
91 # URL that this qwebirc instance will be available at, add the
92 # port number if your instance runs on a port other than 80.
93 BASE_URL = "http://foo.foo.org/"
94
95 # OPTION: NETWORK_NAME
96 # The name of your IRC network, displayed throughout the
97 # application.
98 NETWORK_NAME = "FooNet"
99
100 # OPTION: APP_TITLE
101 # The title of the application in the web browser.
102 APP_TITLE = NETWORK_NAME + " Web IRC"
103
104 # NICKNAME VALIDATION OPTIONS
105 # ---------------------------------------------------------------------
106 #
107 # OPTION: NICKNAME_VALIDATE
108 # If True then user nicknames will be validated according to
109 # the configuration below, otherwise they will be passed
110 # directly to the ircd.
111 NICKNAME_VALIDATE = True
112
113 # OPTION: NICKNAME_VALID_FIRST_CHAR
114 # A string containing valid characters for the first letter of
115 # a nickname.
116 # Default is as in RFC1459.
117 import string
118 NICKNAME_VALID_FIRST_CHAR = string.letters + "_[]{}`^\\|"
119
120 # OPTION: NICKNAME_VALID_SUBSEQUENT_CHAR
121 # A string containing valid characters for the rest of the
122 # nickname.
123 NICKNAME_VALID_SUBSEQUENT_CHARS = NICKNAME_VALID_FIRST_CHAR + string.digits + "-"
124
125 # OPTION: NICKNAME_MINIMUM_LENGTH
126 # Minimum characters permitted in a nickname on your network.
127 NICKNAME_MINIMUM_LENGTH = 2
128
129 # OPTION: NICKNAME_MAXIMUM_LENGTH
130 # Maximum characters permitted in a nickname on your network.
131 # Ideally we'd extract this from the ircd, but we need to know
132 # before we connect.
133 NICKNAME_MAXIMUM_LENGTH = 15
134
135 # FEEDBACK OPTIONS
136 # ---------------------------------------------------------------------
137 #
138 # These options control the feedback module, which allows users to
139 # send feedback directly from qwebirc (via email).
140 #
141 # OPTION: FEEDBACK_FROM
142 # E-mail address that feedback will originate from.
143 FEEDBACK_FROM = "moo@moo.com"
144
145 # OPTION: FEEDBACK_TO:
146 # E-mail address that feedback will be sent to.
147 FEEDBACK_TO = "moo@moo.com"
148
149 # OPTION: FEEDBACK_SMTP_HOST
150 # Hostname/IP address of SMTP server feedback will be sent
151 # through.
152 # OPTION: FEEDBACK_SMTP_PORT
153 # Port of SMTP server feedback will be sent through.
154 FEEDBACK_SMTP_HOST, FEEDBACK_SMTP_PORT = "127.0.0.1", 25
155
156 # ADMIN ENGINE OPTIONS
157 # ---------------------------------------------------------------------
158 #
159 # OPTION: ADMIN_ENGINE_HOSTS:
160 # List of IP addresses to allow onto the admin engine at
161 # http://instance/adminengine
162 ADMIN_ENGINE_HOSTS = ["127.0.0.1"]
163
164 # PROXY OPTIONS
165 # ---------------------------------------------------------------------
166 #
167 # OPTION: FORWARDED_FOR_HEADER
168 # If you're using a proxy that passes through a forwarded-for
169 # header set this option to the header name, also set
170 # FORWARDED_FOR_IPS.
171 #FORWARDED_FOR_HEADER="x-forwarded-for"
172
173 # OPTION: FORWARDED_FOR_IPS
174 # This option specifies the IP addresses that forwarded-for
175 # headers will be accepted from.
176 #FORWARDED_FOR_IPS=["127.0.0.1"]
177
178 # EXECUTION OPTIONS
179 # ---------------------------------------------------------------------
180 #
181 # OPTION: ARGS (optional)
182 # These arguments will be used as if qwebirc was run directly
183 # with them, see run.py --help for a list of options.
184 #ARGS = "-n -p 3989"
185
186 # OPTION: SYSLOG_ADDR (optional)
187 # Used in conjunction with util/syslog.py and -s option.
188 # This option specifies the address and port that syslog
189 # datagrams will be sent to.
190 #SYSLOG_ADDR = "127.0.0.1", 514
191
192 # TUNEABLE VALUES
193 # ---------------------------------------------------------------------
194 #
195 # You probably don't want to fiddle with these unless you really know
196 # what you're doing...
197
198 # OPTION: UPDATE_FREQ
199 # Maximum rate (in seconds) at which updates will be propagated
200 # to clients
201 UPDATE_FREQ = 0.5
202
203 # OPTION: MAXBUFLEN
204 # Maximum client AJAX recieve buffer size (in bytes), if this
205 # buffer size is exceeded then the client will be disconnected.
206 # This value should match the client sendq size in your ircd's
207 # configuration.
208 MAXBUFLEN = 100000
209
210 # OPTION: MAXSUBSCRIPTIONS
211 # Maximum amount of 'subscriptions' to a specific AJAX channel,
212 # i.e. an IRC connection.
213 # In theory with a value greater than one you can connect more
214 # than one web IRC client to the same IRC connection, ala
215 # irssi-proxy.
216 MAXSUBSCRIPTIONS = 1
217
218 # OPTION: MAXLINELEN
219 # If the client sends a line greater than MAXLINELEN (in bytes)
220 # then they will be disconnected.
221 # Note that IRC normally silently drops messages >=512 bytes.
222 MAXLINELEN = 600
223
224 # OPTION: DNS_TIMEOUT
225 # DNS requests that do not respond within DNS_TIMEOUT seconds
226 # will be cancelled.
227 DNS_TIMEOUT = 5
228
229 # OPTION: HTTP_AJAX_REQUEST_TIMEOUT
230 # Connections made to the AJAX engine are closed after this
231 # this many seconds.
232 # Note that this value is intimately linked with the client
233 # AJAX code at this time, changing it will result in bad
234 # things happening.
235 HTTP_AJAX_REQUEST_TIMEOUT = 30
236
237 # OPTION: HTTP_REQUEST_TIMEOUT
238 # Connections made to everything but the AJAX engine will
239 # be closed after this many seconds, including connections
240 # that haven't started/completed an HTTP request.
241 HTTP_REQUEST_TIMEOUT = 5
242
243 # OPTION: STATIC_BASE_URL
244 # This value is used to build the URL for all static HTTP
245 # requests.
246 # You'd find this useful if you're running multiple qwebirc
247 # instances on the same host.
248 STATIC_BASE_URL = ""
249
250 # OPTION: DYNAMIC_BASE_URL
251 # This value is used to build the URL for all dynamic HTTP
252 # requests.
253 # You'd find this useful if you're running multiple qwebirc
254 # instances on the same host.
255 DYNAMIC_BASE_URL = ""
256
257 # OPTION: CONNECTION_RESOLVER
258 # A list of (ip, port) tuples of resolvers to use for looking
259 # the SRV record(s) used for connecting to the name set in
260 # IRC_SERVER.
261 # The default value is None, and in this case qwebirc will use
262 # the system's default resolver(s).
263 CONNECTION_RESOLVER = None
264
265 # QUAKENET SPECIFIC VALUES
266 # ---------------------------------------------------------------------
267 #
268 # These values are of no interest if you're not QuakeNet.
269 # At present they still need to be set, this will change soon.
270 #
271 # OPTION: HMACKEY
272 # Shared key to use with hmac WEBIRC_MODE.
273 HMACKEY = "mrmoo"
274
275 # OPTION: HMACTEMPORAL
276 # Divisor used for modulo HMAC timestamp generation.
277 HMACTEMPORAL = 30
278
279 # OPTION: AUTHGATEDOMAIN
280 # Domain accepted inside authgate tickets.
281 AUTHGATEDOMAIN = "webchat_test"
282
283 # OPTION: QTICKETKEY
284 # Key shared with the authgate that is used to decrypt
285 # qtickets.
286 QTICKETKEY = "boo"
287
288 # OPTION: AUTH_SERVICE
289 # Service that auth commands are sent to. Also used to check
290 # responses from said service.
291 AUTH_SERVICE = "Q!TheQBot@CServe.quakenet.org"
292
293 # OPTION: AUTH_OK_REGEX
294 # JavaScript regular expression that should match when
295 # AUTH_SERVICE has returned an acceptable response to
296 # authentication.
297 AUTH_OK_REGEX = "^You are now logged in as [^ ]+\\.$"
298
299 # OPTION: AUTHGATEPROVIDER
300 # Authgate module to use, normally imported directly.
301 # dummyauthgate does nothing.
302 import dummyauthgate as AUTHGATEPROVIDER