summaryrefslogtreecommitdiffstats
path: root/bot.py
diff options
context:
space:
mode:
authorSean B. Palmer <sbp@aldebaran.local>2011-03-10 13:41:02 +0000
committerSean B. Palmer <sbp@aldebaran.local>2011-03-10 13:41:02 +0000
commit5bc5662108b84def160043302188e3ade768e05b (patch)
tree31c8f09ed7a3eff4b9b157b7daa2c5fa71a14f8f /bot.py
parentecb8af1bbea0dee31903b1e962c0b731f2d36318 (diff)
downloadbot-5bc5662108b84def160043302188e3ade768e05b.tar.gz
bot-5bc5662108b84def160043302188e3ade768e05b.tar.bz2
bot-5bc5662108b84def160043302188e3ade768e05b.zip
Couple of fixes from ayust on github, thanks
Diffstat (limited to 'bot.py')
-rwxr-xr-xbot.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/bot.py b/bot.py
index 7cfc76c..e71aa96 100755
--- a/bot.py
+++ b/bot.py
@@ -40,7 +40,6 @@ class Phenny(irc.Bot):
else:
for fn in self.config.enable:
filenames.append(os.path.join(home, 'modules', fn + '.py'))
- # @@ exclude
if hasattr(self.config, 'extra'):
for fn in self.config.extra:
@@ -52,8 +51,10 @@ class Phenny(irc.Bot):
filenames.append(os.path.join(fn, n))
modules = []
+ excluded_modules = getattr(self.config, 'exclude', [])
for filename in filenames:
name = os.path.basename(filename)[:-3]
+ if name in excluded_modules: continue
try: module = imp.load_source(name, filename)
except Exception, e:
print >> sys.stderr, "Error loading %s: %s (in bot.py)" % (name, e)