diff options
| author | 2018-11-12 17:13:49 +0000 | |
|---|---|---|
| committer | 2018-11-12 17:13:49 +0000 | |
| commit | 2747999ca64fbddd6dedec78fb063bbecf648030 (patch) | |
| tree | cdb57f4e6004a3643f7e068e38fcce7944d1e52a /src/utils | |
| parent | Remove no-longer-used Regexes in modules/line_handler.py (diff) | |
| signature | ||
We don't need utils.irc.remove_colon anymore!
Diffstat (limited to 'src/utils')
| -rw-r--r-- | src/utils/irc.py | 8 |
1 files changed, 1 insertions, 7 deletions
diff --git a/src/utils/irc.py b/src/utils/irc.py index adbd638e..b448a227 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -7,11 +7,6 @@ STRICT_RFC1459_LOWER = ASCII_LOWER+r'|{}' RFC1459_UPPER = STRICT_RFC1459_UPPER+"^" RFC1459_LOWER = STRICT_RFC1459_LOWER+"~" -def remove_colon(s: str) -> str: - if s.startswith(":"): - s = s[1:] - return s - MULTI_REPLACE_ITERABLE = typing.Iterable[str] # case mapping lowercase/uppcase logic def _multi_replace(s: str, @@ -47,7 +42,6 @@ class IRCHostmask(object): return self.hostmask def seperate_hostmask(hostmask: str) -> IRCHostmask: - hostmask = remove_colon(hostmask) nickname, _, username = hostmask.partition("!") username, _, hostname = username.partition("@") return IRCHostmask(nickname, username, hostname, hostmask) @@ -112,7 +106,7 @@ def parse_line(line: str) -> IRCLine: if line[0] == ":": prefix_str, line = line[1:].split(" ", 1) - prefix = seperate_hostmask(prefix_str) + prefix = seperate_hostmask(prefix_str[1:]) args = [] command, sep, line = line.partition(" ") |
