diff --git a/src/Misc.py b/src/Misc.py index e408f3911..033ca7d01 100755 --- a/src/Misc.py +++ b/src/Misc.py @@ -205,7 +205,17 @@ class Misc(callbacks.Privmsg): 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): """[]