]> jfr.im git - irc/quakenet/qwebirc.git/blobdiff - bin/optionsgen.py
add dynamic configuration support
[irc/quakenet/qwebirc.git] / bin / optionsgen.py
index e288b8e3d80ec460c2d5ecfb91c901cd68a54f94..4b9dd875b605f32729bff2dae11982e3b5a9eb0a 100644 (file)
@@ -10,7 +10,9 @@ def get_options():
     baseURL=config.BASE_URL,
     staticBaseURL=config.STATIC_BASE_URL,
     dynamicBaseURL=config.DYNAMIC_BASE_URL,
-    validateNickname=False
+    dynamicConfiguration=False,
+    validateNickname=False,
+    customMenuItems=[]
   )
   
   if hasattr(config, "NICKNAME_VALIDATE") and config.NICKNAME_VALIDATE:
@@ -24,4 +26,16 @@ def get_options():
   if hasattr(config, "HELP_URL") and config.HELP_URL:
     options["helpURL"] = config.HELP_URL
 
+  if hasattr(config, "LOGO_URL"):
+    options["logoURL"] = config.LOGO_URL
+
+  if hasattr(config, "CUSTOM_MENU_ITEMS"):
+    options["customMenuItems"] = config.CUSTOM_MENU_ITEMS
+
+  if hasattr(config, "ACCOUNT_WHOIS_COMMAND") and config.ACCOUNT_WHOIS_COMMAND:
+    options["accountWhoisCommand"] = config.ACCOUNT_WHOIS_COMMAND
+
+  if hasattr(config, "DYNAMIC_CONFIGURATION") and config.DYNAMIC_CONFIGURATION:
+    options["dynamicConfiguration"] = True
+
   return json.dumps(options)