update snarfuri to exclude command-line lines

* Exclude lines from being matched by snarfuri that begin with .
* Enable posted time display by the posted module
master
mutantmonkey 2014-04-08 23:45:34 -07:00
parent b20e921932
commit 5d50d54671
2 changed files with 5 additions and 7 deletions

View File

@ -88,12 +88,12 @@ noteuri.priority = 'low'
def snarfuri(phenny, input):
uri = input.group(1)
uri = input.group(2)
title = gettitle(phenny, input, uri)
if title:
phenny.msg(input.sender, title)
snarfuri.rule = r'.*(http[s]?://[^<> "\x01]+)[,.]?'
snarfuri.rule = r'([^\.].*)?(http[s]?://[^<> "\x01]+)[,.]?'
snarfuri.priority = 'low'
snarfuri.thread = True

View File

@ -61,9 +61,7 @@ def posted(phenny, input):
posted = check_posted(phenny, input, url)
if posted:
# when the day comes when you can inhibit snarfuri if modules are called
# phenny.reply("URL was posted {0}".format(posted))
pass
phenny.reply("URL was posted {0}".format(posted))
else:
phenny.reply("I don't remember seeing this URL in this channel.")