Add Python version to 'supybot --version' and @version.

This commit is contained in:
Valentin Lorentz 2013-10-27 11:40:10 +01:00
parent 657b76d174
commit b6ea53b07a
2 changed files with 5 additions and 3 deletions

View File

@ -319,8 +319,9 @@ class Misc(callbacks.Plugin):
self.log.info('Couldn\'t get website version: %s', e)
newest = _('I couldn\'t fetch the newest version '
'from the Limnoria repository.')
s = _('The current (running) version of this Supybot is %s. %s') % \
(conf.version, newest)
s = _('The current (running) version of this Supybot is %s, '
'running on Python %s. %s') % \
(conf.version, sys.version, newest)
irc.reply(s)
version = wrap(thread(version))

View File

@ -135,7 +135,8 @@ def main():
if __name__ == '__main__':
parser = optparse.OptionParser(usage='Usage: %prog [options] configFile',
version='Supybot %s' % version)
version='Supybot %s running on Python%s' %
(version, sys.version))
parser.add_option('-P', '--profile', action='store_true', dest='profile',
help='enables profiling')
parser.add_option('-n', '--nick', action='store',