mirror of
https://github.com/progval/Limnoria.git
synced 2025-05-01 07:51:06 -05:00
SnarfIrc needs a helpful getattr
This commit is contained in:
parent
b76ed61d5b
commit
7e1184f47d
@ -170,14 +170,14 @@ class UrlSnarfThread(threading.Thread):
|
|||||||
world.threadsSpawned += 1
|
world.threadsSpawned += 1
|
||||||
threading.Thread.__init__(self, *args, **kwargs)
|
threading.Thread.__init__(self, *args, **kwargs)
|
||||||
self.setDaemon(True)
|
self.setDaemon(True)
|
||||||
|
|
||||||
class SnarfQueue(ircutils.FloodQueue):
|
class SnarfQueue(ircutils.FloodQueue):
|
||||||
def key(self, channel):
|
def key(self, channel):
|
||||||
return channel
|
return channel
|
||||||
|
|
||||||
def getTimeout(self):
|
def getTimeout(self):
|
||||||
return conf.supybot.snarfThrottle()
|
return conf.supybot.snarfThrottle()
|
||||||
|
|
||||||
_snarfed = SnarfQueue()
|
_snarfed = SnarfQueue()
|
||||||
|
|
||||||
class SnarfIrc(object):
|
class SnarfIrc(object):
|
||||||
@ -190,6 +190,9 @@ class SnarfIrc(object):
|
|||||||
_snarfed.enqueue(self.channel, self.url)
|
_snarfed.enqueue(self.channel, self.url)
|
||||||
self.irc.reply(*args, **kwargs)
|
self.irc.reply(*args, **kwargs)
|
||||||
|
|
||||||
|
def __getattr__(self, attr):
|
||||||
|
return getattr(self.irc, attr)
|
||||||
|
|
||||||
def urlSnarfer(f):
|
def urlSnarfer(f):
|
||||||
"""Protects the snarfer from loops and whatnot."""
|
"""Protects the snarfer from loops and whatnot."""
|
||||||
f = _threadedWrapMethod(f)
|
f = _threadedWrapMethod(f)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user