diff options
| author | 2018-11-04 17:03:01 +0000 | |
|---|---|---|
| committer | 2018-11-04 17:03:01 +0000 | |
| commit | 52aa8a51a6a88e68a6923c18c75d27f14efd890b (patch) | |
| tree | 0593bdc88619fa92e044f82dcd6ceecf30cdde6a /src | |
| parent | Fix typo in utils.irc (diff) | |
| signature | ||
Move definition of IRCArgs above IRCLine
Diffstat (limited to 'src')
| -rw-r--r-- | src/utils/irc.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/utils/irc.py b/src/utils/irc.py index 9eb8e06b..8e628939 100644 --- a/src/utils/irc.py +++ b/src/utils/irc.py @@ -52,14 +52,6 @@ def seperate_hostmask(hostmask: str) -> IRCHostmask: username, _, hostname = username.partition("@") return IRCHostmask(nickname, username, hostname, hostmask) -class IRCLine(object): - def __init__(self, tags: dict, prefix: typing.Optional[str], command: str, - args: IRCArgs): - self.tags = tags - self.prefix = prefix - self.command = command - self.args = args - class IRCArgs(object): def __init__(self, args: typing.List[str]): self._args = args @@ -70,6 +62,14 @@ class IRCArgs(object): return self._args[index] return None +class IRCLine(object): + def __init__(self, tags: dict, prefix: typing.Optional[str], command: str, + args: IRCArgs): + self.tags = tags + self.prefix = prefix + self.command = command + self.args = args + def parse_line(line: str) -> IRCLine: tags = {} prefix = typing.Optional[IRCHostmask] |
