File tree Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Expand file tree Collapse file tree 1 file changed +4
-10
lines changed Original file line number Diff line number Diff line change @@ -161,19 +161,13 @@ var handlers = {
161161
162162 PART : function ( command ) {
163163 var time = command . getServerTime ( ) ;
164- var channel = command . params [ 0 ] ;
165- var message ;
166-
167- if ( command . params . length > 1 ) {
168- message = command . params [ command . params . length - 1 ] ;
169- }
170164
171165 this . emit ( 'part' , {
172166 nick : command . nick ,
173167 ident : command . ident ,
174168 hostname : command . hostname ,
175- channel : channel ,
176- message : message ,
169+ channel : command . params [ 0 ] ,
170+ message : command . params [ command . params . length - 1 ] || '' ,
177171 time : time
178172 } ) ;
179173 } ,
@@ -188,7 +182,7 @@ var handlers = {
188182 ident : command . ident ,
189183 hostname : command . hostname ,
190184 channel : command . params [ 0 ] ,
191- message : command . params [ command . params . length - 1 ] ,
185+ message : command . params [ command . params . length - 1 ] || '' ,
192186 time : time
193187 } ) ;
194188 } ,
@@ -201,7 +195,7 @@ var handlers = {
201195 nick : command . nick ,
202196 ident : command . ident ,
203197 hostname : command . hostname ,
204- message : command . params [ command . params . length - 1 ] ,
198+ message : command . params [ command . params . length - 1 ] || '' ,
205199 time : time
206200 } ) ;
207201 } ,
You can’t perform that action at this time.
0 commit comments