diff --git a/plugins/Http.py b/plugins/Http.py
index 18815dfcc..b03bb320e 100644
--- a/plugins/Http.py
+++ b/plugins/Http.py
@@ -66,7 +66,10 @@ class Http(callbacks.Privmsg):
_fmPopular=re.compile('([^<]+)')
_fmLastUpdated = re.compile('([^<]+)')
def freshmeat(self, irc, msg, args):
- """"""
+ """
+
+ Returns Freshmeat data about a given project.
+ """
project = privmsgs.getArgs(args)
url = 'http://www.freshmeat.net/projects-xml/%s' % project
try:
@@ -91,7 +94,11 @@ class Http(callbacks.Privmsg):
irc.reply(msg, debug.exnToString(e))
def stockquote(self, irc, msg, args):
- """"""
+ """
+
+ Gets the information about the current price and change from the
+ previous day of a given compny (represented by a stock symbol).
+ """
symbol = privmsgs.getArgs(args)
url = 'http://finance.yahoo.com/d/quotes.csv?s=%s'\
'&f=sl1d1t1c1ohgv&e=.csv' % symbol
@@ -116,7 +123,14 @@ class Http(callbacks.Privmsg):
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.
+ """
search = '+'.join([urllib.quote(arg) for arg in args])
url = 'http://foldoc.doc.ic.ac.uk/foldoc/foldoc.cgi?query=%s' % search
try:
@@ -135,10 +149,15 @@ class Http(callbacks.Privmsg):
_gkgames = re.compile(r's: (\d+) | ')
_gkrecord = re.compile(r'"#FFFF00">(\d+)[^"]+"#FFFF00">(\d+)[^"]+'\
'"#FFFF00">(\d+)')
- _gkteam = re.compile('Team:\s+(.*?)\s+Last time')
- _gkseen = re.compile('seen on GK:\s+([^[]+)')
+ _gkteam = re.compile(r'Team:\s+(.*?)\s+Last time')
+ _gkseen = re.compile(r'seen on GK:\s+([^[]+)\s*')
def gkstats(self, irc, msg, args):
- """"""
+ """
+
+ Returns the stats Gameknot keeps on . Gameknot is an online
+ website for playing chess (rather similar to correspondence chess, just
+ somewhat faster) against players from all over the world.
+ """
name = privmsgs.getArgs(args)
gkprofile = 'http://www.gameknot.com/stats.pl?%s' % name
try:
@@ -173,7 +192,10 @@ class Http(callbacks.Privmsg):
_zipcode = re.compile(r'Local Forecast for (.*), (.*?) ')
def zipcode(self, irc, msg, args):
- """"""
+ """
+
+ Returns the city and state of a given US Zip code.
+ """
zip = privmsgs.getArgs(args)
url = "http://www.weather.com/weather/local/%s?lswe=%s" % (zip, zip)
try:
@@ -192,7 +214,10 @@ class Http(callbacks.Privmsg):
_condregex = re.compile('CLASS=obsInfo2>(.*)',\
re.IGNORECASE)
def weather(self, irc, msg, args):
- """"""
+ """
+
+ Returns the approximate weather conditions at a given US Zip code.
+ """
zip = privmsgs.getArgs(args)
url = "http://www.weather.com/weather/local/%s?lswe=%s" % (zip, zip)
try:
@@ -209,7 +234,11 @@ class Http(callbacks.Privmsg):
_slashdotTime = 0.0
def slashdot(self, irc, msg, args):
- """takes no arguments"""
+ """takes no arguments
+
+ Returns the current headlines on slashdot.org, News for Nerds, Stuff
+ that Matters.
+ """
if time.time() - self._slashdotTime > 1800:
try:
fd = urllib2.urlopen('http://slashdot.org/slashdot.xml')
@@ -228,7 +257,12 @@ class Http(callbacks.Privmsg):
_geekquotere = re.compile('(.*?)
')
def geekquote(self, irc, msg, args):
- "[]"
+ """[]
+
+ Returns a random geek quote from bash.org; the optional argument
+ specifies whether multi-line quotes (which are longer
+ than other quotes, generally) are to be allowed.
+ """
multiline = privmsgs.getArgs(args, needed=0, optional=1)
try:
fd = urllib2.urlopen('http://bash.org/?random1')
@@ -252,7 +286,8 @@ class Http(callbacks.Privmsg):
def acronym(self, irc, msg, args):
"""
- Displays the first 5 matches from acronymfinder.com"""
+ Displays the first 5 acronym matches from acronymfinder.com
+ """
acronym = privmsgs.getArgs(args)
try:
url = 'http://www.acronymfinder.com/' \
@@ -274,7 +309,11 @@ class Http(callbacks.Privmsg):
_netcraftre = re.compile(r'whatos text -->(.*?)"""
+ """
+
+ Returns Netcraft.com's determination of what operating system and
+ webserver is running on the host given.
+ """
hostname = privmsgs.getArgs(args)
url = 'http://uptime.netcraft.com/up/graph/?host=%s' % hostname
fd = urllib2.urlopen(url)