Made version look online to find the newest version.

This commit is contained in:
Jeremy Fincher 2004-02-07 12:19:15 +00:00
parent f65c0a6b06
commit 94c16a0bd3

View File

@ -205,7 +205,17 @@ class Misc(callbacks.Privmsg):
Returns the version of the current bot. Returns the version of the current bot.
""" """
irc.reply(conf.version) try:
newest = webutils.getUrl('http://supybot.sf.net/version.txt')
newest = 'The newest version available online is %s.' % version
except webutils.WebError, e:
self.log.warning('Couldn\'t get website version: %r', e)
newest = 'I could\'t fetch the newest version ' \
'from the Supybot website.'
s = 'The current (running) version of this Supybot is %s. %s' % \
(conf.version, newest)
irc.reply(s)
version = privmsgs.thread(version)
def revision(self, irc, msg, args): def revision(self, irc, msg, args):
"""[<module>] """[<module>]