From: Darren Date: Mon, 21 Jan 2013 15:07:28 +0000 (+0000) Subject: Sending correct message length when truncated (privmsg/notice) X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=78673996e8807e2035a23bb1c84c0744cf68e1ca;p=KiwiIRC.git Sending correct message length when truncated (privmsg/notice) --- 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