From 7e1184f47d0ab5794bb4a3638df277656e93c1c0 Mon Sep 17 00:00:00 2001 From: James Vega Date: Thu, 9 Sep 2004 03:01:12 +0000 Subject: [PATCH] SnarfIrc needs a helpful getattr --- src/privmsgs.py | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/src/privmsgs.py b/src/privmsgs.py index a74cdff2e..dadf1ceea 100644 --- a/src/privmsgs.py +++ b/src/privmsgs.py @@ -170,14 +170,14 @@ class UrlSnarfThread(threading.Thread): world.threadsSpawned += 1 threading.Thread.__init__(self, *args, **kwargs) self.setDaemon(True) - + class SnarfQueue(ircutils.FloodQueue): def key(self, channel): return channel def getTimeout(self): return conf.supybot.snarfThrottle() - + _snarfed = SnarfQueue() class SnarfIrc(object): @@ -190,6 +190,9 @@ class SnarfIrc(object): _snarfed.enqueue(self.channel, self.url) self.irc.reply(*args, **kwargs) + def __getattr__(self, attr): + return getattr(self.irc, attr) + def urlSnarfer(f): """Protects the snarfer from loops and whatnot.""" f = _threadedWrapMethod(f)