mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-25 04:02:46 +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):
|
def __call__(self, irc, msg):
|
||||||
callbacks.Privmsg.__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)
|
L = conf.supybot.plugins.RSS.announce.getValues(fullNames=False)
|
||||||
newFeeds = {}
|
newFeeds = {}
|
||||||
for (channel, v) in L:
|
for (channel, v) in L:
|
||||||
|
@ -824,6 +824,7 @@ class Privmsg(irclib.IrcCallback):
|
|||||||
del args[0]
|
del args[0]
|
||||||
method = getattr(self, name)
|
method = getattr(self, name)
|
||||||
try:
|
try:
|
||||||
|
realname = '%s.%s' % (canonicalname, name)
|
||||||
method(irc, msg, args)
|
method(irc, msg, args)
|
||||||
except (getopt.GetoptError, ArgumentError):
|
except (getopt.GetoptError, ArgumentError):
|
||||||
irc.reply(formatArgumentError(method, name))
|
irc.reply(formatArgumentError(method, name))
|
||||||
@ -939,7 +940,7 @@ class Privmsg(irclib.IrcCallback):
|
|||||||
group.set(value)
|
group.set(value)
|
||||||
|
|
||||||
|
|
||||||
class IrcObjectProxyRegexp(RichReplyMethods):
|
class SimpleProxy(RichReplyMethods):
|
||||||
def __init__(self, irc, msg):
|
def __init__(self, irc, msg):
|
||||||
self.irc = irc
|
self.irc = irc
|
||||||
self.msg = msg
|
self.msg = msg
|
||||||
@ -959,6 +960,7 @@ class IrcObjectProxyRegexp(RichReplyMethods):
|
|||||||
def __getattr__(self, attr):
|
def __getattr__(self, attr):
|
||||||
return getattr(self.irc, attr)
|
return getattr(self.irc, attr)
|
||||||
|
|
||||||
|
IrcObjectProxyRegexp = SimpleProxy
|
||||||
|
|
||||||
class PrivmsgRegexp(Privmsg):
|
class PrivmsgRegexp(Privmsg):
|
||||||
"""A class to allow a person to create regular expression callbacks.
|
"""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.
|
because it's much more easily coded and maintained.
|
||||||
"""
|
"""
|
||||||
flags = re.I
|
flags = re.I
|
||||||
Proxy = IrcObjectProxyRegexp
|
Proxy = SimpleProxy
|
||||||
commandArgs = ['self', 'irc', 'msg', 'match']
|
commandArgs = ['self', 'irc', 'msg', 'match']
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__parent = super(PrivmsgRegexp, self)
|
self.__parent = super(PrivmsgRegexp, self)
|
||||||
@ -1035,7 +1037,7 @@ class PrivmsgCommandAndRegexp(Privmsg):
|
|||||||
flags = re.I
|
flags = re.I
|
||||||
regexps = ()
|
regexps = ()
|
||||||
addressedRegexps = ()
|
addressedRegexps = ()
|
||||||
Proxy = IrcObjectProxyRegexp
|
Proxy = SimpleProxy
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
self.__parent = super(PrivmsgCommandAndRegexp, self)
|
self.__parent = super(PrivmsgCommandAndRegexp, self)
|
||||||
self.__parent.__init__()
|
self.__parent.__init__()
|
||||||
|
Loading…
Reference in New Issue
Block a user