1
0
mirror of http://aero2k.de/t/repos/urlbot-native.git synced 2017-09-06 15:25:38 +02:00

scope fixes; moved VERSION to conf()

This commit is contained in:
urlbot
2014-09-27 06:12:34 +02:00
parent 7c9e5e154b
commit f411e1be4d
3 changed files with 5 additions and 3 deletions

View File

@@ -18,6 +18,8 @@ config['hist_max_time'] = 10 * 60
config['uptime'] = -time.time()
config['request_counter'] = 0
config['version'] = None
# the "dice" feature will use more efficient random data (0) for given users
config['enhanced-random-user'] = ( 'FIXME', 'FIXME' )

View File

@@ -110,7 +110,7 @@ def command_version(args):
if 'version' in args['data']:
return {
'msg': args['reply_user'] + (''': I'm running ''' + VERSION)
'msg': args['reply_user'] + (''': I'm running ''' + conf('version'))
}
def command_unicode(args):

View File

@@ -244,8 +244,8 @@ plugins.time = time
plugins.register_all()
if '__main__' == __name__:
VERSION = get_version_git()
print sys.argv[0] + ' ' + VERSION
set_conf('version', get_version_git())
print sys.argv[0] + ' ' + conf('version')
if not os.path.exists(fifo_path):
logger('error', 'fifo_path "%s" does not exist, exiting' % fifo_path)