diff --git a/plugins/Http.py b/plugins/Http.py index a5b1de0b5..53e6c6f2b 100644 --- a/plugins/Http.py +++ b/plugins/Http.py @@ -49,13 +49,11 @@ import structures example = utils.wrapLines(""" @list Http - acronym, babelize, deepthought, foldoc, freshmeat, geekquote, netcraft, randomlanguage, stockquote, title, translate, weather + acronym, babelize, deepthought, freshmeat, geekquote, netcraft, randomlanguage, stockquote, title, translate, weather @acronym ASAP ASAP could be As Soon As Possible, or A Simplified Asset (disposal) Procedure, or A Stupid Acting Person (Dilbert comic strip), or Academic Strategic Alliances Program, or Accelerated Situational Awareness Prototype, or Accelerated Systems Applications and Products (data processing), or Acquisitions Strategies and Plans, or Administrative Services Automation Program, or Administrative Services Automation Project @deepthought #331: Probably one of the worst things about being a genie in a magic lamp is a little thing called "lamp stench." - @foldoc perl - < language , tool > A high-level programming language, started by Larry Wall in 1987 and developed as an open source project. It has an eclectic heritage, deriving from the ubiquitous C programming language and to a lesser extent from sed , awk , various Unix shell languages, Lisp , and at least a dozen other tools and languages. Originally developed for Unix , it is now available for many platforms . @freshmeat supybot SupyBot, last updated 2002-08-02 19:07:52, with a vitality percent of 0.00 and a popularity of 0.09, is in version 0.36.1. (yeah, I haven't updated that in awhile :)) @@ -191,39 +189,6 @@ class Http(callbacks.Privmsg): irc.error(msg, m) return - def foldoc(self, irc, msg, args): - """ - - FOLDOC is a searchable dictionary of acryonyms, jargon, programming - languages, tools, architecture, operating systems, networking, theory, - conventions, standards, methamatics, telecoms, electronics, history, - in fact anything having to do with computing. This commands searches - that dictionary. - """ - if not args: - raise callbacks.ArgumentError - search = '+'.join([urllib.quote(arg) for arg in args]) - url = 'http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=%s' % search - try: - fd = urllib2.urlopen(url) - html = fd.read() - fd.close() - except Exception, e: - irc.error(msg, debug.exnToString(e)) - return - text = html.split('

\n', 2)[1] - text = text.replace('.\n', '. ') - text = text.replace('\n', ' ') - text = utils.htmlToText(text) - text = text.strip() - if text: - irc.reply(msg, text) - else: - search = urllib.unquote(search) - s = 'There appears to be no definition for %s.' % search - irc.reply(msg, s) - - _cityregex = re.compile( r''\ r'(.*?), (.*?),(.*?)', re.IGNORECASE) diff --git a/test/test_Http.py b/test/test_Http.py index db91f9d46..b2d16ebf8 100644 --- a/test/test_Http.py +++ b/test/test_Http.py @@ -48,9 +48,6 @@ class HttpTest(PluginTestCase, PluginDocumentation): self.assertResponse('title http://www.slashdot.org/', 'Slashdot: News for nerds, stuff that matters') - def testFoldoc(self): - self.assertNotError('foldoc perl') - def testGeekquote(self): self.assertNotError('geekquote') self.assertNotError('geekquote multiline')