mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-28 05:32:51 +01:00
Made version look online to find the newest version.
This commit is contained in:
parent
f65c0a6b06
commit
94c16a0bd3
12
src/Misc.py
12
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):
|
||||
"""[<module>]
|
||||
|
Loading…
Reference in New Issue
Block a user