diff --git a/core/bot.py b/core/bot.py index 04e32dd..ff0bde7 100644 --- a/core/bot.py +++ b/core/bot.py @@ -221,8 +221,8 @@ class IRCBot(IRCClient): del main.TempChan[self.net] def event(self, **cast): - if not "time" in cast.keys(): - cast["time"] = str(datetime.now().isoformat()) + if not "ts" in cast.keys(): + cast["ts"] = str(datetime.now().isoformat()) # remove odd stuff for i in list(cast.keys()): # Make a copy of the .keys() as Python 3 cannot handle iterating over @@ -699,7 +699,7 @@ class IRCBot(IRCClient): "net": self.net, "num": self.num, "status": "signedon", - "time": ctime, + "ts": ctime, } ) if not self.authenticated: @@ -747,7 +747,7 @@ class IRCBot(IRCClient): self.event(type="kick", muser=kicker, channel=channel, msg=message, user=kickee) def chanlessEvent(self, cast): - cast["time"] = str(datetime.now().isoformat()) + cast["ts"] = str(datetime.now().isoformat()) cast["nick"], cast["ident"], cast["host"] = parsen(cast["muser"]) if dedup(self.name, cast): # Needs to be kept self.name until the dedup # function is converted to the new net, num @@ -834,7 +834,7 @@ class IRCBotFactory(ReconnectingClientFactory): "num": self.num, "status": "lost", "message": error, - "time": ctime, + "ts": ctime, } ) self.retry(connector) @@ -857,7 +857,7 @@ class IRCBotFactory(ReconnectingClientFactory): "num": self.num, "status": "failed", "message": error, - "time": ctime, + "ts": ctime, } ) self.retry(connector) diff --git a/modules/monitor.py b/modules/monitor.py index 8c4681d..f174a80 100644 --- a/modules/monitor.py +++ b/modules/monitor.py @@ -24,7 +24,7 @@ order = [ "realname", "server", "status", - "time", + "ts", ] diff --git a/utils/dedup.py b/utils/dedup.py index f64f26c..dc8d4c3 100644 --- a/utils/dedup.py +++ b/utils/dedup.py @@ -8,8 +8,8 @@ from utils.logging.debug import debug def dedup(numName, b): c = deepcopy(b) - if "time" in c.keys(): - del c["time"] + if "ts" in c.keys(): + del c["ts"] c["approxtime"] = str(datetime.utcnow().timestamp())[: main.config["Tweaks"]["DedupPrecision"]] castHash = siphash24(main.hashKey, dumps(c, sort_keys=True).encode("utf-8")) del c["approxtime"]