X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~matthewv/git?p=irc.git;a=blobdiff_plain;f=commands.py;h=db8ace677d2c1a16ebb519d4fd508cdd8fc12dd3;hp=637ec5fddffbbb14f4d1d9c0b5c2b302f2c48753;hb=f735103642de01dab16d0a3bc846d701edda7a64;hpb=9e280b60903fa9ce16809540ec6c8174adb762cd diff --git a/commands.py b/commands.py index 637ec5f..db8ace6 100644 --- a/commands.py +++ b/commands.py @@ -1,5 +1,5 @@ # Part of Acrobat. -import string, cPickle, random, urllib, sys, time, re, os +import string, cPickle, random, urllib, sys, time, re, os, twitter from irclib import irc_lower, nm_to_n # query karma @@ -36,7 +36,7 @@ def karmadelq(bot, cmd, nick, conn, public, karma): # help - provides the URL of the help file def helpq(bot, cmd, nick, conn, public): bot.automsg(public,nick, - "For help see http://www.pick.ucam.org/~matthew/irc/servus.html") + "For help see http://www.chiark.greenend.org.uk/~matthewv/irc/servus.html") # query bot status @@ -233,7 +233,7 @@ def googleq(bot, cmd, nick, conn, public): # Look up the definition of something using google def defineq(bot, cmd, nick, conn, public): cmdrest = string.join(cmd.split()[1:]) - targ = ("http://www.google.com/search?q=define%%3A%s&ie=utf-8&oe=utf-8" + targ = ("http://www.google.co.uk/search?q=define%%3A%s&ie=utf-8&oe=utf-8" % urllib.quote_plus(cmdrest)) try: # Just slurp everything into a string @@ -242,10 +242,11 @@ def defineq(bot, cmd, nick, conn, public): # This is of course going to be a bit fragile. We first look for # 'Definitions of %s on the Web' -- if this isn't present we # assume we have the 'no definitions found page'. - # The first defn starts after the following

tag. + # The first defn starts after the following

tag, but as the + # first

  • in a