mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-24 11:42:52 +01:00
Changed IrcObjectProxyRegexp to SimpleProxy to more accurately show what the deal is.
This commit is contained in:
parent
a2feec9ac0
commit
f349f08111
@ -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:
|
||||
|
@ -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__()
|
||||
|
Loading…
Reference in New Issue
Block a user