rem: (Channels[aChan].count_users() < list.People) ) 
add: (true_array_len(Channels[aChan].users) < list.People) ) 
context: function IRCClient_do_complex_list(cmd) {	var add = true;	var arg = 1;	var list = new List();	var listmask;	var listmask_items;	this.numeric321();	for (lc in cmd[1]) {		switch(cmd[1][lc]) {			case "+":				if (!add)					add = true;				break;			case "-":				if (add)					add = false;				break;			case "a":				arg++;				if (cmd[arg]) {					list.tweak_mode(LIST_CHANMASK,add);					list.Mask = cmd[arg];				}				break;			case "c":				arg++;				if (cmd[arg]) {					list.tweak_mode(LIST_CREATED,add);					list.Created = parseInt(cmd[arg])*60;				}				break;			case "m": // we never set -m, inverse.				arg++;				if (cmd[arg]) {					list.tweak_mode(LIST_MODES,true);					if (!add) {						var tmp_mode = "";						if((cmd[arg][0] != "+") ||						   (cmd[arg][0] != "-") )							tmp_mode += "+";						tmp_mode += cmd[arg].replace(/[-]/g," ");						tmp_mode = tmp_mode.replace(/[+]/g,"-");						list.Modes = tmp_mode.replace(/[ ]/g,"+");					} else {						list.Modes = cmd[arg];					}				}				break;			case "o":				arg++;				if (cmd[arg]) {					list.tweak_mode(LIST_TOPIC,add);					list.Topic = cmd[arg];				}				break;			case "p":				arg++;				if (cmd[arg]) {					list.tweak_mode(LIST_PEOPLE,add);					list.People = parseInt(cmd[arg]);				}				break;			case "t":				arg++;				if (cmd[arg]) {					list.tweak_mode(LIST_TOPICAGE,add);					list.TopicTime = parseInt(cmd[arg])*60;				}				break;			case "M":				list.tweak_mode(LIST_DISPLAY_CHAN_MODES,add);				break;			default:				break;		}	}	// Generic mask atop all this crap?	arg++;	if (cmd[arg])		listmask = cmd[arg];	// Here we go...	for (aChan in Channels) {		// Is the user allowed to see this channel, for starters?		if (!(Channels[aChan].mode&CHANMODE_SECRET) ||		     (this.mode&USERMODE_OPER) || this.channels[aChan]) {						if ((list.add_flags&LIST_CHANMASK) &&			    !IRC_match(aChan,list.Mask.toUpperCase()))				continue;			else if ((list.del_flags&LIST_CHANMASK) &&			    IRC_match(aChan,list.Mask.toUpperCase()))				continue;			if ((list.add_flags&LIST_CREATED) &&			   (Channels[aChan].created < (time() - list.Created)))				continue;			else if ((list.del_flags&LIST_CREATED) &&			   (Channels[aChan].created > (time() - list.Created)))				continue;			if ((list.add_flags&LIST_TOPIC) &&			   (!IRC_match(Channels[aChan].topic,list.Topic)))				continue;			else if ((list.del_flags&LIST_TOPIC) &&			   (IRC_match(Channels[aChan].topic,list.Topic)))				continue;			if ((list.add_flags&LIST_PEOPLE) &&			    (Channels[aChan].count_users() < list.People) )				continue;			else if ((list.del_flags&LIST_PEOPLE) &&			    (Channels[aChan].count_users() >= list.People) )				continue;			if ((list.add_flags&LIST_TOPICAGE) && list.TopicTime &&			  (Channels[aChan].topictime > (time()-list.TopicTime)))				continue;			else if((list.del_flags&LIST_TOPICAGE)&&list.TopicTime&&			  (Channels[aChan].topictime < (time()-list.TopicTime)))				continue;			if (list.add_flags&LIST_MODES) { // there's no -m				var sic = false;				var madd = true;				var c = Channels[aChan];				for (mm in list.Modes) {					switch(list.Modes[mm]) {						case "+":							if (!madd)								madd = true;							break;						case "-":							if (madd)								madd = false;							break;						case "i":							if (							   (!madd && (c.mode&							   CHANMODE_INVITE))							||							   (madd && !(c.mode&							   CHANMODE_INVITE))							   )								sic = true;							break;						case "k":							if (							   (!madd && (c.mode&							   CHANMODE_KEY))							||							   (madd && !(c.mode&							   CHANMODE_KEY))							   )								sic = true;							break;						case "l":							if (							   (!madd && (c.mode&							   CHANMODE_LIMIT))							||							   (madd && !(c.mode&							   CHANMODE_LIMIT))							   )								sic = true;							break;						case "m":							if (							   (!madd && (c.mode&							   CHANMODE_MODERATED))							||							   (madd && !(c.mode&							   CHANMODE_MODERATED))							   )								sic = true;							break;						case "n":							if (							   (!madd && (c.mode&							   CHANMODE_NOOUTSIDE))							||							   (madd && !(c.mode&							   CHANMODE_NOOUTSIDE))							   )								sic = true;							break;						case "p":							if (							   (!madd && (c.mode&							   CHANMODE_PRIVATE))							||							   (madd && !(c.mode&							   CHANMODE_PRIVATE))							   )								sic = true;							break;						case "s":							if (							   (!madd && (c.mode&							   CHANMODE_SECRET))							||							   (madd && !(c.mode&							   CHANMODE_SECRET))							   )								sic = true;							break;						case "t":							if (							   (!madd && (c.mode&							   CHANMODE_TOPIC))							||							   (madd && !(c.mode&							   CHANMODE_TOPIC))							   )								sic = true;							break;						default:							break;					}					if (sic)						break;				}				if (sic)					continue;			}			if (listmask)				listmask_items = listmask.split(",");			var l_match = false; // assume we match nothing.			if (listmask_items) {				for (l in listmask_items) {					if (Channels[aChan].match_list_mask					   (listmask_items[l])) {						l_match = true;						break;					}				}				if (!l_match)					continue;			}			// We made it.			if (list.add_flags&LIST_DISPLAY_CHAN_MODES)				this.numeric322(Channels[aChan],true);			else				this.numeric322(Channels[aChan]);		}	}	this.numeric(323, ":End of /LIST. (Complex)");}
meta: 9592	/local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/9592/4f229143b84a356096312c3ff51e23def3f51c04/ircd.js/buggy/ircd.js