Made uptime command not based on loading of FunCommands module.

This commit is contained in:
Jeremy Fincher 2003-04-02 07:50:35 +00:00
parent c31167ed3f
commit 10a0fe9f93
2 changed files with 5 additions and 2 deletions

View File

@ -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

View File

@ -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: