// If the message is longer than wrap_length, send the message in chunks\r
while (message.length > trunc_length) {\r
trunc_msg = message.substr(0, trunc_length);\r
- message = message.substr(trunc_length - 1);\r
+ message = message.substr(trunc_length);\r
irc_connection.write('PRIVMSG ' + args.target + ' :' + trunc_msg);\r
}\r
// Send the remaining text\r
// If the message is longer than wrap_length, send the message in chunks\r
while (message.length > trunc_length) {\r
trunc_msg = message.substr(0, trunc_length);\r
- message = message.substr(trunc_length - 1);\r
+ message = message.substr(trunc_length);\r
irc_connection.write('NOTICE ' + args.target + ' :' + trunc_msg);\r
}\r
// Send the remaining text\r