-IRCSERVER, IRCPORT = "moo.com", 6667
-HMACKEY = "mrmoo"
-HMACTEMPORAL = 30
+# qwebirc configuration file
+#
+# This a Python program that is imported, so feel free to use any
+# Python here!
+#
+# Note that some changes to this configuration file require re-running
+# compile.py and others require restarting qwebirc (and some require
+# both!)
+# If in doubt always re-compile and restart.
+
+# IRC OPTIONS
+# ---------------------------------------------------------------------
+#
+# OPTION: IRCSERVER
+# Hostname (or IP address) of IRC server to connect to.
+# OPTION: IRCPORT
+# Port of IRC server to connect to.
+IRCSERVER, IRCPORT = "irc.myserver.com", 6667
+
+# OPTION: REALNAME
+# The realname field of IRC clients will be set to this value.
+REALNAME = "http://moo.com/"
+
+# OPTION: IDENT
+# ident to use on irc, set to the literal value None to use a
+# hexadecimal version of the IP address, e.g.:
+# IDENT = None
+IDENT = "webchat"
+
+# OPTION: WEBIRC_MODE
+# This option controls how the IP/hostname of the connecting # browser will be sent to IRC.
+#
+# Possible values include:
+# - webirc
+# Use WEBIRC type blocks, with a server configuration of
+# the following style:
+#
+# cgiirc {
+# type webirc;
+# hostname <qwebirc's ip address>;
+# password <password>;
+# };
+#
+# Remember to set the WEBIRC_PASSWORD value to be the
+# same as <password>.
+# - cgiirc
+# old style CGIIRC command, set CGIIRC_STRING to be the
+# command used to set the ip/hostname, and set
+# WEBIRC_PASSWORD to be the password used in the server's
+# configuration file.
+# - None (the literal value)
+# Send the IP and hostname in the realname field, overrides
+# the REALNAME option.
+WEBIRC_MODE = None
+
+# OPTION: WEBIRC_PASSWORD
+# Used for WEBIRC_MODE webirc and cgiirc, see WEBIRC_MODE
+# option documentation.
+#WEBIRC_PASSWORD = "fish"
+
+# OPTION: CGIIRC_STRING
+# Command sent to IRC server in for cgiirc WEBIRC_MODE.
+# See WEBIRC_MODE option documentation.
+#CGIIRC_STRING = "CGIIRC"
+
+# UI OPTIONS
+# ---------------------------------------------------------------------
+#
+# OPTION: BASE_URL
+# URL that this qwebirc instance will be available at
+BASE_URL = "http://foo.foo.org/"
+
+# OPTION: NETWORK_NAME
+# The name of your IRC network, displayed throughout the
+# application.
+NETWORK_NAME = "FooNet"
+
+# OPTION: APP_TITLE
+# The title of the application in the web browser.
+APP_TITLE = NETWORK_NAME + " Web IRC"
+
+
+# FEEDBACK OPTIONS
+# ---------------------------------------------------------------------
+#
+# These options control the feedback module, which allows users to
+# send feedback directly from qwebirc (via email).
+#
+# OPTION: FEEDBACK_FROM
+# E-mail address that feedback will originate from.
+FEEDBACK_FROM = "moo@moo.com"
+
+# OPTION: FEEDBACK_TO:
+# E-mail address that feedback will be sent to.
+FEEDBACK_TO = "moo@moo.com"
+
+# OPTION: FEEDBACK_SMTP_HOST
+# Hostname/IP address of SMTP server feedback will be sent
+# through.
+# OPTION: FEEDBACK_SMTP_PORT
+# Port of SMTP server feedback will be sent through.
+FEEDBACK_SMTP_HOST, FEEDBACK_SMTP_PORT = "127.0.0.1", 25
+
+# ADMIN ENGINE OPTIONS
+# ---------------------------------------------------------------------
+#
+# OPTION: ADMIN_ENGINE_HOSTS:
+# List of IP addresses to allow onto the admin engine at
+# http://instance/adminengine
+ADMIN_ENGINE_HOSTS = ["127.0.0.1"]
+
+# EXECUTION OPTIONS
+# ---------------------------------------------------------------------
+#
+# OPTION: ARGS (optional)
+# These arguments will be used as if qwebirc was run directly
+# with them, see run.py --help for a list of options.
+#ARGS = "-n -p 3989"
+
+# TUNEABLE VALUES
+# ---------------------------------------------------------------------
+#
+# You probably don't want to fiddle with these unless you really know
+# what you're doing...
+
+# OPTION: UPDATE_FREQ
+# Maximum rate (in seconds) at which updates will be propagated
+# to clients
UPDATE_FREQ = 0.5
+
+# OPTION: MAXBUFLEN
+# Maximum client AJAX recieve buffer size (in bytes), if this
+# buffer size is exceeded then the client will be disconnected.
MAXBUFLEN = 10000
-MAXSUBSCRIPTIONS = 3
-REALNAME = "http://moo.com/"
+
+# OPTION: MAXSUBSCRIPTIONS
+# Maximum amount of 'subscriptions' to a specific AJAX channel,
+# i.e. an IRC connection.
+# In theory with a value greater than one you can connect more
+# than one web IRC client to the same IRC connection, ala
+# irssi-proxy.
+MAXSUBSCRIPTIONS = 1
+
+# OPTION: MAXLINELEN
+# If the client sends a line greater than MAXLINELEN (in bytes)
+# then they will be disconnected.
MAXLINELEN = 600
+
+# OPTION: DNS_TIMEOUT
+# DNS requests that do not respond within DNS_TIMEOUT seconds
+# will cancelled.
+DNS_TIMEOUT = 5
+
+# OPTION: HTTP_AJAX_REQUEST_TIMEOUT
+# Connections made to the AJAX engine are closed after this
+# this many seconds.
+# Note that this value is intimately linked with the client
+# AJAX code at this time, changing it will result in bad
+# things happening.
+HTTP_AJAX_REQUEST_TIMEOUT = 30
+
+# OPTION: HTTP_REQUEST_TIMEOUT
+# Connections made to everything but the AJAX engine will
+# be closed after this many seconds, including connections
+# that haven't started/completed an HTTP request.
+HTTP_REQUEST_TIMEOUT = 5
+
+# QUAKENET SPECIFIC VALUES
+# ---------------------------------------------------------------------
+#
+# These values are of no interest if you're not QuakeNet.
+# At present they still need to be set, this will change soon.
+#
+# OPTION: HMACKEY
+# Shared key to use with hmac WEBIRC_MODE.
+HMACKEY = "mrmoo"
+
+# OPTION: HMACTEMPORAL
+# Divisor used for modulo HMAC timestamp generation.
+HMACTEMPORAL = 30
+
+# OPTION: AUTHGATEDOMAIN
+# Domain accepted inside authgate tickets.
AUTHGATEDOMAIN = "webchat_test"
+
+# OPTION: QTICKETKEY
+# Key shared with the authgate that is used to decrypt
+# qtickets.
QTICKETKEY = "boo"
-QBOT = "Q@CServe.quakenet.org"
-FEEDBACK_FROM = "moo@moo.com"
-FEEDBACK_TO = "moo@moo.com"
-FEEDBACK_SMTP_HOST = "127.0.0.1"
-FEEDBACK_SMTP_PORT = 25
-ADMIN_ENGINE_HOSTS = ["127.0.0.1"]
+
+# OPTION: AUTH_SERVICE
+# Service that auth commands are sent to. Also used to check
+# responses from said service.
+AUTH_SERVICE = "Q!TheQBot@CServe.quakenet.org"
+
+# OPTION: AUTH_OK_REGEX
+# JavaScript regular expression that should match when
+# AUTH_SERVICE has returned an acceptable response to
+# authentication.
+AUTH_OK_REGEX = "^You are now logged in as [^ ]+\\.$"
+
+# OPTION: AUTHGATEPROVIDER
+# Authgate module to use, normally imported directly.
+# dummyauthgate does nothing.
+import dummyauthgate as AUTHGATEPROVIDER