2 import qwebirc
.util
.qjson
as json
6 networkName
=config
.NETWORK_NAME
,
7 networkServices
=[config
.AUTH_SERVICE
],
8 loginRegex
=config
.AUTH_OK_REGEX
,
9 appTitle
=config
.APP_TITLE
,
10 baseURL
=config
.BASE_URL
,
11 staticBaseURL
=config
.STATIC_BASE_URL
,
12 dynamicBaseURL
=config
.DYNAMIC_BASE_URL
,
13 dynamicConfiguration
=False,
14 validateNickname
=False,
18 if hasattr(config
, "NICKNAME_VALIDATE") and config
.NICKNAME_VALIDATE
:
19 options
["nickValidation"] = dict(
20 minLen
=config
.NICKNAME_MINIMUM_LENGTH
,
21 maxLen
=config
.NICKNAME_MAXIMUM_LENGTH
,
22 validFirstChar
=config
.NICKNAME_VALID_FIRST_CHAR
,
23 validSubChars
=config
.NICKNAME_VALID_SUBSEQUENT_CHARS
26 if hasattr(config
, "HELP_URL") and config
.HELP_URL
:
27 options
["helpURL"] = config
.HELP_URL
29 if hasattr(config
, "LOGO_URL"):
30 options
["logoURL"] = config
.LOGO_URL
32 if hasattr(config
, "CUSTOM_MENU_ITEMS"):
33 options
["customMenuItems"] = config
.CUSTOM_MENU_ITEMS
35 if hasattr(config
, "ACCOUNT_WHOIS_COMMAND") and config
.ACCOUNT_WHOIS_COMMAND
:
36 options
["accountWhoisCommand"] = config
.ACCOUNT_WHOIS_COMMAND
38 if hasattr(config
, "DYNAMIC_CONFIGURATION") and config
.DYNAMIC_CONFIGURATION
:
39 options
["dynamicConfiguration"] = True
41 return json
.dumps(options
)