chiark / gitweb /
only look at the URL argument of ~url
authorMatthew Vernon <matthew@rapun.sel.cam.ac.uk>
Mon, 7 Jun 2010 10:52:35 +0000 (11:52 +0100)
committerMatthew Vernon <matthew@rapun.sel.cam.ac.uk>
Mon, 7 Jun 2010 10:52:35 +0000 (11:52 +0100)
commands.py

index c6f27770b539e158ab71d622908e34816bdc6138..b669ba3a92f62718d1f4b7674c3d2f9a7fc32c69 100644 (file)
@@ -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" % \