aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--IRCBot.py1
-rw-r--r--modules/stats.py3
2 files changed, 2 insertions, 2 deletions
diff --git a/IRCBot.py b/IRCBot.py
index 76d6e304..c9306a4a 100644
--- a/IRCBot.py
+++ b/IRCBot.py
@@ -5,6 +5,7 @@ import ModuleManager, Timer
class Bot(object):
def __init__(self):
+ self.start_time = time.time()
self.lock = threading.Lock()
self.args = None
self.database = None
diff --git a/modules/stats.py b/modules/stats.py
index 658f058e..c7821556 100644
--- a/modules/stats.py
+++ b/modules/stats.py
@@ -3,7 +3,6 @@ import Utils
class Module(object):
def __init__(self, bot, events, exports):
- self.boot_time = time.time()
self.bot = bot
events.on("received").on("command").on("uptime"
).hook(self.uptime, help="Show my uptime")
@@ -11,7 +10,7 @@ class Module(object):
).hook(self.stats, help="Show my network/channel/user stats")
def uptime(self, event):
- seconds = int(time.time()-self.boot_time)
+ seconds = int(time.time()-self.bot.start_time)
event["stdout"].write("Uptime: %s" % Utils.to_pretty_time(
seconds))