aboutsummaryrefslogtreecommitdiff
path: root/modules
diff options
context:
space:
mode:
authorGravatar jesopo2019-06-19 10:34:42 +0100
committerGravatar jesopo2019-06-19 10:34:42 +0100
commit938e1db9631a89c2de526e1de21a55b1469da03d (patch)
treeddd2472323fd97650d21763101481a5b39ae5a64 /modules
parentallow short names for config contexts. people mistook "user" as "put your (diff)
signature
add `margin` arg to ParsedLine.truncate so commands/outs.py doesn't do it
manually and cause potential issues with multi-byte chars
Diffstat (limited to 'modules')
-rw-r--r--modules/commands/outs.py8
1 files changed, 3 insertions, 5 deletions
diff --git a/modules/commands/outs.py b/modules/commands/outs.py
index 067a872b..659774ba 100644
--- a/modules/commands/outs.py
+++ b/modules/commands/outs.py
@@ -44,13 +44,11 @@ class Out(object):
if self._assured:
line.assure()
- valid, truncated = line.truncate(self.server.hostmask())
+ valid, truncated = line.truncate(self.server.hostmask(),
+ margin=STR_MORE_LEN)
if truncated:
- truncated = valid[-STR_MORE_LEN:]+truncated
- new_line = valid[:-STR_MORE_LEN]+STR_MORE
- line = utils.irc.parse_line(new_line)
-
+ line = utils.irc.parse_line(valid+STR_MORE)
self._text = "%s%s" % (STR_CONTINUED, truncated)
else:
self._text = ""