scope fixes; moved VERSION to conf()
This commit is contained in:
@@ -18,6 +18,8 @@ config['hist_max_time'] = 10 * 60
|
|||||||
config['uptime'] = -time.time()
|
config['uptime'] = -time.time()
|
||||||
config['request_counter'] = 0
|
config['request_counter'] = 0
|
||||||
|
|
||||||
|
config['version'] = None
|
||||||
|
|
||||||
|
|
||||||
# the "dice" feature will use more efficient random data (0) for given users
|
# the "dice" feature will use more efficient random data (0) for given users
|
||||||
config['enhanced-random-user'] = ( 'FIXME', 'FIXME' )
|
config['enhanced-random-user'] = ( 'FIXME', 'FIXME' )
|
||||||
|
|||||||
@@ -110,7 +110,7 @@ def command_version(args):
|
|||||||
|
|
||||||
if 'version' in args['data']:
|
if 'version' in args['data']:
|
||||||
return {
|
return {
|
||||||
'msg': args['reply_user'] + (''': I'm running ''' + VERSION)
|
'msg': args['reply_user'] + (''': I'm running ''' + conf('version'))
|
||||||
}
|
}
|
||||||
|
|
||||||
def command_unicode(args):
|
def command_unicode(args):
|
||||||
|
|||||||
@@ -244,8 +244,8 @@ plugins.time = time
|
|||||||
plugins.register_all()
|
plugins.register_all()
|
||||||
|
|
||||||
if '__main__' == __name__:
|
if '__main__' == __name__:
|
||||||
VERSION = get_version_git()
|
set_conf('version', get_version_git())
|
||||||
print sys.argv[0] + ' ' + VERSION
|
print sys.argv[0] + ' ' + conf('version')
|
||||||
|
|
||||||
if not os.path.exists(fifo_path):
|
if not os.path.exists(fifo_path):
|
||||||
logger('error', 'fifo_path "%s" does not exist, exiting' % fifo_path)
|
logger('error', 'fifo_path "%s" does not exist, exiting' % fifo_path)
|
||||||
|
|||||||
Reference in New Issue
Block a user