diff options
| author | 2019-06-10 10:45:02 +0100 | |
|---|---|---|
| committer | 2019-06-10 10:45:02 +0100 | |
| commit | 6c5dc958d037907d98dd6edbc4e37f5ac39768ac (patch) | |
| tree | a93470e32b894c5cca31b2caf26f763a937ea2e1 /src/IRCLine.py | |
| parent | Allow preprocess.send callbacks to request a line not be sent at all (diff) | |
| signature | ||
Add `.assure()` to ParsedLine, to make it immune from `.valid()`
Diffstat (limited to 'src/IRCLine.py')
| -rw-r--r-- | src/IRCLine.py | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/IRCLine.py b/src/IRCLine.py index 9e1d85fb..c0263d20 100644 --- a/src/IRCLine.py +++ b/src/IRCLine.py @@ -47,6 +47,7 @@ class ParsedLine(object): self.source = source self.tags = {} if tags == None else tags self._valid = True + self._assured = False def __repr__(self): return "ParsedLine(%s)" % self.__str__() @@ -58,6 +59,11 @@ class ParsedLine(object): def invalidate(self): self._valid = False + def assured(self) -> bool: + return self._assured + def assure(self): + self._assured = True + def _tag_str(self, tags: typing.Dict[str, str]) -> str: tag_pieces = [] for tag, value in tags.items(): |
