aboutsummaryrefslogtreecommitdiff
path: root/src/IRCLine.py
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-10 10:11:31 +0100
committerGravatar jesopo2019-06-10 10:11:31 +0100
commit0fc03fd592380af7b85447f4173e3504aa1c5114 (patch)
tree87701601d4faaf0929ab51a335934604afa02b73 /src/IRCLine.py
parentUpdate CHANGELOG, v1.9.2 release (diff)
signature
Allow preprocess.send callbacks to request a line not be sent at all
Diffstat (limited to 'src/IRCLine.py')
-rw-r--r--src/IRCLine.py6
1 files changed, 6 insertions, 0 deletions
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():