From 78673996e8807e2035a23bb1c84c0744cf68e1ca Mon Sep 17 00:00:00 2001 From: Darren Date: Mon, 21 Jan 2013 15:07:28 +0000 Subject: [PATCH] Sending correct message length when truncated (privmsg/notice) --- server/clientcommands.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/server/clientcommands.js b/server/clientcommands.js index 4d221c1..094b5db 100644 --- a/server/clientcommands.js +++ b/server/clientcommands.js @@ -35,7 +35,7 @@ var listeners = { // If the message is longer than wrap_length, send the message in chunks while (message.length > trunc_length) { trunc_msg = message.substr(0, trunc_length); - message = message.substr(trunc_length - 1); + message = message.substr(trunc_length); irc_connection.write('PRIVMSG ' + args.target + ' :' + trunc_msg); } // Send the remaining text @@ -120,7 +120,7 @@ var listeners = { // If the message is longer than wrap_length, send the message in chunks while (message.length > trunc_length) { trunc_msg = message.substr(0, trunc_length); - message = message.substr(trunc_length - 1); + message = message.substr(trunc_length); irc_connection.write('NOTICE ' + args.target + ' :' + trunc_msg); } // Send the remaining text -- 2.25.1