Rename time to ts

This commit is contained in:
2022-07-21 13:39:54 +01:00
parent 4734a271a1
commit 2177766d90
3 changed files with 9 additions and 9 deletions

View File

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