diff options
Diffstat (limited to 'idc_irc_proxy.py')
-rwxr-xr-x | idc_irc_proxy.py | 9 |
1 files changed, 9 insertions, 0 deletions
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: |