rem: if(partial.lastIndexOf(" ")!=-1)  { partial=partial.substr(partial.lastIndexOf(" ")+1); start=inline.slice(0,inline.lastIndexOf(" ")+1); } 
context: function Channel_matchnick(inline)  {	var i=0;	var j=0;	var count=0;	var tmp_str="\x01N\x01BMatching Nicks:";	var nick_var="";	var partial=inline.toUpperCase();	var matched="";	var start="";	if(partial.lastIndexOf(" ")!=-1)  {		partial=partial.substr(partial.lastIndexOf(" ")+1);		start=inline.slice(0,inline.lastIndexOf(" ")+1);	}	if(partial=="")  {		screen.print_line("\x01H\x01BNothing to match.\x01N\x01W");	}	for(i=0;i<this.nick.length;i++)  {		if(partial==this.nick[i].substr(0,partial.length).toUpperCase())  {			tmp_str=tmp_str+" "+nick[i];			nick_var=this.nick[i];			count++;			if(matched=="")  {				matched=nick_var.toUpperCase();			}			else  {				nick_var=nick_var.substr(0,matched.length);				for(j=nick_var.length;matched.substr(0,j) != nick_var.substr(0,j).toUpperCase();j--)  {}				nick_var=nick_var.substr(0,j);				matched=nick_var.toUpperCase();			}		}	}	if(count>1 && matched.length==partial.length)  {		screen.print_line(tmp_str+"\x01N\x01W");		return inline;	}	if(count<1)  {		screen.print_line("\x01H\x01BNo matching nicks.\x01N\x01W");		return inline;	}	if(partial==inline.toUpperCase())  {		if(count==1)  {			return nick_var+": ";		}		return nick_var;	}	if(count==1)  {		return start+nick_var+" ";	}	return start+nick_var;}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/3bae9a955258c030eafdbe140e92ab69e91b9b74/irc.js/clean/irc.js