add has_tag() and get_tag() to IRCLine.ParsedLine
This commit is contained in:
parent
31be78db81
commit
51cac7d9b5
1 changed files with 4 additions and 0 deletions
|
@ -66,6 +66,10 @@ class ParsedLine(object):
|
|||
|
||||
def add_tag(self, tag: str, value: str=None):
|
||||
self.tags[tag] = value or ""
|
||||
def has_tag(self, tag: str) -> bool:
|
||||
return "tag" in self.tags
|
||||
def get_tag(self, tag: str) -> typing.Optional[str]:
|
||||
return self.tags[tag]
|
||||
|
||||
def _tag_str(self, tags: typing.Dict[str, str]) -> str:
|
||||
tag_pieces = []
|
||||
|
|
Loading…
Reference in a new issue