chiark / gitweb /
output suppressed urls to #urls
authorMatthew Vernon <matthewv@chiark.greenend.org.uk>
Wed, 13 Apr 2011 13:54:12 +0000 (14:54 +0100)
committerMatthew Vernon <matthewv@chiark.greenend.org.uk>
Wed, 13 Apr 2011 13:54:12 +0000 (14:54 +0100)
commands.py

index 6049640..08faf54 100644 (file)
@@ -346,6 +346,11 @@ def urlq(bot, cmd, nick, conn, public,urldb):
       T.count+=1
     bot.automsg(False,nick,complaint)
     T.lastasked=time.time()
+    #URL suppressed, so mention in #urls
+    if urlstring != cmd.split()[1]: #first argument to URL was not the url
+      conn.privmsg("#urls","%s remarks: %s" % (nick," ".join(cmd.split()[1:])))
+    else:
+      conn.privmsg("#urls","(via %s) %s"%(nick," ".join(cmd.split()[1:])))
   else:
     if (public):
       bot.automsg(False,nick,"That URL was unique. There is little point in using !url out loud; please use it via /msg")