aboutsummaryrefslogtreecommitdiff
path: root/modules/stats.py
diff options
context:
space:
mode:
authorGravatar dngfx2018-08-31 10:50:37 +0100
committerGravatar dngfx2018-08-31 10:50:37 +0100
commitabed9cf4ea71dcbad2dd2c049683b8d14b942e09 (patch)
tree3e40caf63fa7e1500469f4ad9a0c45c51808aad4 /modules/stats.py
parentFix a copy paste fail in IRCLineHandler that caused PARTs to be handled as QUITs (diff)
signature
Reformat
Diffstat (limited to 'modules/stats.py')
-rw-r--r--modules/stats.py10
1 files changed, 6 insertions, 4 deletions
diff --git a/modules/stats.py b/modules/stats.py
index 09468327..fdca481a 100644
--- a/modules/stats.py
+++ b/modules/stats.py
@@ -1,17 +1,20 @@
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))
@@ -23,7 +26,6 @@ class Module(object):
channels += len(server.channels)
users += len(server.users)
-
response = "I currently have %d network" % networks
if networks > 1:
response += "s"