summaryrefslogtreecommitdiffstats
path: root/phenny
diff options
context:
space:
mode:
authorSean B. Palmer <http://inamidst.com/sbp/>2009-06-07 09:57:41 +0100
committerSean B. Palmer <http://inamidst.com/sbp/>2009-06-07 09:57:41 +0100
commitaafac55f7acfb8393e7ecde547f4df03804ae487 (patch)
treeadecc5db7235b62965177b2b8df40ce30c57937b /phenny
parenta06ea9e4ba89db0163fa344754fad44eccc993ee (diff)
downloadbot-aafac55f7acfb8393e7ecde547f4df03804ae487.tar.gz
bot-aafac55f7acfb8393e7ecde547f4df03804ae487.tar.bz2
bot-aafac55f7acfb8393e7ecde547f4df03804ae487.zip
Added config option for specifying services to use.
Diffstat (limited to 'phenny')
-rwxr-xr-xphenny21
1 files changed, 14 insertions, 7 deletions
diff --git a/phenny b/phenny
index 762e4c0..dc36d12 100755
--- a/phenny
+++ b/phenny
@@ -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 = []