context: function send_command(command,param)  {	var params=[null];	var send_to=null;	var full_params;	var i=0;	var got="";	switch(command)  {		case "MSG":			params=param.split(" ");			send_to=params.shift();			sock.send("PRIVMSG "+send_to+" :"+params.join(" ")+"\r\n");			screen.print_line(send_to+"\x01H\x01C<\x01N\x01C-\x01N\x01W "+params.join(" "));			break;		case "X":		case "Q":		case "QUIT":			sock.send("QUIT :"+param+"\r\n");			quit=1;			sock.close();			clean_exit();			break;		case "J":		case "JOIN":			channels.join(param);			break;		case "ME":			if(channels.current==undefined)  {				screen.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W");			}			else  {				channels.current.send("\x01ACTION "+param+"\x01");				screen.print_line("\x01N\x01B*\x01W "+nick+" "+param);			}			break;		case "CTCP":			params=param.split(" ");			send_to=params.shift();			full_params=params.join(" ");			full_params=full_params.toUpperCase();			sock.send("PRIVMSG "+send_to+" :\x01"+full_params+"\x01\r\n");			break;		case "PART":			channels.part(channels.current.name,param);			break;		case "N":		case "NEXT":			channels.index+=1;			if(channels.index>=channels.length)  {				channels.index=0;			}			screen.update_statline();			break;		case "P":		case "PREVIOUS":		case "PREV":			channels.index-=1;			if(channels.index<0)  {				channels.index=channels.length-1;			}			screen.update_statline();			break;		case "TOPIC":			sock.send("TOPIC "+channels.current.name+" :"+param+"\r\n");			break;		case "KICK":			if (param.substr(0,1) == '#' || param.substr(0,1) == '&')  {				sock.send(command+" "+param+"\r\n");			}			else  {				sock.send("KICK "+channels.current.name+" "+param+"\r\n");			}			break;		default:			if(command.slice(0,1)=="#" || command.slice(0,1)=="&")  {				for(i=0;i<channels.length;i++)  {					if(command.toUpperCase()==channels.channel[i].name)  {						channels.index=i;						screen.update_statline();					}				}			}			else  {				sock.send(command+" "+param+"\r\n");			}	}}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/3fad420c7a61a8d6042ef1f2664e1da2673a4ff8/irc.js/buggy/irc.js