Permalink
Browse files

Fix the plugin utils plugin.

  • Loading branch information...
1 parent 670fb72 commit fffa55e79438fc8a8db8afe56c0aa7432f233519 @mythmon mythmon committed with Mike Cooper Aug 17, 2011
Showing with 5 additions and 10 deletions.
  1. +5 −10 hamper/plugins/plugin_utils.py
View
15 hamper/plugins/plugin_utils.py
@@ -9,15 +9,10 @@
class PluginUtils(Plugin):
name = 'plugins'
-
- def process(self, bot, comm):
- if re.match('^plugins?', comm['message']):
- comm['message'] = comm['message'].split(' ', 1)[1]
- super(PluginUtils, self).process(bot, comm)
-
+ priority = 0
class ListPlugins(Command):
- regex = r'(^$)|(^list$)'
+ regex = r'^plugins?(?: list)?$'
def command(self, bot, comm, groups):
"""Reply with a list of all currently loaded plugins."""
@@ -26,7 +21,7 @@ def command(self, bot, comm, groups):
return True
class ReloadPlugins(Command):
- regex = r'^reload (.*)$'
+ regex = r'^plugins? reload (.*)$'
def command(self, bot, comm, groups):
"""Reload a named plugin."""
name = groups[0]
@@ -49,7 +44,7 @@ def command(self, bot, comm, groups):
return True
class LoadPlugin(Command):
- regex = r'^load (.*)$'
+ regex = r'^plugins? load (.*)$'
def command(self, bot, comm, groups):
"""Load a named plugin."""
name = ' '.join(args[1:])
@@ -66,7 +61,7 @@ def command(self, bot, comm, groups):
return True
class UnloadPlugin(Command):
- regex = r'^unload (.*)$'
+ regex = r'^plugins? unload (.*)$'
def unloadPlugin(self, bot, comm, groups):
"""Unload a named plugin."""
name = groups[0]

0 comments on commit fffa55e

Please sign in to comment.