rem: if(searchbynick(newnick)) { 
add: checknick = searchbynick(newnick); if(checknick && (checknick.nick != this.nick) ) { 
context: function IRCClient_check_nickname(newnick) {	newnick = newnick.slice(0,max_nicklen);	// If you're trying to NICK to yourself, drop silently.	if(newnick.toUpperCase() == this.nick.toUpperCase())		return 0;	// First, check for valid characters.	regexp="^[A-Za-z\{\}\`\^\_\|\\]\\[\\\\][A-Za-z0-9\-\{\}\`\^\_\|\\]\\[\\\\]*$";	if(!newnick.match(regexp)) {		if (!this.server)			this.numeric("432", newnick + " :Foobar'd Nickname.");		return 0;	}	// Second, check for existing nickname.	if(searchbynick(newnick)) {		if (!this.server)			this.numeric("433", newnick + " :Nickname is already in use.");		return 0;	}	// Third, match against Q:Lines	for (ql in QLines) {		qline_nick = QLines[ql].nick;		qline_nick = qline_nick.replace(/[?]/g,".");		qline_nick = qline_nick.replace(/[*]/g,".*?");		regexp = new RegExp("^" + qline_nick + "$","i");		if(newnick.match(regexp)) {			if (!this.server)				this.numeric(432, newnick + " :" + QLines[ql].reason);			return 0;		}	}	return 1; // if we made it this far, we're good!}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/259a557396a96f3c6b01d21b2e61cfcd6120c2bd/ircd.js/buggy/ircd.js