rem: server_bcast_to_servers(":" + servername + " SJOIN " + Channels[chan].created + " " + Channels[chan].nam + " " + Channels[chan].chanmode() + " :" + this.nick); 
add: server_bcast_to_servers(":" + this.nick + " SJOIN " + Channels[chan].created + " " + Channels[chan].nam); 
context: function IRCClient_do_join(chan_name,join_key) {	if((chan_name[0] != "#") && (chan_name[0] != "&") && !this.parent) {		this.numeric403(chan_name);		return 0;	}	for (theChar in chan_name) {		theChar_code = chan_name[theChar].charCodeAt(0);		if ((theChar_code <= 32) || (theChar_code == 44) ||		    (chan_name[theChar].charCodeAt(0) == 160)) {			if (!this.parent)				this.numeric(479, chan_name + " :Channel name contains illegal characters.");			return 0;		}	}	if (this.onchannel(chan_name.toUpperCase()))		return 0;	if ((this.num_channels_on() >= max_user_chans) && !this.parent) {		this.numeric("405", chan_name + " :You have joined too many channels.");		return 0;	}	chan = chan_name.toUpperCase().slice(0,max_chanlen);	if (Channels[chan] != undefined) {		if (!this.parent) {			if ((Channels[chan].mode&CHANMODE_INVITE) &&			    (chan != this.invited)) {				this.numeric("473", Channels[chan].nam + " :Cannot join channel (+i: invite only)");				return 0;			}			if ((Channels[chan].mode&CHANMODE_LIMIT) &&			    (Channels[chan].count_users() >= Channels[chan].arg[CHANMODE_LIMIT])) {				this.numeric("471", Channels[chan].nam + " :Cannot join channel (+l: channel is full)");				return 0;			}			if ((Channels[chan].mode&CHANMODE_KEY) &&			    (Channels[chan].arg[CHANMODE_KEY] != join_key)) {				this.numeric("475", Channels[chan].nam + " :Cannot join channel (+k: key required)");				return 0;			}			if (Channels[chan].isbanned(this.ircnuh) &&			    (chan != this.invited) ) {				this.numeric("474", Channels[chan].nam + " :Cannot join channel (+b: you're banned!)");				return 0;			}		}		// add to existing channel		Channels[chan].users.push(this.id);		str="JOIN :" + Channels[chan].nam;		if (this.parent)			this.bcast_to_channel(Channels[chan].nam, str, false);		else			this.bcast_to_channel(Channels[chan].nam, str, true);		if (chan_name[0] != "&")			server_bcast_to_servers(":" + servername + " SJOIN " + Channels[chan].created + " " + Channels[chan].nam + " " + Channels[chan].chanmode() + " :" + this.nick);	} else {		// create a new channel		Channels[chan]=new Channel(chan);		Channels[chan].nam=chan_name.slice(0,max_chanlen);		Channels[chan].mode=CHANMODE_NONE;//		Channels[chan].mode|=CHANMODE_TOPIC;//		Channels[chan].mode|=CHANMODE_NOOUTSIDE;		Channels[chan].topic="";		Channels[chan].created=time();		Channels[chan].users = new Array();		Channels[chan].users[0] = this.id;		Channels[chan].modelist[CHANLIST_BAN] = new Array();		Channels[chan].modelist[CHANLIST_VOICE] = new Array();		Channels[chan].modelist[CHANLIST_OP] = new Array();		Channels[chan].modelist[CHANLIST_OP].push(this.id);		str="JOIN :" + chan_name;		this.originatorout(str,this);//		this.ircout("MODE " + chan_name + " " + Channels[chan].chanmode());		if (chan_name[0] != "&")			server_bcast_to_servers(":" + servername + " SJOIN " + Channels[chan].created + " " + Channels[chan].nam + " " + Channels[chan].chanmode() + " :@" + this.nick);	}	if (this.invited.toUpperCase() == Channels[chan].nam.toUpperCase())		this.invited = "";	this.channels.push(chan);	if (!this.parent) {		this.names(chan);		this.numeric(366, Channels[chan].nam + " :End of /NAMES list.");	}	return 1; // success}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/93d2211c5864863a94be189e05aeaeb1d9baaf8e/ircd.js/buggy/ircd.js