aboutsummaryrefslogtreecommitdiff
path: root/modules/stats.py
diff options
context:
space:
mode:
authorGravatar dngfx2018-08-31 10:51:47 +0100
committerGravatar dngfx2018-08-31 10:51:47 +0100
commit90ce92dc39395444862edfc7946ef7a1195f2464 (patch)
tree6832c146a15879df292d265083bfe5795cbdfa69 /modules/stats.py
parentReformat (diff)
Revert "Reformat"
This reverts commit abed9cf
Diffstat (limited to 'modules/stats.py')
-rw-r--r--modules/stats.py10
1 files changed, 4 insertions, 6 deletions
diff --git a/modules/stats.py b/modules/stats.py
index fdca481a..09468327 100644
--- a/modules/stats.py
+++ b/modules/stats.py
@@ -1,20 +1,17 @@
import time
import Utils
-
class Module(object):
def __init__(self, bot):
self.boot_time = time.time()
self.bot = bot
bot.events.on("received").on("command").on("uptime"
- ).hook(self.uptime,
- help="Show my uptime")
+ ).hook(self.uptime, help="Show my uptime")
bot.events.on("received").on("command").on("stats"
- ).hook(self.stats,
- help="Show my network/channel/user stats")
+ ).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.boot_time)
event["stdout"].write("Uptime: %s" % Utils.to_pretty_time(
seconds))
@@ -26,6 +23,7 @@ class Module(object):
channels += len(server.channels)
users += len(server.users)
+
response = "I currently have %d network" % networks
if networks > 1:
response += "s"