Made title snarfer not snarf if the URL is in an addressed message.

This commit is contained in:
Jeremy Fincher 2004-02-13 21:57:38 +00:00
parent af0a4987f4
commit 4786631c6c

View File

@ -99,12 +99,12 @@ class URL(callbacks.PrivmsgCommandAndRegexp,
_titleRe = re.compile('<title>(.*?)</title>', re.I)
def __init__(self):
self.nextMsgs = {}
callbacks.PrivmsgCommandAndRegexp.__init__(self)
plugins.ChannelDBHandler.__init__(self)
callbacks.PrivmsgCommandAndRegexp.__init__(self)
def die(self):
callbacks.PrivmsgCommandAndRegexp.die(self)
plugins.ChannelDBHandler.die(self)
callbacks.PrivmsgCommandAndRegexp.die(self)
def makeDb(self, filename):
if os.path.exists(filename):
@ -192,6 +192,8 @@ class URL(callbacks.PrivmsgCommandAndRegexp,
r"https?://[^\])>\s]+"
if not ircutils.isChannel(msg.args[0]):
return
if callbacks.addressed(irc.nick, msg):
return
channel = msg.args[0]
if self.registryValue('titleSnarfer', channel):
url = match.group(0)