diff --git a/plugins/RSS.py b/plugins/RSS.py index 93db960b3..234b671fc 100644 --- a/plugins/RSS.py +++ b/plugins/RSS.py @@ -114,7 +114,7 @@ class RSS(callbacks.Privmsg): def __call__(self, irc, msg): callbacks.Privmsg.__call__(self, irc, msg) - irc = callbacks.IrcObjectProxyRegexp(irc, msg) + irc = callbacks.SimpleProxy(irc, msg) L = conf.supybot.plugins.RSS.announce.getValues(fullNames=False) newFeeds = {} for (channel, v) in L: diff --git a/src/callbacks.py b/src/callbacks.py index 82685eb8d..63329be4e 100644 --- a/src/callbacks.py +++ b/src/callbacks.py @@ -824,6 +824,7 @@ class Privmsg(irclib.IrcCallback): del args[0] method = getattr(self, name) try: + realname = '%s.%s' % (canonicalname, name) method(irc, msg, args) except (getopt.GetoptError, ArgumentError): irc.reply(formatArgumentError(method, name)) @@ -939,7 +940,7 @@ class Privmsg(irclib.IrcCallback): group.set(value) -class IrcObjectProxyRegexp(RichReplyMethods): +class SimpleProxy(RichReplyMethods): def __init__(self, irc, msg): self.irc = irc self.msg = msg @@ -959,6 +960,7 @@ class IrcObjectProxyRegexp(RichReplyMethods): def __getattr__(self, attr): return getattr(self.irc, attr) +IrcObjectProxyRegexp = SimpleProxy class PrivmsgRegexp(Privmsg): """A class to allow a person to create regular expression callbacks. @@ -981,7 +983,7 @@ class PrivmsgRegexp(Privmsg): because it's much more easily coded and maintained. """ flags = re.I - Proxy = IrcObjectProxyRegexp + Proxy = SimpleProxy commandArgs = ['self', 'irc', 'msg', 'match'] def __init__(self): self.__parent = super(PrivmsgRegexp, self) @@ -1035,7 +1037,7 @@ class PrivmsgCommandAndRegexp(Privmsg): flags = re.I regexps = () addressedRegexps = () - Proxy = IrcObjectProxyRegexp + Proxy = SimpleProxy def __init__(self): self.__parent = super(PrivmsgCommandAndRegexp, self) self.__parent.__init__()