diff --git a/lib/irc.js b/lib/irc.js index b3087df4..054d02fe 100644 --- a/lib/irc.js +++ b/lib/irc.js @@ -1022,7 +1022,11 @@ Client.prototype.convertEncoding = function(str) { Client.prototype._updateMaxLineLength = function() { // 497 = 510 - (":" + "!" + " PRIVMSG " + " :").length; // target is determined in _speak() and subtracted there - this.maxLineLength = 497 - this.nick.length - this.hostMask.length; + if (this.hostMask) { + this.maxLineLength = 497 - this.nick.length - this.hostMask.length; + } else { + this.maxLineLength = 497 - this.nick.length; + } }; /* * parseMessage(line, stripColors)