mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-27 05:09:23 +01:00
Made uptime command not based on loading of FunCommands module.
This commit is contained in:
parent
c31167ed3f
commit
10a0fe9f93
@ -95,7 +95,6 @@ class FunCommands(callbacks.Privmsg):
|
||||
self.recvdMsgs = 0
|
||||
self.sentBytes = 0
|
||||
self.recvdBytes = 0
|
||||
self._startTime = time.time()
|
||||
|
||||
def inFilter(self, irc, msg):
|
||||
self.recvdMsgs += 1
|
||||
@ -309,7 +308,7 @@ class FunCommands(callbacks.Privmsg):
|
||||
|
||||
def uptime(self, irc, msg, args):
|
||||
"takes no arguments"
|
||||
elapsed = time.time() - self._startTime
|
||||
elapsed = time.time() - world.startedAt
|
||||
days, elapsed = elapsed // 86400, elapsed % 86400
|
||||
hours, elapsed = elapsed // 3600, elapsed % 3600
|
||||
minutes, seconds = elapsed // 60, elapsed % 60
|
||||
|
@ -36,14 +36,18 @@ Main program file for running the bot.
|
||||
from fix import *
|
||||
|
||||
import sys
|
||||
import time
|
||||
import email
|
||||
import getopt
|
||||
#import pprint
|
||||
|
||||
import conf
|
||||
import world
|
||||
|
||||
sys.path.append(conf.pluginDir)
|
||||
|
||||
world.startedAt = time.time()
|
||||
|
||||
class ConfigurationDict(dict):
|
||||
def __init__(self, L=None):
|
||||
if L is not None:
|
||||
|
Loading…
Reference in New Issue
Block a user