mirror of
https://github.com/Mikaela/Limnoria.git
synced 2025-01-30 14:14:37 +01:00
Let's not bother getting database if it's not a channel. Good call.
This commit is contained in:
parent
ab6d1673f3
commit
ae048d977a
@ -173,18 +173,19 @@ class URL(callbacks.PrivmsgCommandAndRegexp):
|
|||||||
|
|
||||||
def doPrivmsg(self, irc, msg):
|
def doPrivmsg(self, irc, msg):
|
||||||
channel = msg.args[0]
|
channel = msg.args[0]
|
||||||
db = self.getDb(channel)
|
if ircutils.isChannel(channel):
|
||||||
if ircmsgs.isAction(msg):
|
db = self.getDb(channel)
|
||||||
text = ircmsgs.unAction(msg)
|
if ircmsgs.isAction(msg):
|
||||||
else:
|
text = ircmsgs.unAction(msg)
|
||||||
text = msg.args[1]
|
else:
|
||||||
for url in webutils.urlRe.findall(text):
|
text = msg.args[1]
|
||||||
r = self.registryValue('nonSnarfingRegexp', channel)
|
for url in webutils.urlRe.findall(text):
|
||||||
if r and r.search(url):
|
r = self.registryValue('nonSnarfingRegexp', channel)
|
||||||
self.log.debug('Skipping adding %r to db.', url)
|
if r and r.search(url):
|
||||||
continue
|
self.log.debug('Skipping adding %r to db.', url)
|
||||||
self.log.debug('Adding %r to db.', url)
|
continue
|
||||||
db.addUrl(url, msg.nick)
|
self.log.debug('Adding %r to db.', url)
|
||||||
|
db.addUrl(url, msg.nick)
|
||||||
callbacks.PrivmsgCommandAndRegexp.doPrivmsg(self, irc, msg)
|
callbacks.PrivmsgCommandAndRegexp.doPrivmsg(self, irc, msg)
|
||||||
|
|
||||||
def tinyurlSnarfer(self, irc, msg, match):
|
def tinyurlSnarfer(self, irc, msg, match):
|
||||||
|
Loading…
Reference in New Issue
Block a user