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()))