Added config option for specifying services to use.

This commit is contained in:
Sean B. Palmer
2009-06-07 09:57:41 +01:00
parent a06ea9e4ba
commit aafac55f7a
6 changed files with 51 additions and 88 deletions

21
phenny
View File

@@ -43,9 +43,16 @@ def create_default_config(fn):
#
# enable = []
# Modules to load from the opt directory
# Directories to load opt modules from
extra = []
# Services to load: maps channel names to white or black lists
external = {
'#liberal': ['!'], # allow all
'#conservative': [], # allow none
'*': ['py', 'whois', 'glyph'] # default whitelist
}
# EOF
""")
f.close()
@@ -98,12 +105,7 @@ def config_names(config):
sys.exit(1)
def main(argv=None):
# Step One: Check Dependencies
check_python_version() # require python2.4 or later
check_dotdir() # require ~/.phenny, or make it and exit
# Step Two: Parse The Command Line
# Step One: Parse The Command Line
parser = optparse.OptionParser('%prog [options]')
parser.add_option('-c', '--config', metavar='fn',
@@ -111,6 +113,11 @@ def main(argv=None):
opts, args = parser.parse_args(argv)
if args: print >> sys.stderr, 'Warning: ignoring spurious arguments'
# Step Two: Check Dependencies
check_python_version() # require python2.4 or later
check_dotdir() # require ~/.phenny, or make it and exit
# Step Three: Load The Configurations
config_modules = []