]> jfr.im git - irc/quakenet/qwebirc.git/blob - config.py.example
Add CUSTOM_CSS option and allow it to interact with LOGO_URL
[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: LOGO_URL
101 # URL (relative or absolute) to your logo (max height 68 pixels).
102 # If not set the default network name will shown in text.
103 # Can be set to "" to display the logo box without setting the
104 # logo (for use with CUSTOM_CSS)
105 #LOGO_URL="images/logo.png"
106
107 # OPTION: CUSTOM_CSS
108 # Filename of custom css to include.
109 # Must be in the css directory.
110 #CUSTOM_CSS="mynetwork.css"
111
112 # OPTION: ANALYTICS_HTML
113 # If you have an analytics service, you can paste the HTML
114 # between the triple quotes.
115 #ANALYTICS_HTML = """
116 #"""
117
118 # OPTION: APP_TITLE
119 # The title of the application in the web browser.
120 APP_TITLE = NETWORK_NAME + " Web IRC"
121
122 # NICKNAME VALIDATION OPTIONS
123 # ---------------------------------------------------------------------
124 #
125 # OPTION: NICKNAME_VALIDATE
126 # If True then user nicknames will be validated according to
127 # the configuration below, otherwise they will be passed
128 # directly to the ircd.
129 NICKNAME_VALIDATE = True
130
131 # OPTION: NICKNAME_VALID_FIRST_CHAR
132 # A string containing valid characters for the first letter of
133 # a nickname.
134 # Default is as in RFC1459.
135 import string
136 NICKNAME_VALID_FIRST_CHAR = string.letters + "_[]{}`^\\|"
137
138 # OPTION: NICKNAME_VALID_SUBSEQUENT_CHAR
139 # A string containing valid characters for the rest of the
140 # nickname.
141 NICKNAME_VALID_SUBSEQUENT_CHARS = NICKNAME_VALID_FIRST_CHAR + string.digits + "-"
142
143 # OPTION: NICKNAME_MINIMUM_LENGTH
144 # Minimum characters permitted in a nickname on your network.
145 NICKNAME_MINIMUM_LENGTH = 2
146
147 # OPTION: NICKNAME_MAXIMUM_LENGTH
148 # Maximum characters permitted in a nickname on your network.
149 # Ideally we'd extract this from the ircd, but we need to know
150 # before we connect.
151 NICKNAME_MAXIMUM_LENGTH = 15
152
153 # FEEDBACK OPTIONS
154 # ---------------------------------------------------------------------
155 #
156 # These options control the feedback module, which allows users to
157 # send feedback directly from qwebirc (via email).
158 #
159 # OPTION: FEEDBACK_FROM
160 # E-mail address that feedback will originate from.
161 FEEDBACK_FROM = "moo@moo.com"
162
163 # OPTION: FEEDBACK_TO:
164 # E-mail address that feedback will be sent to.
165 FEEDBACK_TO = "moo@moo.com"
166
167 # OPTION: FEEDBACK_SMTP_HOST
168 # Hostname/IP address of SMTP server feedback will be sent
169 # through.
170 # OPTION: FEEDBACK_SMTP_PORT
171 # Port of SMTP server feedback will be sent through.
172 FEEDBACK_SMTP_HOST, FEEDBACK_SMTP_PORT = "127.0.0.1", 25
173
174 # ADMIN ENGINE OPTIONS
175 # ---------------------------------------------------------------------
176 #
177 # OPTION: ADMIN_ENGINE_HOSTS:
178 # List of IP addresses to allow onto the admin engine at
179 # http://instance/adminengine
180 ADMIN_ENGINE_HOSTS = ["127.0.0.1"]
181
182 # PROXY OPTIONS
183 # ---------------------------------------------------------------------
184 #
185 # OPTION: FORWARDED_FOR_HEADER
186 # If you're using a proxy that passes through a forwarded-for
187 # header set this option to the header name, also set
188 # FORWARDED_FOR_IPS.
189 #FORWARDED_FOR_HEADER="x-forwarded-for"
190
191 # OPTION: FORWARDED_FOR_IPS
192 # This option specifies the IP addresses that forwarded-for
193 # headers will be accepted from.
194 #FORWARDED_FOR_IPS=["127.0.0.1"]
195
196 # EXECUTION OPTIONS
197 # ---------------------------------------------------------------------
198 #
199 # OPTION: ARGS (optional)
200 # These arguments will be used as if qwebirc was run directly
201 # with them, see run.py --help for a list of options.
202 #ARGS = "-n -p 3989"
203
204 # OPTION: SYSLOG_ADDR (optional)
205 # Used in conjunction with util/syslog.py and -s option.
206 # This option specifies the address and port that syslog
207 # datagrams will be sent to.
208 #SYSLOG_ADDR = "127.0.0.1", 514
209
210 # TUNEABLE VALUES
211 # ---------------------------------------------------------------------
212 #
213 # You probably don't want to fiddle with these unless you really know
214 # what you're doing...
215
216 # OPTION: UPDATE_FREQ
217 # Maximum rate (in seconds) at which updates will be propagated
218 # to clients
219 UPDATE_FREQ = 0.5
220
221 # OPTION: MAXBUFLEN
222 # Maximum client AJAX recieve buffer size (in bytes), if this
223 # buffer size is exceeded then the client will be disconnected.
224 # This value should match the client sendq size in your ircd's
225 # configuration.
226 MAXBUFLEN = 100000
227
228 # OPTION: MAXSUBSCRIPTIONS
229 # Maximum amount of 'subscriptions' to a specific AJAX channel,
230 # i.e. an IRC connection.
231 # In theory with a value greater than one you can connect more
232 # than one web IRC client to the same IRC connection, ala
233 # irssi-proxy.
234 MAXSUBSCRIPTIONS = 1
235
236 # OPTION: MAXLINELEN
237 # If the client sends a line greater than MAXLINELEN (in bytes)
238 # then they will be disconnected.
239 # Note that IRC normally silently drops messages >=512 bytes.
240 MAXLINELEN = 600
241
242 # OPTION: DNS_TIMEOUT
243 # DNS requests that do not respond within DNS_TIMEOUT seconds
244 # will be cancelled.
245 DNS_TIMEOUT = 5
246
247 # OPTION: HTTP_AJAX_REQUEST_TIMEOUT
248 # Connections made to the AJAX engine are closed after this
249 # this many seconds.
250 # Note that this value is intimately linked with the client
251 # AJAX code at this time, changing it will result in bad
252 # things happening.
253 HTTP_AJAX_REQUEST_TIMEOUT = 295
254
255 # OPTION: HTTP_REQUEST_TIMEOUT
256 # Connections made to everything but the AJAX engine will
257 # be closed after this many seconds, including connections
258 # that haven't started/completed an HTTP request.
259 HTTP_REQUEST_TIMEOUT = 5
260
261 # OPTION: STATIC_BASE_URL
262 # This value is used to build the URL for all static HTTP
263 # requests.
264 # You'd find this useful if you're running multiple qwebirc
265 # instances on the same host.
266 STATIC_BASE_URL = ""
267
268 # OPTION: DYNAMIC_BASE_URL
269 # This value is used to build the URL for all dynamic HTTP
270 # requests.
271 # You'd find this useful if you're running multiple qwebirc
272 # instances on the same host.
273 DYNAMIC_BASE_URL = ""
274
275 # OPTION: CONNECTION_RESOLVER
276 # A list of (ip, port) tuples of resolvers to use for looking
277 # the SRV record(s) used for connecting to the name set in
278 # IRC_SERVER.
279 # The default value is None, and in this case qwebirc will use
280 # the system's default resolver(s).
281 CONNECTION_RESOLVER = None
282
283 # OPTION: HELP_URL
284 # Shown to the user if they type /HELP or click on the Help!
285 # option in the user interface.
286 HELP_URL = ""
287
288 # OPTION: ACCOUNT_WHOIS_COMMAND
289 # Command sent when a username is clicked.
290 #ACCOUNT_WHOIS_COMMAND = "/msg Q whois #"
291
292 # QUAKENET SPECIFIC VALUES
293 # ---------------------------------------------------------------------
294 #
295 # These values are of no interest if you're not QuakeNet.
296 # At present they still need to be set, this will change soon.
297 #
298 # OPTION: HMACKEY
299 # Shared key to use with hmac WEBIRC_MODE.
300 HMACKEY = "mrmoo"
301
302 # OPTION: HMACTEMPORAL
303 # Divisor used for modulo HMAC timestamp generation.
304 HMACTEMPORAL = 30
305
306 # OPTION: AUTHGATEDOMAIN
307 # Domain accepted inside authgate tickets.
308 AUTHGATEDOMAIN = "webchat_test"
309
310 # OPTION: QTICKETKEY
311 # Key shared with the authgate that is used to decrypt
312 # qtickets.
313 QTICKETKEY = "boo"
314
315 # OPTION: AUTH_SERVICE
316 # Service that auth commands are sent to. Also used to check
317 # responses from said service.
318 AUTH_SERVICE = "Q!TheQBot@CServe.quakenet.org"
319
320 # OPTION: AUTH_OK_REGEX
321 # JavaScript regular expression that should match when
322 # AUTH_SERVICE has returned an acceptable response to
323 # authentication.
324 AUTH_OK_REGEX = "^You are now logged in as [^ ]+\\.$"
325
326 # OPTION: AUTHGATEPROVIDER
327 # Authgate module to use, normally imported directly.
328 # dummyauthgate does nothing.
329 import dummyauthgate as AUTHGATEPROVIDER