drivers: Don't strip all whitespaces before parsing messages.

They matter in multiline messages, and there isn't much point to
stripping them anyway.
This commit is contained in:
Valentin Lorentz 2021-03-13 18:32:36 +01:00
parent 7cb3ae12da
commit 92399bb6a7

View File

@ -240,7 +240,10 @@ def newDriver(irc, moduleName=None):
return driver
def parseMsg(s):
s = s.strip()
# It may be tempting to strip all whitespaces here, but it's important
# to preserve them, because they matter for multiline messages.
# https://ircv3.net/specs/extensions/multiline
s = s.strip('\r\n')
if s:
msg = ircmsgs.IrcMsg(s)
return msg