Browse files

Only load plugins mentioned in the config file.

  • Loading branch information...
1 parent a1db1fe commit 670fb72ee9609d975f8da646aa9265116bc736ae @mythmon mythmon committed with Mike Cooper Aug 16, 2011
Showing with 11 additions and 1 deletion.
  1. +9 −0 hamper.conf.dist
  2. +2 −1 hamper/commander.py
View
9 hamper.conf.dist
@@ -4,3 +4,12 @@ port: 6667
db: "sqlite:///hamper.db"
channels: ["#awesome-channel", "#cool-channel"]
+plugins:
+ - quit
+ - sed
+ - lmgtfy
+ - friendly
+ - ponies
+ - botsnack
+ - plugins
+
View
3 hamper/commander.py
@@ -142,7 +142,8 @@ def __init__(self, config):
self.db = DBSession()
for _, plugin in retrieve_plugins(IPlugin, 'hamper.plugins').items():
- self.registerPlugin(plugin)
+ if plugin.name in config['plugins']:
+ self.registerPlugin(plugin)
def clientConnectionLost(self, connector, reason):
print "Lost connection (%s)." % (reason)

0 comments on commit 670fb72

Please sign in to comment.