mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Removed Http.futurama as it's has been made into a supyfact file for the
Lookup plugin.
This commit is contained in:
parent
1f0a21c86a
commit
4a6740fbca
@ -415,33 +415,6 @@ class Http(callbacks.Privmsg):
|
|||||||
]
|
]
|
||||||
irc.reply('; '.join(resp))
|
irc.reply('; '.join(resp))
|
||||||
|
|
||||||
def futurama(self, irc, msg, args):
|
|
||||||
"""[{bender|fry}]
|
|
||||||
|
|
||||||
Returns a random Bender or Fry (from Futurama) quote from Slashdot's
|
|
||||||
HTTP headers. If a name is specified, attempts to return a quote
|
|
||||||
specific to that character.
|
|
||||||
"""
|
|
||||||
name = privmsgs.getArgs(args, required=0, optional=1)
|
|
||||||
fd = webutils.getUrlFd('http://slashdot.org/')
|
|
||||||
try:
|
|
||||||
if not name:
|
|
||||||
if 'X-Bender' in fd.headers:
|
|
||||||
irc.reply('<Bender> %s' % fd.headers['X-Bender'])
|
|
||||||
elif 'X-Fry' in fd.headers:
|
|
||||||
irc.reply('<Fry> %s' % fd.headers['X-Fry'])
|
|
||||||
else:
|
|
||||||
irc.reply('Slashdot seems to be running low on Futurama '
|
|
||||||
'quotes.')
|
|
||||||
else:
|
|
||||||
try:
|
|
||||||
irc.reply('<%s> %s' % (name, fd.headers['X-%s' % name]))
|
|
||||||
except KeyError:
|
|
||||||
irc.reply('Slashdot seems to be running low on %s quotes' %
|
|
||||||
name)
|
|
||||||
finally:
|
|
||||||
fd.close()
|
|
||||||
|
|
||||||
|
|
||||||
Class = Http
|
Class = Http
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user