Permalink
Browse files

CommandsRegistry and RoutesRegistry merged into RegistryDictionary

  • Loading branch information...
1 parent e4e5160 commit f5a4d456863da0f1573a4814d2d7de8da0d48623 @ojii ojii committed Dec 27, 2011
Showing with 3 additions and 10 deletions.
  1. +3 −10 ircbotframework/plugin.py
View
13 ircbotframework/plugin.py
@@ -1,23 +1,16 @@
# -*- coding: utf-8 -*-
from ircbotframework.utils import get_plugin_conf_key
-class CommandsRegistry(dict):
+class RegistryDictionary(dict):
def __call__(self, name):
def decorator(meth):
self[name] = meth
return decorator
-class RoutesRegistry(dict):
- def __call__(self, route):
- def decorator(meth):
- self[route] = meth
- return decorator
-
-
class BasePlugin(object):
- commands = CommandsRegistry()
- routes = RoutesRegistry()
+ commands = RegistryDictionary()
+ routes = RegistryDictionary()
conf_key = None
default_confs = None
required_confs = None

0 comments on commit f5a4d45

Please sign in to comment.