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