From 8368589950334bd6bf52bad813b26b0ccc7d5198 Mon Sep 17 00:00:00 2001 From: Thorsten S Date: Mon, 21 Dec 2015 00:12:10 +0100 Subject: [PATCH] fix uptime (moved to runtime config) --- idlebot.py | 2 ++ local_config.ini.spec | 3 --- persistent_config.ini.spec | 1 + 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/idlebot.py b/idlebot.py index bafbf2a..a6d10ab 100755 --- a/idlebot.py +++ b/idlebot.py @@ -95,6 +95,8 @@ def start(botclass, active=False): bot.register_plugin('xep_0045') bot.process() + config.runtimeconf_set('start_time', -time.time()) + while 1: try: # print("hangup: %s" % got_hangup) diff --git a/local_config.ini.spec b/local_config.ini.spec index f7b754b..0d1c2a6 100644 --- a/local_config.ini.spec +++ b/local_config.ini.spec @@ -11,9 +11,6 @@ bot_owner = string hist_max_count = integer(default=5) hist_max_time = integer(default=10*60) -# statistics -uptime = integer(default=0) - persistent_storage = string(default='urlbot.persistent') persistent_locked = boolean(default=false) diff --git a/persistent_config.ini.spec b/persistent_config.ini.spec index 7286261..712c42f 100644 --- a/persistent_config.ini.spec +++ b/persistent_config.ini.spec @@ -1,5 +1,6 @@ other_bots = string_list(default=list()) request_counter = integer(default=0) +start_time = integer(default=0) [plugins] [[info]]