diff options
| author | 2019-06-03 13:30:39 +0100 | |
|---|---|---|
| committer | 2019-06-03 13:30:39 +0100 | |
| commit | ef221f41658286968d709487ef25a8dcee48173d (patch) | |
| tree | 28ae5c76632097d1c93c1f00e81019854f90f8f1 /src/utils | |
| parent | Bump resume back down to `draft/resume-0.4` (from `draft/resume-0.5`) for now (diff) | |
| signature | ||
v1.8.0 release
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/irc/__init__.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils/irc/__init__.py b/src/utils/irc/__init__.py index 5a6fb69b..9577bcc1 100644 --- a/src/utils/irc/__init__.py +++ b/src/utils/irc/__init__.py @@ -45,7 +45,7 @@ def message_tag_unescape(s): def parse_line(line: str) -> IRCLine.ParsedLine: tags = {} # type: typing.Dict[str, typing.Any] - prefix = None # type: typing.Optional[IRCLine.Hostmask] + source = None # type: typing.Optional[IRCLine.Hostmask] command = None if line[0] == "@": @@ -65,8 +65,8 @@ def parse_line(line: str) -> IRCLine.ParsedLine: trailing = trailing_split if line[0] == ":": - prefix_str, line = line[1:].split(" ", 1) - prefix = seperate_hostmask(prefix_str) + source_str, line = line[1:].split(" ", 1) + source = seperate_hostmask(source_str) command, sep, line = line.partition(" ") args = [] # type: typing.List[str] @@ -77,7 +77,7 @@ def parse_line(line: str) -> IRCLine.ParsedLine: if not trailing == None: args.append(typing.cast(str, trailing)) - return IRCLine.ParsedLine(command, args, prefix, tags) + return IRCLine.ParsedLine(command, args, source, tags) REGEX_COLOR = re.compile("%s(?:(\d{1,2})(?:,(\d{1,2}))?)?" % utils.consts.COLOR) |
