*/
IrcConnection.prototype.write = function (data, force) {
//ENCODE string to encoding of the server
- encoded_buffer = iconv.encode(data + '\r\n', this.encoding);
+ var encoded_buffer = iconv.encode(data + '\r\n', this.encoding);
if (force) {
this.socket.write(encoded_buffer);
var data_pos, // Current position within the data Buffer
line_start = 0,
lines = [],
+ i,
line = '',
max_buffer_size = 1024; // 1024 bytes is the maximum length of two RFC1459 IRC messages.
// May need tweaking when IRCv3 message tags are more widespread