rem: screen.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+screen.input_buffer); 
context: function Screen_handle_key(key)  {	var commands=[null];	var command=null;		switch(key)  {		case "\r":			if(screen.input_buffer=="")  {				break;			}			history.addline(screen.input_buffer);			while(history.line.length>MAX_HIST)  {				history.shift();			}			screen.input_buffer=screen.input_buffer.replace(/%C/g,"\x03");			screen.input_buffer=screen.input_buffer.replace(/%%/g,"%");			if(screen.input_buffer.substr(0,1)=="/" && screen.input_buffer.substr(1,1)!="/")  {				commands=screen.input_buffer.split(" ");				command=commands.shift();				command=command.substr(1);				command=command.toUpperCase();				send_command(command,commands.join(" "));			}			else  {				if(screen.input_buffer.substr(0,1)=="/")  {					screen.input_buffer=screen.input_buffer.substr(1);				}				if(channels.current==undefined)  {					screen.print_line("\x01H\x01RYou are not in a channel!\x01N\x01W");				}				else  {					channels.current.send(screen.input_buffer);				}				screen.print_line("\x01N\x01M<\x01N\x01W"+nick+"\x01N\x01M>\x01N\x01W "+screen.input_buffer);			}			screen.input_buffer="";			screen.update_input_line();			break;		case "\x08":			screen.input_buffer=screen.input_buffer.slice(0,-1);			screen.update_input_line();			break;		case "\x0b":			screen.input_buffer=screen.input_buffer+"%C";			break;		case "\x1e":		// Up arrow			if(history.index==null)  {				history.incomplete=screen.input_buffer;			}			screen.input_buffer=history.previous;			screen.update_input_line()			break;		case "\x0a":		// Down arrow			if(history.index==null)  {				history.incomplete=screen.input_buffer;			}			screen.input_buffer=history.next;			screen.update_input_line()			break;		case "\x1d":		// Left arrow			channels.index-=1;			if(channels.index<0)  {				channels.index=channels.length-1;			}			screen.update_statline();			break;		case "\x06":		// right arrow			channels.index+=1;			if(channels.index>=channels.length)  {				channels.index=0;			}			screen.update_statline();			break;		case "\t":			// Tab			screen.input_buffer=channels.current.matchnick(screen.input_buffer);			screen.update_input_line();			break;		default:			screen.input_buffer=screen.input_buffer+key;			screen.update_input_line();	}}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/a0dbaa1dccfbd19fff2cb525cf156c8d97b5b1c4/irc.js/buggy/irc.js