From: Matthew Vernon Date: Mon, 7 Jun 2010 10:52:35 +0000 (+0100) Subject: only look at the URL argument of ~url X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~matthewv/git?p=irc.git;a=commitdiff_plain;h=f4320bb8956d5bf85b2664b5ddc1ae3ea5a2de0d only look at the URL argument of ~url --- diff --git a/commands.py b/commands.py index c6f2777..b669ba3 100644 --- a/commands.py +++ b/commands.py @@ -334,9 +334,8 @@ def urlq(bot, cmd, nick, conn, public,urldb): bot.automsg(False,nick,"Please use 'url' only with http URLs") return - url="".join(cmd.split(" ")[1:]) - - url=canonical_url(url) + urlstring=urlre.search(command).group(1) + url=canonical_url(urlstring) if (url in urldb): T = urldb[url] complaint="That's %s URL that was first mentioned %s by %s" % \