// be sent from the IRCd to the target without being truncated.\r
var wrap_length = 350,\r
trunc_msg,\r
- trunc_length;\r
+ trunc_length,\r
+ message = args.msg;\r
\r
if (args.target && (args.msg)) {\r
trunc_length = wrap_length - args.target.length;\r
// If the message is longer than wrap_length, send the message in chunks\r
- while (args.msg.length > trunc_length) {\r
- trunc_msg = args.msg.substr(0, trunc_length);\r
- args.msg = args.msg.substr(trunc_length - 1);\r
+ while (message.length > trunc_length) {\r
+ trunc_msg = message.substr(0, trunc_length);\r
+ message = message.substr(trunc_length - 1);\r
irc_connection.write('PRIVMSG ' + args.target + ' :' + trunc_msg);\r
}\r
// Send the remaining text\r
- irc_connection.write('PRIVMSG ' + args.target + ' :' + args.msg, callback);\r
+ irc_connection.write('PRIVMSG ' + args.target + ' :' + message, callback);\r
}\r
},\r
\r
// be sent from the IRCd to the target without being truncated.\r
var wrap_length = 350,\r
trunc_msg,\r
- trunc_length;\r
+ trunc_length,\r
+ message = args.msg;\r
\r
if (args.target && (args.msg)) {\r
trunc_length = wrap_length - args.target.length;\r
// If the message is longer than wrap_length, send the message in chunks\r
- while (args.msg.length > trunc_length) {\r
- trunc_msg = args.msg.substr(0, trunc_length);\r
- args.msg = args.msg.substr(trunc_length - 1);\r
+ while (message.length > trunc_length) {\r
+ trunc_msg = message.substr(0, trunc_length);\r
+ message = message.substr(trunc_length - 1);\r
irc_connection.write('NOTICE ' + args.target + ' :' + trunc_msg);\r
}\r
// Send the remaining text\r
- irc_connection.write('NOTICE ' + args.target + ' :' + args.msg, callback);\r
+ irc_connection.write('NOTICE ' + args.target + ' :' + message, callback);\r
}\r
},\r
\r