Fetching contributors…
Cannot retrieve contributors at this time
51 lines (37 sloc) 1.54 KB
#!/usr/bin/env python
""" - jenni IRC bot config manager
Copyright 2009-2015, Michael Yanovich (
Copyright 2008-2013, Sean B. Palmer (
Licensed under the Eiffel Forum License 2.
Written by kaneda (, is invoked in
the jenni starter to store the config helper in jenni.config
More info:
* jenni:
* Phenny:
import imp, os, sys
class Configs():
def __init__(self, config_paths):
self.config_paths = config_paths
def load_modules(self, config_modules):
for config_name in self.config_paths:
name = os.path.basename(config_name).split('.')[0] + '_config'
module = imp.load_source(name, config_name)
module.filename = config_name
if not hasattr(module, 'prefix'):
module.prefix = r'\.'
if not hasattr(module, 'name'): = 'jenni yanosbot,'
if not hasattr(module, 'port'):
module.port = 6667
if not hasattr(module, 'password'):
module.password = None
if not hasattr(module, 'ssl'):
module.ssl = False
if == '':
error = ('Error: you must edit the config file first!\n' +
"You're currently using %s" % module.filename)
print >> sys.stderr, error