1+ 'use strict' ;
2+
13var EventEmitter = require ( 'eventemitter3' ) ;
24var _ = require ( 'lodash' ) ;
35var MiddlewareHandler = require ( 'middleware-handler' ) ;
@@ -247,7 +249,7 @@ IrcClient.prototype.registerToNetwork = function() {
247249 }
248250
249251 this . raw ( 'NICK' , this . user . nick ) ;
250- this . raw ( 'USER' , this . user . username , 0 , '*' , this . user . gecos ) ;
252+ this . raw ( 'USER' , this . options . username , 0 , '*' , this . user . gecos ) ;
251253} ;
252254
253255
@@ -625,8 +627,8 @@ IrcClient.prototype.matchAction = function(match_regex, cb) {
625627 * Truncate a string into blocks of a set size
626628 */
627629function isHighSurrogate ( char_code ) {
628- return char_code >= 55296 // d800
629- && char_code <= 56319 ; // dbff
630+ return char_code >= 55296 && // d800
631+ char_code <= 56319 ; // dbff
630632}
631633
632634function truncateString ( str , block_size ) {
@@ -639,9 +641,9 @@ function truncateString(str, block_size) {
639641 while ( remaining_string . length ) {
640642 // Do not split unicode surrogate pairs
641643 this_block_size =
642- isHighSurrogate ( remaining_string . charCodeAt ( block_size - 1 ) )
643- ? block_size - 1
644- : block_size ;
644+ isHighSurrogate ( remaining_string . charCodeAt ( block_size - 1 ) ) ?
645+ block_size - 1 :
646+ block_size ;
645647
646648 blocks . push ( remaining_string . substr ( 0 , this_block_size ) ) ;
647649 remaining_string = remaining_string . substr ( this_block_size ) ;
0 commit comments