mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 13:19:24 +01:00
Made title snarfer not snarf if the URL is in an addressed message.
This commit is contained in:
parent
af0a4987f4
commit
4786631c6c
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user