aboutsummaryrefslogtreecommitdiff
path: root/IRCLineHandler.py
diff options
context:
space:
mode:
authorGravatar jesopo2018-09-06 11:40:43 +0100
committerGravatar jesopo2018-09-06 11:40:43 +0100
commit89f928327bf808b3dbb475e4534cf1c01379ee77 (patch)
tree1cd3bd0322b1a05641554be900a92376bb6b2ddd /IRCLineHandler.py
parentSupport account-tag in permissions.py (diff)
signature
Match " :" for arbitrary instead of ":", to avoid e.g. splitting ipv6 in to
pieces!
Diffstat (limited to 'IRCLineHandler.py')
-rw-r--r--IRCLineHandler.py15
1 files changed, 8 insertions, 7 deletions
diff --git a/IRCLineHandler.py b/IRCLineHandler.py
index b4b5dd11..ed7e1709 100644
--- a/IRCLineHandler.py
+++ b/IRCLineHandler.py
@@ -63,18 +63,19 @@ class LineHandler(object):
tag_split = tag.split("=", 1)
tags[tag_split[0]] = "".join(tag_split[1:])
+ arbitrary = None
+ if " :" in line:
+ line, arbitrary = line.split(" :", 1)
+ if line.endswith(" "):
+ line = line[:-1]
if line[0] == ":":
prefix, command = line[1:].split(" ", 1)
if " " in command:
command, line = command.split(" ", 1)
else:
- command, line = line.split(" ", 1)
-
- arbitrary = None
- if ":" in line:
- line, arbitrary = line.split(":", 1)
- if line.endswith(" "):
- line = line[:-1]
+ command = line
+ if " " in line:
+ command, line = line.split(" ", 1)
args = line.split(" ")
hooks = self.events.on("raw").on(command).get_hooks()