From 0fc03fd592380af7b85447f4173e3504aa1c5114 Mon Sep 17 00:00:00 2001 From: jesopo Date: Mon, 10 Jun 2019 10:11:31 +0100 Subject: Allow preprocess.send callbacks to request a line not be sent at all --- src/IRCLine.py | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/IRCLine.py') diff --git a/src/IRCLine.py b/src/IRCLine.py index e22a79ad..9e1d85fb 100644 --- a/src/IRCLine.py +++ b/src/IRCLine.py @@ -46,12 +46,18 @@ class ParsedLine(object): self.args = IRCArgs(args) self.source = source self.tags = {} if tags == None else tags + self._valid = True def __repr__(self): return "ParsedLine(%s)" % self.__str__() def __str__(self): return self.format() + def valid(self) -> bool: + return self._valid + def invalidate(self): + self._valid = False + def _tag_str(self, tags: typing.Dict[str, str]) -> str: tag_pieces = [] for tag, value in tags.items(): -- cgit v1.3.1-10-gc9f91