From 713df0f0d898d140ceac7f68657eda613c494034 Mon Sep 17 00:00:00 2001 From: Kunal Mehta Date: Mon, 21 Oct 2013 14:17:31 -0700 Subject: [PATCH] EWW WHY --- earwigbot/commands/lag.py | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/earwigbot/commands/lag.py b/earwigbot/commands/lag.py index cefafcc..28e2094 100644 --- a/earwigbot/commands/lag.py +++ b/earwigbot/commands/lag.py @@ -23,6 +23,8 @@ from earwigbot import exceptions from earwigbot.commands import Command +old = 99999999999999999999999 + class Lag(Command): """Return replag or maxlag information on specific databases.""" name = "lag" @@ -32,17 +34,22 @@ class Lag(Command): site = self.get_site(data) if not site: return + replag = self.get_replag(site) if data.command == "replag": base = "\x0302{0}\x0F: {1}." - msg = base.format(site.name, self.get_replag(site)) + msg = base.format(site.name, replag) elif data.command == "maxlag": base = "\x0302{0}\x0F: {1}." msg = base.format(site.name, self.get_maxlag(site).capitalize()) else: base = "\x0302{0}\x0F: {1}; {2}." - msg = base.format(site.name, self.get_replag(site), + msg = base.format(site.name, replag, self.get_maxlag(site)) self.reply(data, msg) + global old + if replag > old: + self.reply(data, 'EWW WHY') + old = replag def get_replag(self, site): return "replag is {0}".format(self.time(site.get_replag()))