From a334c673b2f16cd457edebff7e0868e21194f71a Mon Sep 17 00:00:00 2001 From: luk3yx Date: Thu, 12 May 2022 19:42:20 +1200 Subject: Proxy newlines as separate messages for now --- idc_irc_proxy.py | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/idc_irc_proxy.py b/idc_irc_proxy.py index 5068f8c..d946fe1 100755 --- a/idc_irc_proxy.py +++ b/idc_irc_proxy.py @@ -86,6 +86,15 @@ class Proxy: if not args or not args[-1].startswith('proxy:'): return args = [args[0], args[-1][6:]] + elif cmd == 'PRIVMSG' and ('\n' in args[-1] or '\r' in args[-1]): + message = args[-1].replace('\r\n', '\n').replace('\r', '\n') + for i, line in enumerate(message.split('\n', 9)): + if i > 0: + line = '\u200b' + line + self.send(cmd, hostmask, tags, [args[0], line]) + if i == 0: + tags = {} + return # Send the command to the client try: -- cgit v1.2.3