From e7b17f2ccd8f63f16ed472f289a4bfa70c79f66a Mon Sep 17 00:00:00 2001 From: jesopo Date: Fri, 21 Jun 2019 10:33:59 +0100 Subject: [PATCH] give every ParsedLine a uuid4 .id for tracking purposes --- src/IRCLine.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/IRCLine.py b/src/IRCLine.py index 5aae1f53..47a93261 100644 --- a/src/IRCLine.py +++ b/src/IRCLine.py @@ -1,4 +1,4 @@ -import datetime, typing +import datetime, typing, uuid from src import IRCObject, utils # this should be 510 (RFC1459, 512 with \r\n) but a server BitBot uses is broken @@ -41,6 +41,7 @@ class ParsedLine(object): def __init__(self, command: str, args: typing.List[str], source: Hostmask=None, tags: typing.Dict[str, str]=None): + self.id = str(uuid.uuid4()) self.command = command self._args = args self.args = IRCArgs(args)