rem
stringlengths 0
126k
| add
stringlengths 0
441k
| context
stringlengths 13
136k
| meta
stringlengths 132
347
|
---|---|---|---|
addmodeargs += " " + state_arg[cm]; chan.arg[cm] = state_arg[cm]; } } else if ((delbits&cm) && (chan.mode&cm)) { delmodes += MODE[cm].modechar; | cmode.addmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = cmode.state_arg[cm]; } } else if ((cmode.delbits&cm) && (chan.mode&cm)) { cmode.delmodes += MODE[cm].modechar; | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; cm_args = modeline.split(' '); add=true; addbits=CHANMODE_NONE; delbits=CHANMODE_NONE; state_arg = new Array(); state_arg[CHANMODE_KEY] = ""; state_arg[CHANMODE_LIMIT] = ""; chan_tmplist=new Array(); chan_tmplist[CHANLIST_OP]=new Array(); chan_tmplist[CHANLIST_DEOP]=new Array(); chan_tmplist[CHANLIST_VOICE]=new Array(); chan_tmplist[CHANLIST_DEVOICE]=new Array(); chan_tmplist[CHANLIST_BAN]=new Array(); chan_tmplist[CHANLIST_UNBAN]=new Array(); mode_counter=0; mode_args_counter=1; // start counting at the args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": add=true; mode_counter--; break; case "-": add=false; mode_counter--; break; case "b": if(add && (cm_args.length <= mode_args_counter)) { addbits|=CHANMODE_BAN; // list bans break; } this.tweaktmpmodelist(CHANLIST_BAN,CHANLIST_UNBAN,chan); mode_args_counter++; break; case "i": this.tweaktmpmode(CHANMODE_INVITE,chan); break; case "k": if(cm_args.length > mode_args_counter) { this.tweaktmpmode(CHANMODE_KEY,chan); state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { this.tweaktmpmode(CHANMODE_LIMIT,chan); regexp = "^[0-9]{1,4}$"; if(cm_args[mode_args_counter].match(regexp)) state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { this.tweaktmpmode(CHANMODE_LIMIT,chan); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": this.tweaktmpmode(CHANMODE_MODERATED,chan); break; case "n": this.tweaktmpmode(CHANMODE_NOOUTSIDE,chan); break; case "o": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_OP,CHANLIST_DEOP,chan); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (delbits&CHANMODE_SECRET) ) || (!add) ) this.tweaktmpmode(CHANMODE_PRIVATE,chan); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (delbits&CHANMODE_PRIVATE) ) || (!add) ) this.tweaktmpmode(CHANMODE_SECRET,chan); break; case "t": this.tweaktmpmode(CHANMODE_TOPIC,chan); break; case "v": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_VOICE,CHANLIST_DEVOICE,chan); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric("472", cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } addmodes = ""; delmodes = ""; addmodeargs = ""; delmodeargs = ""; // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. FIXME: Bans get synchronized later. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(addbits&cm)) { delbits |= cm; } else if (MODE[cm].list) { for (member in chan.modelist[MODE[cm].list]) { delmodes += MODE[cm].modechar; delmodeargs += " " + Clients[chan.modelist[MODE[cm].list][member]].nick; chan.del_modelist(chan.modelist[MODE[cm].list][member],MODE[cm].list); } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (addbits&CHANMODE_KEY) && state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((addbits&cm) && !(chan.mode&cm)) { addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { addmodeargs += " " + state_arg[cm]; chan.arg[cm] = state_arg[cm]; } } else if ((delbits&cm) && (chan.mode&cm)) { delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { delmodeargs += " " + state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANLIST_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANLIST_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Now we play with the channel lists by adding or removing what was // given to us on the modeline. this.affect_mode_list(CHANLIST_OP,chan) this.affect_mode_list(CHANLIST_VOICE,chan); this.affect_mode_list(CHANLIST_BAN,chan); if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (addmodeargs) final_modestr += addmodeargs; if (delmodeargs) final_modestr += delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f2f97bbbb51c190c74d5d75a9f8d6aac710d97ad/ircd.js/buggy/ircd.js |
delmodeargs += " " + state_arg[cm]; | cmode.delmodeargs += " " + cmode.state_arg[cm]; | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; cm_args = modeline.split(' '); add=true; addbits=CHANMODE_NONE; delbits=CHANMODE_NONE; state_arg = new Array(); state_arg[CHANMODE_KEY] = ""; state_arg[CHANMODE_LIMIT] = ""; chan_tmplist=new Array(); chan_tmplist[CHANLIST_OP]=new Array(); chan_tmplist[CHANLIST_DEOP]=new Array(); chan_tmplist[CHANLIST_VOICE]=new Array(); chan_tmplist[CHANLIST_DEVOICE]=new Array(); chan_tmplist[CHANLIST_BAN]=new Array(); chan_tmplist[CHANLIST_UNBAN]=new Array(); mode_counter=0; mode_args_counter=1; // start counting at the args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": add=true; mode_counter--; break; case "-": add=false; mode_counter--; break; case "b": if(add && (cm_args.length <= mode_args_counter)) { addbits|=CHANMODE_BAN; // list bans break; } this.tweaktmpmodelist(CHANLIST_BAN,CHANLIST_UNBAN,chan); mode_args_counter++; break; case "i": this.tweaktmpmode(CHANMODE_INVITE,chan); break; case "k": if(cm_args.length > mode_args_counter) { this.tweaktmpmode(CHANMODE_KEY,chan); state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { this.tweaktmpmode(CHANMODE_LIMIT,chan); regexp = "^[0-9]{1,4}$"; if(cm_args[mode_args_counter].match(regexp)) state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { this.tweaktmpmode(CHANMODE_LIMIT,chan); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": this.tweaktmpmode(CHANMODE_MODERATED,chan); break; case "n": this.tweaktmpmode(CHANMODE_NOOUTSIDE,chan); break; case "o": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_OP,CHANLIST_DEOP,chan); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (delbits&CHANMODE_SECRET) ) || (!add) ) this.tweaktmpmode(CHANMODE_PRIVATE,chan); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (delbits&CHANMODE_PRIVATE) ) || (!add) ) this.tweaktmpmode(CHANMODE_SECRET,chan); break; case "t": this.tweaktmpmode(CHANMODE_TOPIC,chan); break; case "v": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_VOICE,CHANLIST_DEVOICE,chan); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric("472", cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } addmodes = ""; delmodes = ""; addmodeargs = ""; delmodeargs = ""; // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. FIXME: Bans get synchronized later. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(addbits&cm)) { delbits |= cm; } else if (MODE[cm].list) { for (member in chan.modelist[MODE[cm].list]) { delmodes += MODE[cm].modechar; delmodeargs += " " + Clients[chan.modelist[MODE[cm].list][member]].nick; chan.del_modelist(chan.modelist[MODE[cm].list][member],MODE[cm].list); } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (addbits&CHANMODE_KEY) && state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((addbits&cm) && !(chan.mode&cm)) { addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { addmodeargs += " " + state_arg[cm]; chan.arg[cm] = state_arg[cm]; } } else if ((delbits&cm) && (chan.mode&cm)) { delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { delmodeargs += " " + state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANLIST_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANLIST_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Now we play with the channel lists by adding or removing what was // given to us on the modeline. this.affect_mode_list(CHANLIST_OP,chan) this.affect_mode_list(CHANLIST_VOICE,chan); this.affect_mode_list(CHANLIST_BAN,chan); if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (addmodeargs) final_modestr += addmodeargs; if (delmodeargs) final_modestr += delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f2f97bbbb51c190c74d5d75a9f8d6aac710d97ad/ircd.js/buggy/ircd.js |
if (addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANLIST_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANLIST_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); | if (cmode.addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANMODE_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANMODE_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; cm_args = modeline.split(' '); add=true; addbits=CHANMODE_NONE; delbits=CHANMODE_NONE; state_arg = new Array(); state_arg[CHANMODE_KEY] = ""; state_arg[CHANMODE_LIMIT] = ""; chan_tmplist=new Array(); chan_tmplist[CHANLIST_OP]=new Array(); chan_tmplist[CHANLIST_DEOP]=new Array(); chan_tmplist[CHANLIST_VOICE]=new Array(); chan_tmplist[CHANLIST_DEVOICE]=new Array(); chan_tmplist[CHANLIST_BAN]=new Array(); chan_tmplist[CHANLIST_UNBAN]=new Array(); mode_counter=0; mode_args_counter=1; // start counting at the args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": add=true; mode_counter--; break; case "-": add=false; mode_counter--; break; case "b": if(add && (cm_args.length <= mode_args_counter)) { addbits|=CHANMODE_BAN; // list bans break; } this.tweaktmpmodelist(CHANLIST_BAN,CHANLIST_UNBAN,chan); mode_args_counter++; break; case "i": this.tweaktmpmode(CHANMODE_INVITE,chan); break; case "k": if(cm_args.length > mode_args_counter) { this.tweaktmpmode(CHANMODE_KEY,chan); state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { this.tweaktmpmode(CHANMODE_LIMIT,chan); regexp = "^[0-9]{1,4}$"; if(cm_args[mode_args_counter].match(regexp)) state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { this.tweaktmpmode(CHANMODE_LIMIT,chan); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": this.tweaktmpmode(CHANMODE_MODERATED,chan); break; case "n": this.tweaktmpmode(CHANMODE_NOOUTSIDE,chan); break; case "o": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_OP,CHANLIST_DEOP,chan); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (delbits&CHANMODE_SECRET) ) || (!add) ) this.tweaktmpmode(CHANMODE_PRIVATE,chan); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (delbits&CHANMODE_PRIVATE) ) || (!add) ) this.tweaktmpmode(CHANMODE_SECRET,chan); break; case "t": this.tweaktmpmode(CHANMODE_TOPIC,chan); break; case "v": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_VOICE,CHANLIST_DEVOICE,chan); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric("472", cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } addmodes = ""; delmodes = ""; addmodeargs = ""; delmodeargs = ""; // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. FIXME: Bans get synchronized later. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(addbits&cm)) { delbits |= cm; } else if (MODE[cm].list) { for (member in chan.modelist[MODE[cm].list]) { delmodes += MODE[cm].modechar; delmodeargs += " " + Clients[chan.modelist[MODE[cm].list][member]].nick; chan.del_modelist(chan.modelist[MODE[cm].list][member],MODE[cm].list); } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (addbits&CHANMODE_KEY) && state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((addbits&cm) && !(chan.mode&cm)) { addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { addmodeargs += " " + state_arg[cm]; chan.arg[cm] = state_arg[cm]; } } else if ((delbits&cm) && (chan.mode&cm)) { delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { delmodeargs += " " + state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANLIST_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANLIST_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Now we play with the channel lists by adding or removing what was // given to us on the modeline. this.affect_mode_list(CHANLIST_OP,chan) this.affect_mode_list(CHANLIST_VOICE,chan); this.affect_mode_list(CHANLIST_BAN,chan); if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (addmodeargs) final_modestr += addmodeargs; if (delmodeargs) final_modestr += delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f2f97bbbb51c190c74d5d75a9f8d6aac710d97ad/ircd.js/buggy/ircd.js |
this.affect_mode_list(CHANLIST_OP,chan) this.affect_mode_list(CHANLIST_VOICE,chan); this.affect_mode_list(CHANLIST_BAN,chan); if (!addmodes && !delmodes) | for (z in cmode.tmplist[CHANMODE_BAN][true]) { var set_ban = create_ban_mask( cmode.tmplist[CHANMODE_BAN][add][z]); if ((chan.count_modelist(CHANMODE_BAN) >= max_bans) && !this.server && !this.parent) { this.numeric(478, chan.nam + " " + set_ban + " :" + "Cannot add ban, channel's ban list is full."); } else if (set_ban && !chan.isbanned(set_ban)) { cmode.addmodes += "b"; cmode.addmodeargs += " " + set_ban; var banid = chan.add_modelist(set_ban,CHANMODE_BAN); chan.bantime[banid] = time(); chan.bancreator[banid] = this.ircnuh; } } for (z in cmode.tmplist[CHANMODE_BAN][false]) { for (ban in chan.modelist[CHANMODE_BAN]) { if (cmode.tmplist[CHANMODE_BAN][false][z].toUpperCase() == chan.modelist[CHANMODE_BAN][ban].toUpperCase()) { cmode.delmodes += "b"; cmode.delmodeargs += " " + cmode.tmplist[CHANMODE_BAN][false][z]; var banid = chan.del_modelist(cmode.tmplist [CHANMODE_BAN][false][z],CHANMODE_BAN); delete chan.bantime[banid]; delete chan.bancreator[banid]; } } } cmode.affect_mode_list(CHANMODE_OP); cmode.affect_mode_list(CHANMODE_VOICE); if (!cmode.addmodes && !cmode.delmodes) | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; cm_args = modeline.split(' '); add=true; addbits=CHANMODE_NONE; delbits=CHANMODE_NONE; state_arg = new Array(); state_arg[CHANMODE_KEY] = ""; state_arg[CHANMODE_LIMIT] = ""; chan_tmplist=new Array(); chan_tmplist[CHANLIST_OP]=new Array(); chan_tmplist[CHANLIST_DEOP]=new Array(); chan_tmplist[CHANLIST_VOICE]=new Array(); chan_tmplist[CHANLIST_DEVOICE]=new Array(); chan_tmplist[CHANLIST_BAN]=new Array(); chan_tmplist[CHANLIST_UNBAN]=new Array(); mode_counter=0; mode_args_counter=1; // start counting at the args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": add=true; mode_counter--; break; case "-": add=false; mode_counter--; break; case "b": if(add && (cm_args.length <= mode_args_counter)) { addbits|=CHANMODE_BAN; // list bans break; } this.tweaktmpmodelist(CHANLIST_BAN,CHANLIST_UNBAN,chan); mode_args_counter++; break; case "i": this.tweaktmpmode(CHANMODE_INVITE,chan); break; case "k": if(cm_args.length > mode_args_counter) { this.tweaktmpmode(CHANMODE_KEY,chan); state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { this.tweaktmpmode(CHANMODE_LIMIT,chan); regexp = "^[0-9]{1,4}$"; if(cm_args[mode_args_counter].match(regexp)) state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { this.tweaktmpmode(CHANMODE_LIMIT,chan); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": this.tweaktmpmode(CHANMODE_MODERATED,chan); break; case "n": this.tweaktmpmode(CHANMODE_NOOUTSIDE,chan); break; case "o": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_OP,CHANLIST_DEOP,chan); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (delbits&CHANMODE_SECRET) ) || (!add) ) this.tweaktmpmode(CHANMODE_PRIVATE,chan); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (delbits&CHANMODE_PRIVATE) ) || (!add) ) this.tweaktmpmode(CHANMODE_SECRET,chan); break; case "t": this.tweaktmpmode(CHANMODE_TOPIC,chan); break; case "v": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_VOICE,CHANLIST_DEVOICE,chan); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric("472", cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } addmodes = ""; delmodes = ""; addmodeargs = ""; delmodeargs = ""; // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. FIXME: Bans get synchronized later. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(addbits&cm)) { delbits |= cm; } else if (MODE[cm].list) { for (member in chan.modelist[MODE[cm].list]) { delmodes += MODE[cm].modechar; delmodeargs += " " + Clients[chan.modelist[MODE[cm].list][member]].nick; chan.del_modelist(chan.modelist[MODE[cm].list][member],MODE[cm].list); } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (addbits&CHANMODE_KEY) && state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((addbits&cm) && !(chan.mode&cm)) { addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { addmodeargs += " " + state_arg[cm]; chan.arg[cm] = state_arg[cm]; } } else if ((delbits&cm) && (chan.mode&cm)) { delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { delmodeargs += " " + state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANLIST_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANLIST_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Now we play with the channel lists by adding or removing what was // given to us on the modeline. this.affect_mode_list(CHANLIST_OP,chan) this.affect_mode_list(CHANLIST_VOICE,chan); this.affect_mode_list(CHANLIST_BAN,chan); if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (addmodeargs) final_modestr += addmodeargs; if (delmodeargs) final_modestr += delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f2f97bbbb51c190c74d5d75a9f8d6aac710d97ad/ircd.js/buggy/ircd.js |
final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (addmodeargs) final_modestr += addmodeargs; if (delmodeargs) final_modestr += delmodeargs; | var final_modestr = ""; if (cmode.addmodes) final_modestr += "+" + cmode.addmodes; if (cmode.delmodes) final_modestr += "-" + cmode.delmodes; if (cmode.addmodeargs) final_modestr += cmode.addmodeargs; if (cmode.delmodeargs) final_modestr += cmode.delmodeargs; | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; cm_args = modeline.split(' '); add=true; addbits=CHANMODE_NONE; delbits=CHANMODE_NONE; state_arg = new Array(); state_arg[CHANMODE_KEY] = ""; state_arg[CHANMODE_LIMIT] = ""; chan_tmplist=new Array(); chan_tmplist[CHANLIST_OP]=new Array(); chan_tmplist[CHANLIST_DEOP]=new Array(); chan_tmplist[CHANLIST_VOICE]=new Array(); chan_tmplist[CHANLIST_DEVOICE]=new Array(); chan_tmplist[CHANLIST_BAN]=new Array(); chan_tmplist[CHANLIST_UNBAN]=new Array(); mode_counter=0; mode_args_counter=1; // start counting at the args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": add=true; mode_counter--; break; case "-": add=false; mode_counter--; break; case "b": if(add && (cm_args.length <= mode_args_counter)) { addbits|=CHANMODE_BAN; // list bans break; } this.tweaktmpmodelist(CHANLIST_BAN,CHANLIST_UNBAN,chan); mode_args_counter++; break; case "i": this.tweaktmpmode(CHANMODE_INVITE,chan); break; case "k": if(cm_args.length > mode_args_counter) { this.tweaktmpmode(CHANMODE_KEY,chan); state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { this.tweaktmpmode(CHANMODE_LIMIT,chan); regexp = "^[0-9]{1,4}$"; if(cm_args[mode_args_counter].match(regexp)) state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { this.tweaktmpmode(CHANMODE_LIMIT,chan); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": this.tweaktmpmode(CHANMODE_MODERATED,chan); break; case "n": this.tweaktmpmode(CHANMODE_NOOUTSIDE,chan); break; case "o": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_OP,CHANLIST_DEOP,chan); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (delbits&CHANMODE_SECRET) ) || (!add) ) this.tweaktmpmode(CHANMODE_PRIVATE,chan); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (delbits&CHANMODE_PRIVATE) ) || (!add) ) this.tweaktmpmode(CHANMODE_SECRET,chan); break; case "t": this.tweaktmpmode(CHANMODE_TOPIC,chan); break; case "v": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_VOICE,CHANLIST_DEVOICE,chan); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric("472", cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } addmodes = ""; delmodes = ""; addmodeargs = ""; delmodeargs = ""; // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. FIXME: Bans get synchronized later. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(addbits&cm)) { delbits |= cm; } else if (MODE[cm].list) { for (member in chan.modelist[MODE[cm].list]) { delmodes += MODE[cm].modechar; delmodeargs += " " + Clients[chan.modelist[MODE[cm].list][member]].nick; chan.del_modelist(chan.modelist[MODE[cm].list][member],MODE[cm].list); } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (addbits&CHANMODE_KEY) && state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((addbits&cm) && !(chan.mode&cm)) { addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { addmodeargs += " " + state_arg[cm]; chan.arg[cm] = state_arg[cm]; } } else if ((delbits&cm) && (chan.mode&cm)) { delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { delmodeargs += " " + state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANLIST_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANLIST_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Now we play with the channel lists by adding or removing what was // given to us on the modeline. this.affect_mode_list(CHANLIST_OP,chan) this.affect_mode_list(CHANLIST_VOICE,chan); this.affect_mode_list(CHANLIST_BAN,chan); if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (addmodeargs) final_modestr += addmodeargs; if (delmodeargs) final_modestr += delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f2f97bbbb51c190c74d5d75a9f8d6aac710d97ad/ircd.js/buggy/ircd.js |
this.affect_mode_list(CHANLIST_OP) this.affect_mode_list(CHANLIST_VOICE); this.affect_mode_list(CHANLIST_BAN); | this.affect_mode_list(CHANLIST_OP,chan) this.affect_mode_list(CHANLIST_VOICE,chan); this.affect_mode_list(CHANLIST_BAN,chan); | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; cm_args = modeline.split(' '); add=true; addbits=CHANMODE_NONE; delbits=CHANMODE_NONE; state_arg = new Array(); state_arg[CHANMODE_KEY] = ""; state_arg[CHANMODE_LIMIT] = ""; chan_tmplist=new Array(); chan_tmplist[CHANLIST_OP]=new Array(); chan_tmplist[CHANLIST_DEOP]=new Array(); chan_tmplist[CHANLIST_VOICE]=new Array(); chan_tmplist[CHANLIST_DEVOICE]=new Array(); chan_tmplist[CHANLIST_BAN]=new Array(); chan_tmplist[CHANLIST_UNBAN]=new Array(); mode_counter=0; mode_args_counter=1; // start counting at the args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": add=true; mode_counter--; break; case "-": add=false; mode_counter--; break; case "b": if(add && (cm_args.length <= mode_args_counter)) { addbits|=CHANMODE_BAN; // list bans break; } this.tweaktmpmodelist(CHANLIST_BAN,CHANLIST_UNBAN,chan); mode_args_counter++; break; case "i": this.tweaktmpmode(CHANMODE_INVITE,chan); break; case "k": if(cm_args.length > mode_args_counter) { this.tweaktmpmode(CHANMODE_KEY,chan); state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { this.tweaktmpmode(CHANMODE_LIMIT,chan); regexp = "^[0-9]{1,4}$"; if(cm_args[mode_args_counter].match(regexp)) state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { this.tweaktmpmode(CHANMODE_LIMIT,chan); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": this.tweaktmpmode(CHANMODE_MODERATED,chan); break; case "n": this.tweaktmpmode(CHANMODE_NOOUTSIDE,chan); break; case "o": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_OP,CHANLIST_DEOP,chan); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (delbits&CHANMODE_SECRET) ) || (!add) ) this.tweaktmpmode(CHANMODE_PRIVATE,chan); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (delbits&CHANMODE_PRIVATE) ) || (!add) ) this.tweaktmpmode(CHANMODE_SECRET,chan); break; case "t": this.tweaktmpmode(CHANMODE_TOPIC,chan); break; case "v": if (cm_args.length <= mode_args_counter) break; this.tweaktmpmodelist(CHANLIST_VOICE,CHANLIST_DEVOICE,chan); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric("472", cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } addmodes = ""; delmodes = ""; addmodeargs = ""; delmodeargs = ""; // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. FIXME: Bans get synchronized later. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(addbits&cm)) { delbits |= cm; } else if (MODE[cm].list) { for (member in chan.modelist[MODE[cm].list]) { delmodes += MODE[cm].modechar; delmodeargs += " " + Clients[chan.modelist[MODE[cm].list][member]].nick; chan.del_modelist(chan.modelist[MODE[cm].list][member],MODE[cm].list); } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (addbits&CHANMODE_KEY) && state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((addbits&cm) && !(chan.mode&cm)) { addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { addmodeargs += " " + state_arg[cm]; chan.arg[cm] = state_arg[cm]; } } else if ((delbits&cm) && (chan.mode&cm)) { delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { delmodeargs += " " + state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANLIST_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANLIST_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Now we play with the channel lists by adding or removing what was // given to us on the modeline. this.affect_mode_list(CHANLIST_OP) this.affect_mode_list(CHANLIST_VOICE); this.affect_mode_list(CHANLIST_BAN); if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (addmodeargs) final_modestr += addmodeargs; if (delmodeargs) final_modestr += delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan.nam, str, true); else this.bcast_to_channel(chan.nam, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/0377762ff75ff64d0a57091e04f264dfebbd9f56/ircd.js/buggy/ircd.js |
if (MODE[cm].state && (chan.mode&cm) && !(cmode.addbits&cm)) { | if (MODE[cm].state && (chan.mode&cm) && !(cmode.addbits&cm)) { | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; var cmode = new ChanMode(chan,this); var cm_args = modeline.split(' '); var add=true; var mode_counter=0; var mode_args_counter=1; // start counting at args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": if (!add) add=true; mode_counter--; break; case "-": if (add) add=false; mode_counter--; break; case "b": if(add && (cm_args.length<=mode_args_counter)) { cmode.addbits|=CHANMODE_BAN;//list bans break; } cmode.tweaktmpmodelist(CHANMODE_BAN,add, cm_args[mode_args_counter]); mode_args_counter++; break; case "i": cmode.tweaktmpmode(CHANMODE_INVITE,add); break; case "k": if(cm_args.length > mode_args_counter) { cmode.tweaktmpmode(CHANMODE_KEY,add); cmode.state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { cmode.tweaktmpmode(CHANMODE_LIMIT,true); var regexp = "^[0-9]{1,5}$"; if(cm_args[mode_args_counter].match(regexp)) cmode.state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { cmode.tweaktmpmode(CHANMODE_LIMIT,false); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": cmode.tweaktmpmode(CHANMODE_MODERATED,add); break; case "n": cmode.tweaktmpmode(CHANMODE_NOOUTSIDE,add); break; case "o": if (cm_args.length <= mode_args_counter) break; cmode.tweaktmpmodelist(CHANMODE_OP,add, cm_args[mode_args_counter]); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (cmode.delbits&CHANMODE_SECRET) ) || (!add) ) cmode.tweaktmpmode(CHANMODE_PRIVATE,add); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (cmode.delbits&CHANMODE_PRIVATE) ) || (!add) ) cmode.tweaktmpmode(CHANMODE_SECRET,add); break; case "t": cmode.tweaktmpmode(CHANMODE_TOPIC,add); break; case "v": if (cm_args.length <= mode_args_counter) break; cmode.tweaktmpmodelist(CHANMODE_VOICE,add, cm_args[mode_args_counter]); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric(472, cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(cmode.addbits&cm)) { cmode.delbits |= cm; } else if (MODE[cm].list && MODE[cm].isnick) { for (member in chan.modelist[cm]) { cmode.delmodes += MODE[cm].modechar; cmode.delmodeargs += " " + chan.modelist[cm][member].nick; delete chan.modelist[cm][member]; } } else if (MODE[cm].list && !MODE[cm].isnick) { for (ban in chan.modelist[cm]) { cmode.delmodes += MODE[cm].modechar; cmode.delmodeargs += " " + chan.modelist[cm][ban]; delete chan.modelist[cm][ban]; delete chan.bantime[ban]; delete chan.bancreator[ban]; } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (cmode.addbits&CHANMODE_KEY)&& cmode.state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((cmode.addbits&cm) && (!(chan.mode&cm) || ((cm==CHANMODE_LIMIT)&&(chan.arg[CHANMODE_LIMIT]!= cmode.state_arg[CHANMODE_LIMIT])) ) ) { cmode.addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { cmode.addmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = cmode.state_arg[cm]; } } else if ((cmode.delbits&cm) && (chan.mode&cm)) { cmode.delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { cmode.delmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (cmode.addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANMODE_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANMODE_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Bans are a specialized case, sigh. for (z in cmode.tmplist[CHANMODE_BAN][true]) { // +b var set_ban = create_ban_mask( cmode.tmplist[CHANMODE_BAN][add][z]); if ((chan.count_modelist(CHANMODE_BAN) >= max_bans) && !this.server && !this.parent) { this.numeric(478, chan.nam + " " + set_ban + " :" + "Cannot add ban, channel's ban list is full."); } else if (set_ban && !chan.isbanned(set_ban)) { cmode.addmodes += "b"; cmode.addmodeargs += " " + set_ban; var banid = chan.modelist[CHANMODE_BAN].push(set_ban); chan.bantime[banid] = time(); chan.bancreator[banid] = this.nuh; } } for (z in cmode.tmplist[CHANMODE_BAN][false]) { // -b for (ban in chan.modelist[CHANMODE_BAN]) { if (cmode.tmplist[CHANMODE_BAN][false][z].toUpperCase() == chan.modelist[CHANMODE_BAN][ban].toUpperCase()) { cmode.delmodes += "b"; cmode.delmodeargs += " " + cmode.tmplist[CHANMODE_BAN][false][z]; delete chan.modelist[CHANMODE_BAN][ban]; delete chan.bantime[ban]; delete chan.bancreator[ban]; } } } // Modes where we just deal with lists of nicks. cmode.affect_mode_list(CHANMODE_OP); cmode.affect_mode_list(CHANMODE_VOICE); if (!cmode.addmodes && !cmode.delmodes) return 0; var final_modestr = ""; if (cmode.addmodes) final_modestr += "+" + cmode.addmodes; if (cmode.delmodes) final_modestr += "-" + cmode.delmodes; if (cmode.addmodeargs) final_modestr += cmode.addmodeargs; if (cmode.delmodeargs) final_modestr += cmode.delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan, str, true); else this.bcast_to_channel(chan, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan, str, true); else this.bcast_to_channel(chan, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/8b69825c26169d3cdc50f8ef1b669cbbfcb74900/ircd_channel.js/clean/load/ircd_channel.js |
cmode.delmodeargs += " " + chan.modelist[cm][member].nick; | cmode.delmodeargs += " " + chan.modelist[cm][member].nick; | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; var cmode = new ChanMode(chan,this); var cm_args = modeline.split(' '); var add=true; var mode_counter=0; var mode_args_counter=1; // start counting at args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": if (!add) add=true; mode_counter--; break; case "-": if (add) add=false; mode_counter--; break; case "b": if(add && (cm_args.length<=mode_args_counter)) { cmode.addbits|=CHANMODE_BAN;//list bans break; } cmode.tweaktmpmodelist(CHANMODE_BAN,add, cm_args[mode_args_counter]); mode_args_counter++; break; case "i": cmode.tweaktmpmode(CHANMODE_INVITE,add); break; case "k": if(cm_args.length > mode_args_counter) { cmode.tweaktmpmode(CHANMODE_KEY,add); cmode.state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { cmode.tweaktmpmode(CHANMODE_LIMIT,true); var regexp = "^[0-9]{1,5}$"; if(cm_args[mode_args_counter].match(regexp)) cmode.state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { cmode.tweaktmpmode(CHANMODE_LIMIT,false); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": cmode.tweaktmpmode(CHANMODE_MODERATED,add); break; case "n": cmode.tweaktmpmode(CHANMODE_NOOUTSIDE,add); break; case "o": if (cm_args.length <= mode_args_counter) break; cmode.tweaktmpmodelist(CHANMODE_OP,add, cm_args[mode_args_counter]); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (cmode.delbits&CHANMODE_SECRET) ) || (!add) ) cmode.tweaktmpmode(CHANMODE_PRIVATE,add); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (cmode.delbits&CHANMODE_PRIVATE) ) || (!add) ) cmode.tweaktmpmode(CHANMODE_SECRET,add); break; case "t": cmode.tweaktmpmode(CHANMODE_TOPIC,add); break; case "v": if (cm_args.length <= mode_args_counter) break; cmode.tweaktmpmodelist(CHANMODE_VOICE,add, cm_args[mode_args_counter]); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric(472, cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(cmode.addbits&cm)) { cmode.delbits |= cm; } else if (MODE[cm].list && MODE[cm].isnick) { for (member in chan.modelist[cm]) { cmode.delmodes += MODE[cm].modechar; cmode.delmodeargs += " " + chan.modelist[cm][member].nick; delete chan.modelist[cm][member]; } } else if (MODE[cm].list && !MODE[cm].isnick) { for (ban in chan.modelist[cm]) { cmode.delmodes += MODE[cm].modechar; cmode.delmodeargs += " " + chan.modelist[cm][ban]; delete chan.modelist[cm][ban]; delete chan.bantime[ban]; delete chan.bancreator[ban]; } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (cmode.addbits&CHANMODE_KEY)&& cmode.state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((cmode.addbits&cm) && (!(chan.mode&cm) || ((cm==CHANMODE_LIMIT)&&(chan.arg[CHANMODE_LIMIT]!= cmode.state_arg[CHANMODE_LIMIT])) ) ) { cmode.addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { cmode.addmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = cmode.state_arg[cm]; } } else if ((cmode.delbits&cm) && (chan.mode&cm)) { cmode.delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { cmode.delmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (cmode.addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANMODE_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANMODE_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Bans are a specialized case, sigh. for (z in cmode.tmplist[CHANMODE_BAN][true]) { // +b var set_ban = create_ban_mask( cmode.tmplist[CHANMODE_BAN][add][z]); if ((chan.count_modelist(CHANMODE_BAN) >= max_bans) && !this.server && !this.parent) { this.numeric(478, chan.nam + " " + set_ban + " :" + "Cannot add ban, channel's ban list is full."); } else if (set_ban && !chan.isbanned(set_ban)) { cmode.addmodes += "b"; cmode.addmodeargs += " " + set_ban; var banid = chan.modelist[CHANMODE_BAN].push(set_ban); chan.bantime[banid] = time(); chan.bancreator[banid] = this.nuh; } } for (z in cmode.tmplist[CHANMODE_BAN][false]) { // -b for (ban in chan.modelist[CHANMODE_BAN]) { if (cmode.tmplist[CHANMODE_BAN][false][z].toUpperCase() == chan.modelist[CHANMODE_BAN][ban].toUpperCase()) { cmode.delmodes += "b"; cmode.delmodeargs += " " + cmode.tmplist[CHANMODE_BAN][false][z]; delete chan.modelist[CHANMODE_BAN][ban]; delete chan.bantime[ban]; delete chan.bancreator[ban]; } } } // Modes where we just deal with lists of nicks. cmode.affect_mode_list(CHANMODE_OP); cmode.affect_mode_list(CHANMODE_VOICE); if (!cmode.addmodes && !cmode.delmodes) return 0; var final_modestr = ""; if (cmode.addmodes) final_modestr += "+" + cmode.addmodes; if (cmode.delmodes) final_modestr += "-" + cmode.delmodes; if (cmode.addmodeargs) final_modestr += cmode.addmodeargs; if (cmode.delmodeargs) final_modestr += cmode.delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan, str, true); else this.bcast_to_channel(chan, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan, str, true); else this.bcast_to_channel(chan, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/8b69825c26169d3cdc50f8ef1b669cbbfcb74900/ircd_channel.js/clean/load/ircd_channel.js |
cmode.delmodeargs += " " + chan.modelist[cm][ban]; | cmode.delmodeargs += " " + chan.modelist[cm][ban]; | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; var cmode = new ChanMode(chan,this); var cm_args = modeline.split(' '); var add=true; var mode_counter=0; var mode_args_counter=1; // start counting at args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": if (!add) add=true; mode_counter--; break; case "-": if (add) add=false; mode_counter--; break; case "b": if(add && (cm_args.length<=mode_args_counter)) { cmode.addbits|=CHANMODE_BAN;//list bans break; } cmode.tweaktmpmodelist(CHANMODE_BAN,add, cm_args[mode_args_counter]); mode_args_counter++; break; case "i": cmode.tweaktmpmode(CHANMODE_INVITE,add); break; case "k": if(cm_args.length > mode_args_counter) { cmode.tweaktmpmode(CHANMODE_KEY,add); cmode.state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { cmode.tweaktmpmode(CHANMODE_LIMIT,true); var regexp = "^[0-9]{1,5}$"; if(cm_args[mode_args_counter].match(regexp)) cmode.state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { cmode.tweaktmpmode(CHANMODE_LIMIT,false); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": cmode.tweaktmpmode(CHANMODE_MODERATED,add); break; case "n": cmode.tweaktmpmode(CHANMODE_NOOUTSIDE,add); break; case "o": if (cm_args.length <= mode_args_counter) break; cmode.tweaktmpmodelist(CHANMODE_OP,add, cm_args[mode_args_counter]); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (cmode.delbits&CHANMODE_SECRET) ) || (!add) ) cmode.tweaktmpmode(CHANMODE_PRIVATE,add); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (cmode.delbits&CHANMODE_PRIVATE) ) || (!add) ) cmode.tweaktmpmode(CHANMODE_SECRET,add); break; case "t": cmode.tweaktmpmode(CHANMODE_TOPIC,add); break; case "v": if (cm_args.length <= mode_args_counter) break; cmode.tweaktmpmodelist(CHANMODE_VOICE,add, cm_args[mode_args_counter]); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric(472, cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(cmode.addbits&cm)) { cmode.delbits |= cm; } else if (MODE[cm].list && MODE[cm].isnick) { for (member in chan.modelist[cm]) { cmode.delmodes += MODE[cm].modechar; cmode.delmodeargs += " " + chan.modelist[cm][member].nick; delete chan.modelist[cm][member]; } } else if (MODE[cm].list && !MODE[cm].isnick) { for (ban in chan.modelist[cm]) { cmode.delmodes += MODE[cm].modechar; cmode.delmodeargs += " " + chan.modelist[cm][ban]; delete chan.modelist[cm][ban]; delete chan.bantime[ban]; delete chan.bancreator[ban]; } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (cmode.addbits&CHANMODE_KEY)&& cmode.state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((cmode.addbits&cm) && (!(chan.mode&cm) || ((cm==CHANMODE_LIMIT)&&(chan.arg[CHANMODE_LIMIT]!= cmode.state_arg[CHANMODE_LIMIT])) ) ) { cmode.addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { cmode.addmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = cmode.state_arg[cm]; } } else if ((cmode.delbits&cm) && (chan.mode&cm)) { cmode.delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { cmode.delmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (cmode.addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANMODE_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANMODE_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Bans are a specialized case, sigh. for (z in cmode.tmplist[CHANMODE_BAN][true]) { // +b var set_ban = create_ban_mask( cmode.tmplist[CHANMODE_BAN][add][z]); if ((chan.count_modelist(CHANMODE_BAN) >= max_bans) && !this.server && !this.parent) { this.numeric(478, chan.nam + " " + set_ban + " :" + "Cannot add ban, channel's ban list is full."); } else if (set_ban && !chan.isbanned(set_ban)) { cmode.addmodes += "b"; cmode.addmodeargs += " " + set_ban; var banid = chan.modelist[CHANMODE_BAN].push(set_ban); chan.bantime[banid] = time(); chan.bancreator[banid] = this.nuh; } } for (z in cmode.tmplist[CHANMODE_BAN][false]) { // -b for (ban in chan.modelist[CHANMODE_BAN]) { if (cmode.tmplist[CHANMODE_BAN][false][z].toUpperCase() == chan.modelist[CHANMODE_BAN][ban].toUpperCase()) { cmode.delmodes += "b"; cmode.delmodeargs += " " + cmode.tmplist[CHANMODE_BAN][false][z]; delete chan.modelist[CHANMODE_BAN][ban]; delete chan.bantime[ban]; delete chan.bancreator[ban]; } } } // Modes where we just deal with lists of nicks. cmode.affect_mode_list(CHANMODE_OP); cmode.affect_mode_list(CHANMODE_VOICE); if (!cmode.addmodes && !cmode.delmodes) return 0; var final_modestr = ""; if (cmode.addmodes) final_modestr += "+" + cmode.addmodes; if (cmode.delmodes) final_modestr += "-" + cmode.delmodes; if (cmode.addmodeargs) final_modestr += cmode.addmodeargs; if (cmode.delmodeargs) final_modestr += cmode.delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan, str, true); else this.bcast_to_channel(chan, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan, str, true); else this.bcast_to_channel(chan, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/8b69825c26169d3cdc50f8ef1b669cbbfcb74900/ircd_channel.js/clean/load/ircd_channel.js |
chan.modelist[cm][member]; | chan.modelist[cm][member].nick; | function IRCClient_set_chanmode(chan,modeline,bounce_modes) { if (!chan || !modeline) return; var cmode = new ChanMode(chan,this); var cm_args = modeline.split(' '); var add=true; var mode_counter=0; var mode_args_counter=1; // start counting at args, not the modestring for (modechar in cm_args[0]) { mode_counter++; switch (cm_args[0][modechar]) { case "+": if (!add) add=true; mode_counter--; break; case "-": if (add) add=false; mode_counter--; break; case "b": if(add && (cm_args.length<=mode_args_counter)) { cmode.addbits|=CHANMODE_BAN;//list bans break; } cmode.tweaktmpmodelist(CHANMODE_BAN,add, cm_args[mode_args_counter]); mode_args_counter++; break; case "i": cmode.tweaktmpmode(CHANMODE_INVITE,add); break; case "k": if(cm_args.length > mode_args_counter) { cmode.tweaktmpmode(CHANMODE_KEY,add); cmode.state_arg[CHANMODE_KEY]=cm_args[mode_args_counter]; mode_args_counter++; } break; case "l": if (add && (cm_args.length > mode_args_counter)) { cmode.tweaktmpmode(CHANMODE_LIMIT,true); var regexp = "^[0-9]{1,5}$"; if(cm_args[mode_args_counter].match(regexp)) cmode.state_arg[CHANMODE_LIMIT]=cm_args[mode_args_counter]; mode_args_counter++; } else if (!add) { cmode.tweaktmpmode(CHANMODE_LIMIT,false); if (cm_args.length > mode_args_counter) mode_args_counter++; } break; case "m": cmode.tweaktmpmode(CHANMODE_MODERATED,add); break; case "n": cmode.tweaktmpmode(CHANMODE_NOOUTSIDE,add); break; case "o": if (cm_args.length <= mode_args_counter) break; cmode.tweaktmpmodelist(CHANMODE_OP,add, cm_args[mode_args_counter]); mode_args_counter++; break; case "p": if( (add && !(chan.mode&CHANMODE_SECRET) || (cmode.delbits&CHANMODE_SECRET) ) || (!add) ) cmode.tweaktmpmode(CHANMODE_PRIVATE,add); break; case "s": if( (add && !(chan.mode&CHANMODE_PRIVATE) || (cmode.delbits&CHANMODE_PRIVATE) ) || (!add) ) cmode.tweaktmpmode(CHANMODE_SECRET,add); break; case "t": cmode.tweaktmpmode(CHANMODE_TOPIC,add); break; case "v": if (cm_args.length <= mode_args_counter) break; cmode.tweaktmpmodelist(CHANMODE_VOICE,add, cm_args[mode_args_counter]); mode_args_counter++; break; default: if ((!this.parent) && (!this.server)) this.numeric(472, cm_args[0][modechar] + " :is unknown mode char to me."); mode_counter--; break; } if (mode_counter == max_modes) break; } // If we're bouncing modes, traverse our side of what the modes look // like and remove any modes not mentioned by what was passed to the // function. Or, clear any ops, voiced members, or bans on the 'bad' // side of the network sync. if (bounce_modes) { for (cm in MODE) { if (MODE[cm].state && (chan.mode&cm) && !(cmode.addbits&cm)) { cmode.delbits |= cm; } else if (MODE[cm].list) { for (member in chan.modelist[cm]) { cmode.delmodes += MODE[cm].modechar; cmode.delmodeargs += " " + chan.modelist[cm][member]; delete chan.modelist[cm][member]; } } } } // Now we run through all the mode toggles and construct our lists for // later display. We also play with the channel bit switches here. for (cm in MODE) { if (MODE[cm].state) { if ((cm&CHANMODE_KEY) && (cmode.addbits&CHANMODE_KEY)&& cmode.state_arg[cm] && chan.arg[cm] && !this.server && !this.parent && !bounce_modes) { this.numeric(467, chan.nam + " :Channel key already set."); } else if ((cmode.addbits&cm) && (!(chan.mode&cm) || ((cm==CHANMODE_LIMIT)&&(chan.arg[CHANMODE_LIMIT]!= cmode.state_arg[CHANMODE_LIMIT])) ) ) { cmode.addmodes += MODE[cm].modechar; chan.mode |= cm; if (MODE[cm].args && MODE[cm].state) { cmode.addmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = cmode.state_arg[cm]; } } else if ((cmode.delbits&cm) && (chan.mode&cm)) { cmode.delmodes += MODE[cm].modechar; chan.mode &= ~cm; if (MODE[cm].args && MODE[cm].state) { cmode.delmodeargs += " " + cmode.state_arg[cm]; chan.arg[cm] = ""; } } } } // This is a special case, if +b was passed to us without arguments, // we simply display a list of bans on the channel. if (cmode.addbits&CHANMODE_BAN) { for (the_ban in chan.modelist[CHANMODE_BAN]) { this.numeric(367, chan.nam + " " + chan.modelist[CHANMODE_BAN][the_ban] + " " + chan.bancreator[the_ban] + " " + chan.bantime[the_ban]); } this.numeric(368, chan.nam + " :End of Channel Ban List."); } // Bans are a specialized case, sigh. for (z in cmode.tmplist[CHANMODE_BAN][true]) { // +b var set_ban = create_ban_mask( cmode.tmplist[CHANMODE_BAN][add][z]); if ((chan.count_modelist(CHANMODE_BAN) >= max_bans) && !this.server && !this.parent) { this.numeric(478, chan.nam + " " + set_ban + " :" + "Cannot add ban, channel's ban list is full."); } else if (set_ban && !chan.isbanned(set_ban)) { cmode.addmodes += "b"; cmode.addmodeargs += " " + set_ban; var banid = chan.modelist[CHANMODE_BAN].push(set_ban); chan.bantime[banid] = time(); chan.bancreator[banid] = this.nuh; } } for (z in cmode.tmplist[CHANMODE_BAN][false]) { // -b for (ban in chan.modelist[CHANMODE_BAN]) { if (cmode.tmplist[CHANMODE_BAN][false][z].toUpperCase() == chan.modelist[CHANMODE_BAN][ban].toUpperCase()) { cmode.delmodes += "b"; cmode.delmodeargs += " " + cmode.tmplist[CHANMODE_BAN][false][z]; delete chan.modelist[CHANMODE_BAN][ban]; delete chan.bantime[ban]; delete chan.bancreator[ban]; } } } // Modes where we just deal with lists of nicks. cmode.affect_mode_list(CHANMODE_OP); cmode.affect_mode_list(CHANMODE_VOICE); if (!cmode.addmodes && !cmode.delmodes) return 0; var final_modestr = ""; if (cmode.addmodes) final_modestr += "+" + cmode.addmodes; if (cmode.delmodes) final_modestr += "-" + cmode.delmodes; if (cmode.addmodeargs) final_modestr += cmode.addmodeargs; if (cmode.delmodeargs) final_modestr += cmode.delmodeargs; var final_args = final_modestr.split(' '); var arg_counter = 0; var mode_counter = 0; var mode_output = ""; var f_mode_args = ""; for (marg in final_args[0]) { switch (final_args[0][marg]) { case "+": mode_output += "+"; add = true; break; case "-": mode_output += "-"; add = false; break; case "l": if (!add) { mode_counter++; mode_output += final_args[0][marg]; break; } case "b": // only modes with arguments case "k": case "l": case "o": case "v": arg_counter++; f_mode_args += " " + final_args[arg_counter]; default: mode_counter++; mode_output += final_args[0][marg]; break; } if (mode_counter >= max_modes) { var str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan, str, true); else this.bcast_to_channel(chan, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); if (add) mode_output = "+"; else mode_output = "-"; f_mode_args = ""; } } if (mode_output.length > 1) { str = "MODE " + chan.nam + " " + mode_output + f_mode_args; if (!this.server) this.bcast_to_channel(chan, str, true); else this.bcast_to_channel(chan, str, false); if (chan.nam[0] != "&") this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/5515f7a88d460c5a09e24c04147301b32edab7b3/ircd.js/buggy/ircd.js |
return 1; | return bcast_modestr; | function IRCClient_setusermode(modestr) { if (!modestr) return 0; var add=true; var unknown_mode=false; var umode = new UMode(); for (modechar in modestr) { switch (modestr[modechar]) { case "+": if (!add) add=true; break; case "-": if (add) add=false; break; case "i": case "w": case "s": case "k": case "g": umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "b": case "r": case "f": case "y": case "d": case "n": if (this.mode&USERMODE_OPER) umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "o": // Allow +o only by servers or non-local users. if (add && this.parent && Servers[this.parent.toLowerCase()].hub) umode.tweak_mode(USERMODE_OPER,true); else if (!add) umode.tweak_mode(USERMODE_OPER,false); break; case "c": if ((this.mode&USERMODE_OPER) && (this.flags&OLINE_CAN_UMODEC)) umode.tweak_mode(USERMODE_CLIENT,add); break; default: if (!unknown_mode && !this.parent) { this.numeric(501, ":Unknown MODE flag"); unknown_mode=true; } break; } } var addmodes = ""; var delmodes = ""; var bcast_addmodes = ""; var bcast_delmodes = ""; for (mym in USERMODE_CHAR) { if ((umode.add_flags&USERMODE_CHAR[mym]) && !(this.mode&USERMODE_CHAR[mym])) { addmodes += mym; if (USERMODE_BCAST[mym]) bcast_addmodes += mym; this.mode |= USERMODE_CHAR[mym]; } else if ((umode.del_flags&USERMODE_CHAR[mym]) && (this.mode&USERMODE_CHAR[mym])) { delmodes += mym; if (USERMODE_BCAST[mym]) bcast_delmodes += mym; this.mode &= ~USERMODE_CHAR[mym]; } } if (!addmodes && !delmodes) return 0; var final_modestr = ""; var bcast_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (bcast_addmodes) bcast_modestr += "+" + bcast_addmodes; if (bcast_delmodes) bcast_modestr += "-" + bcast_delmodes; if (this.local) { this.originatorout("MODE "+this.nick+" "+final_modestr,this); if (bcast_addmodes || bcast_delmodes) this.bcast_to_servers("MODE "+this.nick+" "+bcast_modestr,this); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/d7e9d85bdc61be7999f89fc1628bdaf25aebf518/ircd.js/clean/ircd.js |
Servers[this.parent].hub) | Servers[this.parent.toLowerCase()].hub) | function IRCClient_setusermode(modestr) { if (!modestr) return 0; var add=true; var unknown_mode=false; var umode = new UMode(); for (modechar in modestr) { switch (modestr[modechar]) { case "+": if (!add) add=true; break; case "-": if (add) add=false; break; case "i": case "w": case "s": case "k": case "g": umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "b": case "r": case "f": case "y": case "d": case "n": if (this.mode&USERMODE_OPER) umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "o": // Allow +o only by servers or non-local users. if (add && this.parent && Servers[this.parent].hub) umode.tweak_mode(USERMODE_OPER,true); else if (!add) umode.tweak_mode(USERMODE_OPER,false); break; case "c": if ((this.mode&USERMODE_OPER) && (this.flags&OLINE_CAN_UMODEC)) umode.tweak_mode(USERMODE_CLIENT,add); break; default: if (!unknown_mode && !this.parent) { this.numeric(501, ":Unknown MODE flag"); unknown_mode=true; } break; } } var addmodes = ""; var delmodes = ""; var bcast_addmodes = ""; var bcast_delmodes = ""; for (mym in USERMODE_CHAR) { if ((umode.add_flags&USERMODE_CHAR[mym]) && !(this.mode&USERMODE_CHAR[mym])) { addmodes += mym; if (USERMODE_BCAST[mym]) bcast_addmodes += mym; this.mode |= USERMODE_CHAR[mym]; } else if ((umode.del_flags&USERMODE_CHAR[mym]) && (this.mode&USERMODE_CHAR[mym])) { delmodes += mym; if (USERMODE_BCAST[mym]) bcast_delmodes += mym; this.mode &= ~USERMODE_CHAR[mym]; } } if (!addmodes && !delmodes) return 0; var final_modestr = ""; var bcast_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (bcast_addmodes) bcast_modestr += "+" + bcast_addmodes; if (bcast_delmodes) bcast_modestr += "-" + bcast_delmodes; if (this.local) { this.originatorout("MODE "+this.nick+" "+final_modestr,this); if (bcast_addmodes || bcast_delmodes) this.bcast_to_servers("MODE "+this.nick+" "+bcast_modestr,this); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/9b31fc080a4a6c10c64fce10214bfae574877b10/ircd.js/clean/ircd.js |
bcast_modestr += "-" + bc|= USERMODE_CHAR[mym]; } else if ((umode.del_flags&USERMODE_CHAR[mym]) && | bcast_modestr += "-" + bcast_delmodes; if (!this.local) { this.originatorout("MODE "+this.nick+" "+final_modestr,this); if (bcast_addmodes || bcast_delmodes) this.bcast_to_servers("MODE "+this.nick+" "+bcast_modestr,this); } return 1; } | function IRCClient_setusermode(modestr) { if (!modestr) return 0; var add=true; var unknown_mode=false; var umode = new UMode(); for (modechar in modestr) { switch (modestr[modechar]) { case "+": if (!add) add=true; break; case "-": if (add) add=false; break; case "i": case "w": case "s": case "k": case "g": umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "b": case "r": case "f": case "y": case "d": case "n": if (this.mode&USERMODE_OPER) umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "o": // Allow +o only by servers or non-local users. if (add && this.parent && Servers[this.parent].hub) umode.tweak_mode(USERMODE_OPER,true); else if (!add) umode.tweak_mode(USERMODE_OPER,false); break; case "c": if ((this.mode&USERMODE_OPER) && (this.flags&OLINE_CAN_UMODEC)) umode.tweak_mode(USERMODE_CLIENT,add); break; default: if (!unknown_mode && !this.parent) { this.numeric(501, ":Unknown MODE flag"); unknown_mode=true; } break; } } var addmodes = ""; var delmodes = ""; var bcast_addmodes = ""; var bcast_delmodes = ""; for (mym in USERMODE_CHAR) { if ((umode.add_flags&USERMODE_CHAR[mym]) && !(this.mode&USERMODE_CHAR[mym])) { addmodes += mym; if (USERMODE_BCAST[mym]) bcast_addmodes += mym; this.mode |= USERMODE_CHAR[mym]; } else if ((umode.del_flags&USERMODE_CHAR[mym]) && (this.mode&USERMODE_CHAR[mym])) { delmodes += mym; if (USERMODE_BCAST[mym]) bcast_delmodes += mym; this.mode &= ~USERMODE_CHAR[mym]; } } if (!addmodes && !delmodes) return 0; var final_modestr = ""; var bcast_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (bcast_addmodes) bcast_modestr += "+" + bcast_addmodes; if (bcast_delmodes) bcast_modestr += "-" + bc|= USERMODE_CHAR[mym]; } else if ((umode.del_flags&USERMODE_CHAR[mym]) && | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/8655f5b670de3ada98ae40e6450c03b4f14e5e19/ircd.js/buggy/ircd.js |
if (!this.local) { | if (this.local) { | function IRCClient_setusermode(modestr) { if (!modestr) return 0; var add=true; var unknown_mode=false; var umode = new UMode(); for (modechar in modestr) { switch (modestr[modechar]) { case "+": if (!add) add=true; break; case "-": if (add) add=false; break; case "i": case "w": case "s": case "k": case "g": umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "b": case "r": case "f": case "y": case "d": case "n": if (this.mode&USERMODE_OPER) umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "o": // Allow +o only by servers or non-local users. if (add && this.parent && Servers[this.parent].hub) umode.tweak_mode(USERMODE_OPER,true); else if (!add) umode.tweak_mode(USERMODE_OPER,false); break; case "c": if ((this.mode&USERMODE_OPER) && (this.flags&OLINE_CAN_UMODEC)) umode.tweak_mode(USERMODE_CLIENT,add); break; default: if (!unknown_mode && !this.parent) { this.numeric(501, ":Unknown MODE flag"); unknown_mode=true; } break; } } var addmodes = ""; var delmodes = ""; var bcast_addmodes = ""; var bcast_delmodes = ""; for (mym in USERMODE_CHAR) { if ((umode.add_flags&USERMODE_CHAR[mym]) && !(this.mode&USERMODE_CHAR[mym])) { addmodes += mym; if (USERMODE_BCAST[mym]) bcast_addmodes += mym; this.mode |= USERMODE_CHAR[mym]; } else if ((umode.del_flags&USERMODE_CHAR[mym]) && (this.mode&USERMODE_CHAR[mym])) { delmodes += mym; if (USERMODE_BCAST[mym]) bcast_delmodes += mym; this.mode &= ~USERMODE_CHAR[mym]; } } if (!addmodes && !delmodes) return 0; var final_modestr = ""; var bcast_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (bcast_addmodes) bcast_modestr += "+" + bcast_addmodes; if (bcast_delmodes) bcast_modestr += "-" + bcast_delmodes; if (!this.local) { this.originatorout("MODE "+this.nick+" "+final_modestr,this); if (bcast_addmodes || bcast_delmodes) this.bcast_to_servers("MODE "+this.nick+" "+bcast_modestr,this); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/e2a46e07c31507d0ff28d8ff0001d864c0747681/ircd.js/buggy/ircd.js |
add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; | var add=true; var unknown_mode=false; var umode = new UMode(); | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
add=true; | if (!add) add=true; | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
add=false; | if (add) add=false; | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } | case "w": case "s": case "k": umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); break; case "b": case "g": case "r": case "f": case "y": case "d": case "n": if (this.mode&USERMODE_OPER) umode.tweak_mode(USERMODE_CHAR [modestr[modechar]],add); | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } | if (add && this.parent && Clients[this.parent].hub) umode.tweak_mode(USERMODE_OPER,true); else if (!add) umode.tweak_mode(USERMODE_OPER,false); break; case "c": if ((this.mode&USERMODE_OPER) && (this.flags&OLINE_CAN_UMODEC)) umode.tweak_mode(USERMODE_CLIENT,add); | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
this.numeric("501", ":Unknown MODE flag"); | this.numeric(501, ":Unknown MODE flag"); | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; | var addmodes = ""; var delmodes = ""; var bcast_addmodes = ""; var bcast_delmodes = ""; for (mym in USERMODE_CHAR) { if ((umode.add_flags&USERMODE_CHAR[mym]) && !(this.mode&USERMODE_CHAR[mym])) { addmodes += mym; if (USERMODE_BCAST[mym]) bcast_addmodes += mym; this.mode |= USERMODE_CHAR[mym]; } else if ((umode.del_flags&USERMODE_CHAR[mym]) && (this.mode&USERMODE_CHAR[mym])) { delmodes += mym; if (USERMODE_BCAST[mym]) bcast_delmodes += mym; this.mode &= ~USERMODE_CHAR[mym]; } | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
final_modestr = ""; | var final_modestr = ""; var bcast_modestr = ""; | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); | this.originatorout("MODE "+this.nick+" "+final_modestr,this); if (bcast_addmodes || bcast_delmodes) this.bcast_to_servers("MODE "+this.nick+" "+bcast_modestr,this); | function IRCClient_setusermode(modestr) { if (!modestr) return 0; add=true; unknown_mode=false; addbits=USERMODE_NONE; delbits=USERMODE_NONE; for (modechar in modestr) { switch (modestr[modechar]) { case "+": add=true; break; case "-": add=false; break; case "i": if(add) { addbits|=USERMODE_INVISIBLE; delbits&=~USERMODE_INVISIBLE; } else { addbits&=~USERMODE_INVISIBLE; delbits|=USERMODE_INVISIBLE; } break; case "o": // Allow +o only by servers or non-local users. if (add && (this.parent) && Clients[this.parent].hub) { addbits|=USERMODE_OPER; delbits&=~USERMODE_OPER; } if(!add) { addbits&=~USERMODE_OPER; delbits|=USERMODE_OPER; } break; default: if (!unknown_mode && !this.parent) { this.numeric("501", ":Unknown MODE flag"); unknown_mode=true; } break; } } addmodes = ""; delmodes = ""; if ((addbits&USERMODE_INVISIBLE) && !(this.mode&USERMODE_INVISIBLE)) { addmodes += "i"; this.mode |= USERMODE_INVISIBLE; } else if ((delbits&USERMODE_INVISIBLE) && (this.mode&USERMODE_INVISIBLE)) { delmodes += "i"; this.mode &= ~USERMODE_INVISIBLE; } if ((addbits&USERMODE_OPER) && !(this.mode&USERMODE_OPER)) { addmodes += "o"; this.mode |= USERMODE_OPER; } else if ((delbits&USERMODE_OPER) && (this.mode&USERMODE_OPER)) { delmodes += "o"; this.mode &= ~USERMODE_OPER; } if (!addmodes && !delmodes) return 0; final_modestr = ""; if (addmodes) final_modestr += "+" + addmodes; if (delmodes) final_modestr += "-" + delmodes; if (!this.parent) { str = "MODE " + this.nick + " " + final_modestr; this.originatorout(str,this); this.bcast_to_servers(str); } return 1;} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
server_wallops("Sending NICK burst..."); | function IRCClient_synchronize() { this.rawout("BURST"); // warn of impending synchronization for (my_server in Clients) { if ((Clients[my_server].conntype == TYPE_SERVER) && (Clients[my_server].id != this.id) ) { this.server_info(Clients[my_server]); } } server_wallops("Sending NICK burst..."); for (my_client in Clients) { if ((Clients[my_client].conntype == TYPE_USER) || (Clients[my_client].conntype == TYPE_USER_REMOTE)) { this.server_nick_info(Clients[my_client]); } } server_wallops("Sending CHANNEL burst..."); for (my_channel in Channels) { if (my_channel[0] == "#") { this.server_chan_info(Channels[my_channel]); } } server_wallops("Sending TOPIC burst..."); for (my_channel in Channels) { if ((my_channel[0] == "#") && Channels[my_channel].topic) { chan = Channels[my_channel]; this.rawout("TOPIC " + chan.nam + " " + servername + " " + chan.topictime + " :" + chan.topic); } } this.rawout("BURST 0"); // burst completed.} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
|
server_wallops("Sending CHANNEL burst..."); | function IRCClient_synchronize() { this.rawout("BURST"); // warn of impending synchronization for (my_server in Clients) { if ((Clients[my_server].conntype == TYPE_SERVER) && (Clients[my_server].id != this.id) ) { this.server_info(Clients[my_server]); } } server_wallops("Sending NICK burst..."); for (my_client in Clients) { if ((Clients[my_client].conntype == TYPE_USER) || (Clients[my_client].conntype == TYPE_USER_REMOTE)) { this.server_nick_info(Clients[my_client]); } } server_wallops("Sending CHANNEL burst..."); for (my_channel in Channels) { if (my_channel[0] == "#") { this.server_chan_info(Channels[my_channel]); } } server_wallops("Sending TOPIC burst..."); for (my_channel in Channels) { if ((my_channel[0] == "#") && Channels[my_channel].topic) { chan = Channels[my_channel]; this.rawout("TOPIC " + chan.nam + " " + servername + " " + chan.topictime + " :" + chan.topic); } } this.rawout("BURST 0"); // burst completed.} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
|
server_wallops("Sending TOPIC burst..."); | oper_notice("Routing","from " + servername + ": " + this.nick + " has processed user/channel burst, sending topic burst."); | function IRCClient_synchronize() { this.rawout("BURST"); // warn of impending synchronization for (my_server in Clients) { if ((Clients[my_server].conntype == TYPE_SERVER) && (Clients[my_server].id != this.id) ) { this.server_info(Clients[my_server]); } } server_wallops("Sending NICK burst..."); for (my_client in Clients) { if ((Clients[my_client].conntype == TYPE_USER) || (Clients[my_client].conntype == TYPE_USER_REMOTE)) { this.server_nick_info(Clients[my_client]); } } server_wallops("Sending CHANNEL burst..."); for (my_channel in Channels) { if (my_channel[0] == "#") { this.server_chan_info(Channels[my_channel]); } } server_wallops("Sending TOPIC burst..."); for (my_channel in Channels) { if ((my_channel[0] == "#") && Channels[my_channel].topic) { chan = Channels[my_channel]; this.rawout("TOPIC " + chan.nam + " " + servername + " " + chan.topictime + " :" + chan.topic); } } this.rawout("BURST 0"); // burst completed.} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
oper_notice("Routing","from " + servername + ": " + this.nick + " has processed topic burst (synched to network data)."); | function IRCClient_synchronize() { this.rawout("BURST"); // warn of impending synchronization for (my_server in Clients) { if ((Clients[my_server].conntype == TYPE_SERVER) && (Clients[my_server].id != this.id) ) { this.server_info(Clients[my_server]); } } server_wallops("Sending NICK burst..."); for (my_client in Clients) { if ((Clients[my_client].conntype == TYPE_USER) || (Clients[my_client].conntype == TYPE_USER_REMOTE)) { this.server_nick_info(Clients[my_client]); } } server_wallops("Sending CHANNEL burst..."); for (my_channel in Channels) { if (my_channel[0] == "#") { this.server_chan_info(Channels[my_channel]); } } server_wallops("Sending TOPIC burst..."); for (my_channel in Channels) { if ((my_channel[0] == "#") && Channels[my_channel].topic) { chan = Channels[my_channel]; this.rawout("TOPIC " + chan.nam + " " + servername + " " + chan.topictime + " :" + chan.topic); } } this.rawout("BURST 0"); // burst completed.} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
|
if (Clients[my_client].away) this.rawout(":" + Clients[my_client].nick + " AWAY :" + Clients[my_client].away); | function IRCClient_synchronize() { this.rawout("BURST"); // warn of impending synchronization for (my_server in Clients) { if ((Clients[my_server].conntype == TYPE_SERVER) && (Clients[my_server].id != this.id) ) { this.server_info(Clients[my_server]); } } for (my_client in Clients) { if ((Clients[my_client].conntype == TYPE_USER) || (Clients[my_client].conntype == TYPE_USER_REMOTE)) { this.server_nick_info(Clients[my_client]); } } for (my_channel in Channels) { if (my_channel[0] == "#") { this.server_chan_info(Channels[my_channel]); } } oper_notice("Routing","from " + servername + ": " + this.nick + " has processed user/channel burst, sending topic burst."); for (my_channel in Channels) { if ((my_channel[0] == "#") && Channels[my_channel].topic) { var chan = Channels[my_channel]; this.rawout("TOPIC " + chan.nam + " " + chan.topicchangedby + " " + chan.topictime + " :" + chan.topic); } } this.rawout("BURST 0"); // burst completed. oper_notice("Routing","from " + servername + ": " + this.nick + " has processed topic burst (synched to network data).");} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/932a434bc900126d724150bfed8b94b9a8e530e1/ircd.js/buggy/ircd.js |
|
this.rawout("TOPIC " + chan.nam + " " + chan.topicchangedby + " " + chan.topictime + " :" + chan.topic); | this.rawout("TOPIC " + chan.nam + " " + chan.topicchangedby + " " + chan.topictime + " :" + chan.topic); | function IRCClient_synchronize() { this.rawout("BURST"); // warn of impending synchronization for (my_server in Servers) { if (Servers[my_server].id != this.id) this.server_info(Servers[my_server]); } for (my_client in Users) { this.server_nick_info(Users[my_client]); } for (my_channel in Channels) { if (my_channel[0] == "#") this.server_chan_info(Channels[my_channel]); } gnotice(this.nick + " has processed user/channel burst, "+ "sending topic burst."); for (my_channel in Channels) { if ((my_channel[0] == "#") && Channels[my_channel].topic) { var chan = Channels[my_channel]; this.rawout("TOPIC " + chan.nam + " " + chan.topicchangedby + " " + chan.topictime + " :" + chan.topic); } } this.rawout("BURST 0"); // burst completed. gnotice(this.nick + " has processed topic burst " + "(synched to network data).");} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4f81e4cda527089e4dcaa415a66740375f48551b/ircd_server.js/clean/load/ircd_server.js |
oper_notice("Routing","from " + servername + ": " + this.nick + " has processed user/channel burst, sending topic burst."); | umode_notice(USERMODE_ROUTING,"Routing","from " + servername + ": " + this.nick + " has processed user/channel burst, " + "sending topic burst."); | function IRCClient_synchronize() { this.rawout("BURST"); // warn of impending synchronization for (my_server in Clients) { if ((Clients[my_server].conntype == TYPE_SERVER) && (Clients[my_server].id != this.id) ) { this.server_info(Clients[my_server]); } } for (my_client in Clients) { if ((Clients[my_client].conntype == TYPE_USER) || (Clients[my_client].conntype == TYPE_USER_REMOTE)) { this.server_nick_info(Clients[my_client]); if (Clients[my_client].away) this.rawout(":" + Clients[my_client].nick + " AWAY :" + Clients[my_client].away); } } for (my_channel in Channels) { if (my_channel[0] == "#") { this.server_chan_info(Channels[my_channel]); } } oper_notice("Routing","from " + servername + ": " + this.nick + " has processed user/channel burst, sending topic burst."); for (my_channel in Channels) { if ((my_channel[0] == "#") && Channels[my_channel].topic) { var chan = Channels[my_channel]; this.rawout("TOPIC " + chan.nam + " " + chan.topicchangedby + " " + chan.topictime + " :" + chan.topic); } } this.rawout("BURST 0"); // burst completed. oper_notice("Routing","from " + servername + ": " + this.nick + " has processed topic burst (synched to network data).");} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
oper_notice("Routing","from " + servername + ": " + this.nick + " has processed topic burst (synched to network data)."); | umode_notice(USERMODE_ROUTING,"Routing","from " + servername + ": " + this.nick + " has processed topic burst " + "(synched to network data)."); | function IRCClient_synchronize() { this.rawout("BURST"); // warn of impending synchronization for (my_server in Clients) { if ((Clients[my_server].conntype == TYPE_SERVER) && (Clients[my_server].id != this.id) ) { this.server_info(Clients[my_server]); } } for (my_client in Clients) { if ((Clients[my_client].conntype == TYPE_USER) || (Clients[my_client].conntype == TYPE_USER_REMOTE)) { this.server_nick_info(Clients[my_client]); if (Clients[my_client].away) this.rawout(":" + Clients[my_client].nick + " AWAY :" + Clients[my_client].away); } } for (my_channel in Channels) { if (my_channel[0] == "#") { this.server_chan_info(Channels[my_channel]); } } oper_notice("Routing","from " + servername + ": " + this.nick + " has processed user/channel burst, sending topic burst."); for (my_channel in Channels) { if ((my_channel[0] == "#") && Channels[my_channel].topic) { var chan = Channels[my_channel]; this.rawout("TOPIC " + chan.nam + " " + chan.topicchangedby + " " + chan.topictime + " :" + chan.topic); } } this.rawout("BURST 0"); // burst completed. oper_notice("Routing","from " + servername + ": " + this.nick + " has processed topic burst (synched to network data).");} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
function IRCClient_tweaktmpmode(tmp_bit) { | function IRCClient_tweaktmpmode(tmp_bit,chan) { | function IRCClient_tweaktmpmode(tmp_bit) { if ((!chan.ismode(this.id,CHANLIST_OP)) && (!this.server) && (!this.parent)) { this.numeric482(chan.nam); return 0; } if (add) { addbits|=tmp_bit; delbits&=~tmp_bit; } else { addbits&=~tmp_bit; delbits|=tmp_bit; }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/1f7df8dae9854766be9a4fcdf05f1c322fba0a96/ircd.js/buggy/ircd.js |
function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl) { | function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl,chan) { | function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl) { if ((!chan.ismode(this.id,CHANLIST_OP)) && (!this.server) && (!this.parent)) { this.numeric482(chan.nam); return 0; } if (add) { tmp_match = false; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem].toUpperCase() == cm_args[mode_args_counter].toUpperCase()) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_args[mode_args_counter]; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem].toUpperCase() == cm_args[mode_args_counter].toUpperCase()) ) chan_tmplist[tmp_ncl][lstitem] = ""; } } } else { tmp_match = false; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem].toUpperCase() == cm_args[mode_args_counter].toUpperCase()) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_args[mode_args_counter]; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem].toUpperCase() == cm_args[mode_args_counter].toUpperCase()) ) chan_tmplist[tmp_cl][lstitem] = ""; } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/1f7df8dae9854766be9a4fcdf05f1c322fba0a96/ircd.js/buggy/ircd.js |
(chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) | (chan_tmplist[tmp_cl][lstitem].toUpperCase() == cm_args[mode_args_counter].toUpperCase()) | function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl) { if ((!chan.ismode(this.id,CHANLIST_OP)) && (!this.server) && (!this.parent)) { this.numeric482(chan.nam); return 0; } if (add) { tmp_match = false; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_ncl][lstitem] = ""; } } } else { tmp_match = false; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_cl][lstitem] = ""; } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/676b0e584f59b15abf9a76f2142d9d94a1b1bfc5/ircd.js/clean/ircd.js |
chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_cmd[mode_args_counter]; | chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_args[mode_args_counter]; | function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl) { if ((!chan.ismode(this.id,CHANLIST_OP)) && (!this.server) && (!this.parent)) { this.numeric482(chan.nam); return 0; } if (add) { tmp_match = false; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_ncl][lstitem] = ""; } } } else { tmp_match = false; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_cl][lstitem] = ""; } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/676b0e584f59b15abf9a76f2142d9d94a1b1bfc5/ircd.js/clean/ircd.js |
(chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) | (chan_tmplist[tmp_ncl][lstitem].toUpperCase() == cm_args[mode_args_counter].toUpperCase()) | function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl) { if ((!chan.ismode(this.id,CHANLIST_OP)) && (!this.server) && (!this.parent)) { this.numeric482(chan.nam); return 0; } if (add) { tmp_match = false; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_ncl][lstitem] = ""; } } } else { tmp_match = false; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_cl][lstitem] = ""; } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/676b0e584f59b15abf9a76f2142d9d94a1b1bfc5/ircd.js/clean/ircd.js |
(chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) | (chan_tmplist[tmp_ncl][lstitem].toUpperCase() == cm_args[mode_args_counter].toUpperCase()) | function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl) { if ((!chan.ismode(this.id,CHANLIST_OP)) && (!this.server) && (!this.parent)) { this.numeric482(chan.nam); return 0; } if (add) { tmp_match = false; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_ncl][lstitem] = ""; } } } else { tmp_match = false; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_cl][lstitem] = ""; } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/676b0e584f59b15abf9a76f2142d9d94a1b1bfc5/ircd.js/clean/ircd.js |
chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_cmd[mode_args_counter]; | chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_args[mode_args_counter]; | function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl) { if ((!chan.ismode(this.id,CHANLIST_OP)) && (!this.server) && (!this.parent)) { this.numeric482(chan.nam); return 0; } if (add) { tmp_match = false; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_ncl][lstitem] = ""; } } } else { tmp_match = false; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_cl][lstitem] = ""; } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/676b0e584f59b15abf9a76f2142d9d94a1b1bfc5/ircd.js/clean/ircd.js |
(chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) | (chan_tmplist[tmp_cl][lstitem].toUpperCase() == cm_args[mode_args_counter].toUpperCase()) | function IRCClient_tweaktmpmodelist(tmp_cl,tmp_ncl) { if ((!chan.ismode(this.id,CHANLIST_OP)) && (!this.server) && (!this.parent)) { this.numeric482(chan.nam); return 0; } if (add) { tmp_match = false; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_cl][chan_tmplist[tmp_cl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_ncl][lstitem] = ""; } } } else { tmp_match = false; for (lstitem in chan_tmplist[tmp_ncl]) { if (chan_tmplist[tmp_ncl][lstitem] && (chan_tmplist[tmp_ncl][lstitem] == cm_cmd[mode_args_counter]) ) tmp_match = true; } if(!tmp_match) { chan_tmplist[tmp_ncl][chan_tmplist[tmp_ncl].length] = cm_cmd[mode_args_counter]; for (lstitem in chan_tmplist[tmp_cl]) { if (chan_tmplist[tmp_cl][lstitem] && (chan_tmplist[tmp_cl][lstitem] == cm_cmd[mode_args_counter]) ) chan_tmplist[tmp_cl][lstitem] = ""; } } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/676b0e584f59b15abf9a76f2142d9d94a1b1bfc5/ircd.js/clean/ircd.js |
this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + version); | this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + VERSION); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } if (cmd[1][0] == ":") cmd[1] = cmd[1].slice(1); this.ircout("PONG " + servername + " :" + cmd[1]); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } this_nline = ""; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } } if (!this_nline) { this.rawout("ERROR :Server not configured."); this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.rawout("ERROR :Server already exists."); this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1]; this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*"))) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*")) { // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + version); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + version + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); server_wallops("Client Connect: " + this.ircnuh + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " " + this.decip + " 0 :" + this.realname); } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; server_wallops("SERVER Connect: " + this.nick + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(CLines[cl].servername == this.nick) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
this.numeric("004", servername + " " + version + " oi biklmnopstv"); | this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } if (cmd[1][0] == ":") cmd[1] = cmd[1].slice(1); this.ircout("PONG " + servername + " :" + cmd[1]); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } this_nline = ""; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } } if (!this_nline) { this.rawout("ERROR :Server not configured."); this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.rawout("ERROR :Server already exists."); this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1]; this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*"))) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*")) { // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + version); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + version + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); server_wallops("Client Connect: " + this.ircnuh + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " " + this.decip + " 0 :" + this.realname); } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; server_wallops("SERVER Connect: " + this.nick + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(CLines[cl].servername == this.nick) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
server_wallops("Client Connect: " + this.ircnuh + " (" + this.realname + ")"); | oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } if (cmd[1][0] == ":") cmd[1] = cmd[1].slice(1); this.ircout("PONG " + servername + " :" + cmd[1]); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } this_nline = ""; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } } if (!this_nline) { this.rawout("ERROR :Server not configured."); this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.rawout("ERROR :Server already exists."); this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1]; this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*"))) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*")) { // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + version); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + version + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); server_wallops("Client Connect: " + this.ircnuh + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " " + this.decip + " 0 :" + this.realname); } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; server_wallops("SERVER Connect: " + this.nick + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(CLines[cl].servername == this.nick) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
server_wallops("SERVER Connect: " + this.nick + " (" + this.realname + ")"); | oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } if (cmd[1][0] == ":") cmd[1] = cmd[1].slice(1); this.ircout("PONG " + servername + " :" + cmd[1]); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } this_nline = ""; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } } if (!this_nline) { this.rawout("ERROR :Server not configured."); this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.rawout("ERROR :Server already exists."); this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1]; this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*"))) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*")) { // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + version); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + version + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); server_wallops("Client Connect: " + this.ircnuh + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " " + this.decip + " 0 :" + this.realname); } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; server_wallops("SERVER Connect: " + this.nick + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(CLines[cl].servername == this.nick) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
if (!this_nline) { | if (!this_nline || ((this_nline.password == "*") && !this.sentps)) { | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } else if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); var usernum = system.matchuser(qwkid); var bbsuser = new User(usernum); if ((this.password.toUpperCase() == bbsuser.security.password) && (bbsuser.security.restrictions&UFLAG_Q) ) { this_nline = NLines[nl]; break; } } } if (!this_nline) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. this.ircclass = this.searchbyiline(); if (!this.ircclass) { this.quit("You are not authorized to use this server."); return 0; } // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(match_irc_mask(this.nick,CLines[cl].servername)) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/932a434bc900126d724150bfed8b94b9a8e530e1/ircd.js/buggy/ircd.js |
cmd=cmdline.split(' '); | var cmd=cmdline.split(' '); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } var the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization.",true); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ( (!this_nline || ( (this_nline.password == "*") && !this.sentps && !(this_nline.flags&NLINE_CHECK_QWKPASSWD) ) ) && !qwk_slave) { this.quit("ERROR: Server not configured.",true); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists.",true); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server.",true); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server.",true); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied.",true); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); umode_notice(USERMODE_CLIENT,"Client","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f2f97bbbb51c190c74d5d75a9f8d6aac710d97ad/ircd.js/buggy/ircd.js |
this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); | this.numeric("004", servername + " " + VERSION + " oiwbgscrkfydnhF biklmnopstv"); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } var the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization.",true); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ( (!this_nline || ( (this_nline.password == "*") && !this.sentps && !(this_nline.flags&NLINE_CHECK_QWKPASSWD) ) ) && !qwk_slave) { this.quit("ERROR: Server not configured.",true); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists.",true); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server.",true); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server.",true); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied.",true); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); umode_notice(USERMODE_CLIENT,"Client","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f2f97bbbb51c190c74d5d75a9f8d6aac710d97ad/ircd.js/buggy/ircd.js |
server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); | server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode(true) + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } var the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization.",true); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ( (!this_nline || ( (this_nline.password == "*") && !this.sentps && !(this_nline.flags&NLINE_CHECK_QWKPASSWD) ) ) && !qwk_slave) { this.quit("ERROR: Server not configured.",true); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists.",true); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server.",true); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server.",true); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied.",true); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); umode_notice(USERMODE_CLIENT,"Client","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/f2f97bbbb51c190c74d5d75a9f8d6aac710d97ad/ircd.js/buggy/ircd.js |
this.numeric461(command); | this.numeric(409,":No origin specified."); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); var usernum = system.matchuser(qwkid); var bbsuser = new User(usernum); if ((this.password.toUpperCase() == bbsuser.security.password) && (bbsuser.security.restrictions&UFLAG_Q) ) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if (!this_nline || ((this_nline.password == "*") && !this.sentps)) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. this.ircclass = this.searchbyiline(); if (!this.ircclass) { this.quit("You are not authorized to use this server."); return 0; } // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(match_irc_mask(this.nick,CLines[cl].servername)) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/648f341bbfcf39d714c3a0746ccef5a350ef8d6a/ircd.js/clean/ircd.js |
this.ircclass = this.searchbyiline(); if (!this.ircclass) { | var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); var usernum = system.matchuser(qwkid); var bbsuser = new User(usernum); if ((this.password.toUpperCase() == bbsuser.security.password) && (bbsuser.security.restrictions&UFLAG_Q) ) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if (!this_nline || ((this_nline.password == "*") && !this.sentps)) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. this.ircclass = this.searchbyiline(); if (!this.ircclass) { this.quit("You are not authorized to use this server."); return 0; } // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(match_irc_mask(this.nick,CLines[cl].servername)) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/648f341bbfcf39d714c3a0746ccef5a350ef8d6a/ircd.js/clean/ircd.js |
this.ircclass = tmp_iline.ircclass; | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); var usernum = system.matchuser(qwkid); var bbsuser = new User(usernum); if ((this.password.toUpperCase() == bbsuser.security.password) && (bbsuser.security.restrictions&UFLAG_Q) ) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if (!this_nline || ((this_nline.password == "*") && !this.sentps)) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. this.ircclass = this.searchbyiline(); if (!this.ircclass) { this.quit("You are not authorized to use this server."); return 0; } // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(match_irc_mask(this.nick,CLines[cl].servername)) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/648f341bbfcf39d714c3a0746ccef5a350ef8d6a/ircd.js/clean/ircd.js |
|
if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } else if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { | if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } else if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); var usernum = system.matchuser(qwkid); var bbsuser = new User(usernum); if ((this.password.toUpperCase() == bbsuser.security.password) && (bbsuser.security.restrictions&UFLAG_Q) ) { this_nline = NLines[nl]; break; } } } if (!this_nline || ((this_nline.password == "*") && !this.sentps)) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. this.ircclass = this.searchbyiline(); if (!this.ircclass) { this.quit("You are not authorized to use this server."); return 0; } // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(match_irc_mask(this.nick,CLines[cl].servername)) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/c71bbcc8e28edc92726ddae3687849412ae6f35b/ircd.js/clean/ircd.js |
} else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } else if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); var usernum = system.matchuser(qwkid); var bbsuser = new User(usernum); if ((this.password.toUpperCase() == bbsuser.security.password) && (bbsuser.security.restrictions&UFLAG_Q) ) { this_nline = NLines[nl]; break; } } } if (!this_nline || ((this_nline.password == "*") && !this.sentps)) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. this.ircclass = this.searchbyiline(); if (!this.ircclass) { this.quit("You are not authorized to use this server."); return 0; } // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(match_irc_mask(this.nick,CLines[cl].servername)) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/c71bbcc8e28edc92726ddae3687849412ae6f35b/ircd.js/clean/ircd.js |
|
if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { | if ( (!this_nline || ( (this_nline.password == "*") && !this.sentps && !(this_nline.flags&NLINE_CHECK_QWKPASSWD) ) ) && !qwk_slave) { | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization.",true); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { this.quit("ERROR: Server not configured.",true); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists.",true); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server.",true); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server.",true); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied.",true); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/19b6952eea9ed171d43eaf79c846a2ef95793fbe/ircd.js/buggy/ircd.js |
var tmp_iline; tmp_iline = this.searchbyiline(); | var tmp_iline = this.searchbyiline(); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization.",true); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { this.quit("ERROR: Server not configured.",true); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists.",true); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server.",true); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server.",true); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied.",true); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/19b6952eea9ed171d43eaf79c846a2ef95793fbe/ircd.js/buggy/ircd.js |
this.uprefix = "~" + parse_username(cmd[1]); | var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; | function IRCClient_unregistered_commands(command, cmdline) { cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } if (cmd[1][0] == ":") cmd[1] = cmd[1].slice(1); this.ircout("PONG " + servername + " :" + cmd[1]); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } this_nline = ""; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } } if (!this_nline) { this.rawout("ERROR :Server not configured."); this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.rawout("ERROR :Server already exists."); this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1]; this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); this.uprefix = "~" + parse_username(cmd[1]); break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*")) { // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + version); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + version + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); server_wallops("Client Connect: " + this.ircnuh + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " " + this.decip + " 0 :" + this.realname); } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; server_wallops("SERVER Connect: " + this.nick + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(CLines[cl].servername == this.nick) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/995570afd2ebfd8ca9cc37782b0e8fc41222eae4/ircd.js/clean/ircd.js |
} if (this.password && (unreg_username || (this.nick != "*"))) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } | function IRCClient_unregistered_commands(command, cmdline) { cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } if (cmd[1][0] == ":") cmd[1] = cmd[1].slice(1); this.ircout("PONG " + servername + " :" + cmd[1]); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } this_nline = ""; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } } if (!this_nline) { this.rawout("ERROR :Server not configured."); this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.rawout("ERROR :Server already exists."); this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1]; this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); this.uprefix = "~" + parse_username(cmd[1]); break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*")) { // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + version); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + version + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); server_wallops("Client Connect: " + this.ircnuh + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " " + this.decip + " 0 :" + this.realname); } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; server_wallops("SERVER Connect: " + this.nick + " (" + this.realname + ")"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(CLines[cl].servername == this.nick) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/995570afd2ebfd8ca9cc37782b0e8fc41222eae4/ircd.js/clean/ircd.js |
|
this.quit("No QWK master available for authorization."); | this.quit("No QWK master available for authorization.",true); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization."); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server."); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied."); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
this.quit("ERROR: Server not configured."); | this.quit("ERROR: Server not configured.",true); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization."); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server."); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied."); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
this.quit("ERROR: Server already exists."); | this.quit("ERROR: Server already exists.",true); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization."); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server."); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied."); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
this.quit("You've been K:Lined from this server."); | this.quit("You've been K:Lined from this server.",true); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization."); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server."); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied."); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
this.quit("You are not authorized to use this server."); | this.quit("You are not authorized to use this server.",true); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization."); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server."); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied."); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
this.quit("Denied."); | this.quit("Denied.",true); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization."); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ((!this_nline || ((this_nline.password == "*") && !this.sentps)) && !qwk_slave) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server."); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied."); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); | umode_notice(USERMODE_CLIENT,"Client","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } var the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; var qwk_slave = false; var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { if (check_qwk_passwd(qwkid,this.password)) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].flags&NLINE_CHECK_WITH_QWKMASTER) && match_irc_mask(cmd[1],NLines[nl].servername)) { for (qwkm_nl in NLines) { if (NLines[qwkm_nl].flags&NLINE_IS_QWKMASTER) { var qwk_master = searchbyserver(NLines[qwkm_nl].servername); if (!qwk_master) { this.quit("No QWK master available for authorization.",true); return 0; } else { qwk_master.rawout(":" + servername + " PASS " + this.password + " :" + qwkid + " QWK"); qwk_slave = true; } } } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if ( (!this_nline || ( (this_nline.password == "*") && !this.sentps && !(this_nline.flags&NLINE_CHECK_QWKPASSWD) ) ) && !qwk_slave) { this.quit("ERROR: Server not configured.",true); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists.",true); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; if (!qwk_slave) { // qwk slaves should never be hubs. this.server = true; this.conntype = TYPE_SERVER; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server.",true); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server.",true); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied.",true); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { this.finalize_server_connect("TS"); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
this.sentps = true; | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric(409,":No origin specified."); break; } this.ircout("PONG " + servername + " :" + ircstring(cmdline)); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } var this_nline = 0; for (nl in NLines) { if ((NLines[nl].flags&NLINE_CHECK_QWKPASSWD) && match_irc_mask(cmd[1],NLines[nl].servername)) { var qwkid = cmd[1].slice(0,cmd[1].indexOf(".")).toUpperCase(); var usernum = system.matchuser(qwkid); var bbsuser = new User(usernum); if ((this.password.toUpperCase() == bbsuser.security.password) && (bbsuser.security.restrictions&UFLAG_Q) ) { this_nline = NLines[nl]; break; } } else if ((NLines[nl].password == this.password) && (match_irc_mask(cmd[1],NLines[nl].servername)) ) { this_nline = NLines[nl]; break; } } if (!this_nline || ((this_nline.password == "*") && !this.sentps)) { this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1].toLowerCase(); this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; this.flags = this_nline.flags; for (hl in HLines) { if (HLines[hl].servername.toUpperCase() == this.nick.toUpperCase()) { this.hub = true; break; } } break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*")) && !this.server) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*") && !this.server) { // Check for a valid I:Line. var tmp_iline; tmp_iline = this.searchbyiline(); if (!tmp_iline) { this.numeric(463, ":Your host isn't among the privileged."); this.quit("You are not authorized to use this server."); return 0; } if (tmp_iline.password) { if (tmp_iline.password != this.password) { this.numeric(464, ":Password Incorrect."); this.quit("Denied."); return 0; } } // We meet registration criteria. Continue. this.ircclass = tmp_iline.ircclass; hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " 0 " + ip_to_int(this.ip) + " :" + this.realname); /// Otherwise, it's a server trying to connect. } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(match_irc_mask(this.nick,CLines[cl].servername)) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a697289b2285a18656115e68c62bcc033aa5b402/ircd.js/clean/ircd.js |
|
this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + VERSION); | this.numeric("002", ":Your host is " + servername + ", running " + VERSION); | function IRCClient_unregistered_commands(command, cmdline) { if (command.match(/^[0-9]+/)) return 0; // we ignore all numerics from unregistered clients. cmd=cmdline.split(' '); switch(command) { case "CAPAB": break; // silently ignore for now. case "NICK": if (!cmd[1]) { this.numeric(431, ":No nickname given."); break; } the_nick = ircstring(cmd[1]).slice(0,max_nicklen); if (this.check_nickname(the_nick)) this.nick = the_nick; break; case "PASS": if (!cmd[1]) break; this.password = cmd[1]; break; case "PING": if (!cmd[1]) { this.numeric461(command); break; } if (cmd[1][0] == ":") cmd[1] = cmd[1].slice(1); this.ircout("PONG " + servername + " :" + cmd[1]); break; case "PONG": this.pinged = false; break; case "SERVER": if (this.nick != "*") { this.numeric462(); break; } if (!cmd[3]) { this.numeric461("SERVER"); break; } this_nline = ""; for (nl in NLines) { if ((NLines[nl].password == this.password) && (NLines[nl].servername == cmd[1])) { this_nline = NLines[nl]; break; } } if (!this_nline) { this.rawout("ERROR :Server not configured."); this.quit("ERROR: Server not configured."); return 0; } if (searchbyserver(cmd[1])) { this.rawout("ERROR :Server already exists."); this.quit("ERROR: Server already exists."); return 0; } this.nick = cmd[1]; this.hops = cmd[2]; this.realname = ircstring(cmdline); this.server = true; this.conntype = TYPE_SERVER; this.linkparent = servername; this.parent = this.id; break; case "USER": if (this.server) { this.numeric462(); break; } if (!cmd[4]) { this.numeric461("USER"); break; } this.realname = ircstring(cmdline).slice(0,50); var unreg_username = parse_username(cmd[1]); this.uprefix = "~" + unreg_username; break; case "QUIT": this.quit(ircstring(cmdline),true); return; default: this.numeric451(); break; } if (this.uprefix && isklined(this.uprefix + "@" + this.hostname)) { this.numeric(465, ":You've been K:Lined from this server."); this.quit("You've been K:Lined from this server."); return 0; } if (this.password && (unreg_username || (this.nick != "*"))) { if (unreg_username) var usernum = system.matchuser(unreg_username); if (!usernum && (this.nick != "*")) var usernum = system.matchuser(this.nick); if (usernum) { bbsuser = new User(usernum); if (this.password.toUpperCase() == bbsuser.security.password) this.uprefix = parse_username(bbsuser.handle).toLowerCase().slice(0,10); } } if ( (count_local_nicks() + count_servers(false)) > hcc_total) hcc_total = count_local_nicks() + count_servers(false); if (count_local_nicks() > hcc_users) hcc_users = count_local_nicks(); if (this.realname && this.uprefix && (this.nick != "*")) { // Check for a valid I:Line. this.ircclass = this.searchbyiline(); if (!this.ircclass) { this.quit("You are not authorized to use this server."); return 0; } // We meet registration criteria. Continue. hcc_counter++; this.conntype = TYPE_USER; this.numeric("001", ":Welcome to the Synchronet IRC Service, " + this.ircnuh); this.numeric("002", ":Your host is " + servername + ", running Synchronet IRCD " + VERSION); this.numeric("003", ":This server was created " + strftime("%a %b %e %Y at %H:%M:%S %Z",server_uptime)); this.numeric("004", servername + " " + VERSION + " oi biklmnopstv"); this.numeric("005", "MODES=" + max_modes + " MAXCHANNELS=" + max_user_chans + " CHANNELLEN=" + max_chanlen + " MAXBANS=" + max_bans + " NICKLEN=" + max_nicklen + " TOPICLEN=" + max_topiclen + " KICKLEN=" + max_kicklen + " CHANTYPES=#& PREFIX=(ov)@+ NETWORK=Synchronet CASEMAPPING=ascii CHANMODES=b,k,l,imnpst STATUSMSG=@+ :are available on this server."); this.lusers(); this.motd(); oper_notice("Notice","Client connecting: " + this.nick + " (" + this.uprefix + "@" + this.hostname + ") [" + this.socket.remote_ip_address + "] {1}"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); server_bcast_to_servers("NICK " + this.nick + " 1 " + this.created + " " + this.get_usermode() + " " + this.uprefix + " " + this.hostname + " " + servername + " " + this.decip + " 0 :" + this.realname); } else if (this.nick.match("[.]") && this.hops && this.realname && this.server && (this.conntype == TYPE_SERVER)) { hcc_counter++; oper_notice("Routing","Link with " + this.nick + "[unknown@" + this.hostname + "] established, states: TS"); if (server.client_update != undefined) server.client_update(this.socket, this.nick, this.hostname); if (!this.sentps) { for (cl in CLines) { if(CLines[cl].servername == this.nick) { this.rawout("PASS " + CLines[cl].password + " :TS"); break; } } this.rawout("CAPAB " + server_capab); this.rawout("SERVER " + servername + " 1 :" + serverdesc); this.sentps = true; } this.bcast_to_servers_raw(":" + servername + " SERVER " + this.nick + " 2 :" + this.realname); this.synchronize(); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/9391ec6e3acaecf7a3a4e48b48d6dfa93b1b8c93/ircd.js/clean/ircd.js |
server_wallops("!ERROR: Client has bogus conntype!"); | oper_notice("Notice","Client has bogus conntype!"); | function IRCClient_work() { if (!this.socket.is_connected) { this.quit("Connection reset by peer",true); return 0; } if (this.socket.data_waiting && (cmdline=this.socket.recvline(4096,0)) ) { if(cmdline==null) return 0; // nothing to do // Allow only 512 bytes per RFC for clients, however, servers // are allowed to fill up the entire buffer for bandwidth // savings, since we trust them more. if(!this.server) cmdline=cmdline.slice(0,512); // Some (broken) clients add extra CR garbage to the // beginning (end) of a line. Fix. // Eventually we should just strip cmdline of all // invalid characters, including these and NUL (00) // among others. if ((cmdline[0] == "\r") || (cmdline[0] == "\n")) cmdline=cmdline.slice(1); if (debug) log(format("[%s<-%s]: %s",servername,this.nick,cmdline)); cmd=cmdline.split(' '); if (cmdline[0] == ":") { // Silently ignore NULL originator commands. if (!cmd[1]) return 0; // if :<originator> doesn't match nick of originating // socket, drop silently per RFC. origin = cmd[0].slice(1); if ((this.conntype == TYPE_USER) && (origin.toUpperCase() != this.nick.toUpperCase())) return 0; command = cmd[1].toUpperCase(); cmdline = cmdline.slice(cmdline.indexOf(" ")+1); } else { command = cmd[0].toUpperCase(); origin = this.nick; } this.idletime = time(); if (this.conntype == TYPE_UNREGISTERED) { this.unregistered_commands(command,cmdline); } else if (this.conntype == TYPE_USER) { this.registered_commands(command,cmdline); } else if (this.conntype == TYPE_SERVER) { this.server_commands(origin,command,cmdline); } else { log("!ERROR: Client has bogus conntype!"); server_wallops("!ERROR: Client has bogus conntype!"); } } if ( (this.pinged) && ((time() - this.pinged) > pingtimeout_time) ) { this.pinged = false; this.quit("Ping Timeout",true); } else if (!this.pinged && ((time() - this.idletime) > ping_time)) { this.pinged = time(); this.rawout("PING :" + servername); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
if ( (this.pinged) && ((time() - this.pinged) > pingtimeout_time) ) { this.pinged = false; this.quit("Ping Timeout",true); } else if (!this.pinged && ((time() - this.idletime) > ping_time)) { this.pinged = time(); this.rawout("PING :" + servername); | if (this.nick) { if ( (this.pinged) && ((time() - this.pinged) > YLines[this.ircclass].pingfreq) ) { this.pinged = false; this.quit("Ping Timeout",true); } else if (!this.pinged && ((time() - this.idletime) > YLines[this.ircclass].pingfreq)) { this.pinged = time(); this.rawout("PING :" + servername); } | function IRCClient_work() { if (!this.socket.is_connected) { this.quit("Connection reset by peer",true); return 0; } if (this.socket.data_waiting && (cmdline=this.socket.recvline(4096,0)) ) { if(cmdline==null) return 0; // nothing to do // Allow only 512 bytes per RFC for clients, however, servers // are allowed to fill up the entire buffer for bandwidth // savings, since we trust them more. if(!this.server) cmdline=cmdline.slice(0,512); // Some (broken) clients add extra CR garbage to the // beginning (end) of a line. Fix. // Eventually we should just strip cmdline of all // invalid characters, including these and NUL (00) // among others. if ((cmdline[0] == "\r") || (cmdline[0] == "\n")) cmdline=cmdline.slice(1); if (debug) log(format("[%s<-%s]: %s",servername,this.nick,cmdline)); cmd=cmdline.split(' '); if (cmdline[0] == ":") { // Silently ignore NULL originator commands. if (!cmd[1]) return 0; // if :<originator> doesn't match nick of originating // socket, drop silently per RFC. origin = cmd[0].slice(1); if ((this.conntype == TYPE_USER) && (origin.toUpperCase() != this.nick.toUpperCase())) return 0; command = cmd[1].toUpperCase(); cmdline = cmdline.slice(cmdline.indexOf(" ")+1); } else { command = cmd[0].toUpperCase(); origin = this.nick; } this.idletime = time(); if (this.conntype == TYPE_UNREGISTERED) { this.unregistered_commands(command,cmdline); } else if (this.conntype == TYPE_USER) { this.registered_commands(command,cmdline); } else if (this.conntype == TYPE_SERVER) { this.server_commands(origin,command,cmdline); } else { log("!ERROR: Client has bogus conntype!"); server_wallops("!ERROR: Client has bogus conntype!"); } } if ( (this.pinged) && ((time() - this.pinged) > pingtimeout_time) ) { this.pinged = false; this.quit("Ping Timeout",true); } else if (!this.pinged && ((time() - this.idletime) > ping_time)) { this.pinged = time(); this.rawout("PING :" + servername); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a8d6cb0d2c42aa8c23da559752d1d706d38ce217/ircd.js/buggy/ircd.js |
log("!ERROR: Client has bogus conntype!"); | function IRCClient_work() { var command; var cmdline; var origin; if (!this.socket.is_connected) { this.quit("Connection reset by peer",true); return 0; } if (this.socket.data_waiting && (cmdline=this.socket.recvline(4096,0)) ) { if(cmdline==null) return 0; // nothing to do // Allow only 512 bytes per RFC for clients, however, servers // are allowed to fill up the entire buffer for bandwidth // savings, since we trust them more. if(!this.server) cmdline=cmdline.slice(0,512); // Some (broken) clients add extra CR garbage to the // beginning (end) of a line. Fix. // Eventually we should just strip cmdline of all // invalid characters, including these and NUL (00) // among others. if ((cmdline[0] == "\r") || (cmdline[0] == "\n")) cmdline=cmdline.slice(1); if (debug) log(format("[%s<-%s]: %s",servername,this.nick,cmdline)); cmd=cmdline.split(' '); if (cmdline[0] == ":") { // Silently ignore NULL originator commands. if (!cmd[1]) return 0; // if :<originator> doesn't match nick of originating // socket, drop silently per RFC. origin = cmd[0].slice(1); if ((this.conntype == TYPE_USER) && (origin.toUpperCase() != this.nick.toUpperCase())) return 0; command = cmd[1].toUpperCase(); cmdline = cmdline.slice(cmdline.indexOf(" ")+1); } else { command = cmd[0].toUpperCase(); origin = this.nick; } this.idletime = time(); if (this.conntype == TYPE_UNREGISTERED) { this.unregistered_commands(command,cmdline); } else if (this.conntype == TYPE_USER) { this.registered_commands(command,cmdline); } else if (this.conntype == TYPE_SERVER) { this.server_commands(origin,command,cmdline); } else { log("!ERROR: Client has bogus conntype!"); oper_notice("Notice","Client has bogus conntype!"); } } if (this.nick) { if ( (this.pinged) && ((time() - this.pinged) > YLines[this.ircclass].pingfreq) ) { this.pinged = false; this.quit("Ping Timeout",true); } else if (!this.pinged && ((time() - this.idletime) > YLines[this.ircclass].pingfreq)) { this.pinged = time(); this.rawout("PING :" + servername); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/932a434bc900126d724150bfed8b94b9a8e530e1/ircd.js/buggy/ircd.js |
|
if (!this.server && (command.match(/^[0-9]+/))) return 0; | function IRCClient_work() { if (!this.socket.is_connected) { this.quit("Connection reset by peer",true); return 0; } if (this.socket.data_waiting && (cmdline=this.socket.recvline(4096,0)) ) { if(cmdline==null) return 0; // nothing to do // Allow only 512 bytes per RFC for clients, however, servers // are allowed to fill up the entire buffer for bandwidth // savings, since we trust them more. if(!this.server) cmdline=cmdline.slice(0,512); // Some (broken) clients add extra CR garbage to the // beginning (end) of a line. Fix. // Eventually we should just strip cmdline of all // invalid characters, including these and NUL (00) // among others. if ((cmdline[0] == "\r") || (cmdline[0] == "\n")) cmdline=cmdline.slice(1); if (debug) log(format("[%s<-%s]: %s",servername,this.nick,cmdline)); cmd=cmdline.split(' '); if (cmdline[0] == ":") { // Silently ignore NULL originator commands. if (!cmd[1]) return 0; // if :<originator> doesn't match nick of originating // socket, drop silently per RFC. origin = cmd[0].slice(1); if ((this.conntype == TYPE_USER) && (origin.toUpperCase() != this.nick.toUpperCase())) return 0; command = cmd[1].toUpperCase(); cmdline = cmdline.slice(cmdline.indexOf(" ")+1); } else { command = cmd[0].toUpperCase(); origin = this.nick; } if (!this.server && (command.match(/^[0-9]+/))) return 0; // possible numeric from user, ignore per RFC this.idletime = time(); if (this.conntype == TYPE_UNREGISTERED) { this.unregistered_commands(command,cmdline); } else if (this.conntype == TYPE_USER) { this.registered_commands(command,cmdline); } else if (this.conntype == TYPE_SERVER) { this.server_commands(origin,command,cmdline); } else { log("!ERROR: Client has bogus conntype!"); server_wallops("!ERROR: Client has bogus conntype!"); } } if ( (this.pinged) && ((time() - this.pinged) > pingtimeout_time) ) { this.pinged = false; this.quit("Ping Timeout",true); } else if (!this.pinged && ((time() - this.idletime) > ping_time)) { this.pinged = time(); this.rawout("PING :" + servername); }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/995570afd2ebfd8ca9cc37782b0e8fc41222eae4/ircd.js/clean/ircd.js |
|
this.quit("Connection reset by peer",true); | this.quit("Connection reset by peer"); | function IRCClient_work() { var command; var cmdline; var origin; if (!this.socket.is_connected) { this.quit("Connection reset by peer",true); return 0; } if (this.socket.data_waiting && (cmdline=this.socket.recvline(4096,0)) ) { if(cmdline==null) return 0; // nothing to do // Allow only 512 bytes per RFC for clients, however, servers // are allowed to fill up the entire buffer for bandwidth // savings, since we trust them more. if(!this.server) cmdline=cmdline.slice(0,512); // Some (broken) clients add extra CR garbage to the // beginning (end) of a line. Fix. // Eventually we should just strip cmdline of all // invalid characters, including these and NUL (00) // among others. if ((cmdline[0] == "\r") || (cmdline[0] == "\n")) cmdline=cmdline.slice(1); if (debug) log(format("[%s<-%s]: %s",servername,this.nick,cmdline)); cmd=cmdline.split(' '); if (cmdline[0] == ":") { // Silently ignore NULL originator commands. if (!cmd[1]) return 0; // if :<originator> doesn't match nick of originating // socket, drop silently per RFC. origin = cmd[0].slice(1); if ((this.conntype == TYPE_USER) && (origin.toUpperCase() != this.nick.toUpperCase())) return 0; command = cmd[1].toUpperCase(); cmdline = cmdline.slice(cmdline.indexOf(" ")+1); } else { command = cmd[0].toUpperCase(); origin = this.nick; } this.idletime = time(); if (this.conntype == TYPE_UNREGISTERED) { this.unregistered_commands(command,cmdline); } else if (this.conntype == TYPE_USER) { this.registered_commands(command,cmdline); } else if (this.conntype == TYPE_SERVER) { this.server_commands(origin,command,cmdline); } else { oper_notice("Notice","Client has bogus conntype!"); } } if (this.nick) { if ( (this.pinged) && ((time() - this.pinged) > YLines[this.ircclass].pingfreq) ) { this.pinged = false; this.quit("Ping Timeout",true); } else if (!this.pinged && ((time() - this.idletime) > YLines[this.ircclass].pingfreq)) { this.pinged = time(); this.rawout("PING :" + servername); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
this.quit("Ping Timeout",true); | this.quit("Ping Timeout"); | function IRCClient_work() { var command; var cmdline; var origin; if (!this.socket.is_connected) { this.quit("Connection reset by peer",true); return 0; } if (this.socket.data_waiting && (cmdline=this.socket.recvline(4096,0)) ) { if(cmdline==null) return 0; // nothing to do // Allow only 512 bytes per RFC for clients, however, servers // are allowed to fill up the entire buffer for bandwidth // savings, since we trust them more. if(!this.server) cmdline=cmdline.slice(0,512); // Some (broken) clients add extra CR garbage to the // beginning (end) of a line. Fix. // Eventually we should just strip cmdline of all // invalid characters, including these and NUL (00) // among others. if ((cmdline[0] == "\r") || (cmdline[0] == "\n")) cmdline=cmdline.slice(1); if (debug) log(format("[%s<-%s]: %s",servername,this.nick,cmdline)); cmd=cmdline.split(' '); if (cmdline[0] == ":") { // Silently ignore NULL originator commands. if (!cmd[1]) return 0; // if :<originator> doesn't match nick of originating // socket, drop silently per RFC. origin = cmd[0].slice(1); if ((this.conntype == TYPE_USER) && (origin.toUpperCase() != this.nick.toUpperCase())) return 0; command = cmd[1].toUpperCase(); cmdline = cmdline.slice(cmdline.indexOf(" ")+1); } else { command = cmd[0].toUpperCase(); origin = this.nick; } this.idletime = time(); if (this.conntype == TYPE_UNREGISTERED) { this.unregistered_commands(command,cmdline); } else if (this.conntype == TYPE_USER) { this.registered_commands(command,cmdline); } else if (this.conntype == TYPE_SERVER) { this.server_commands(origin,command,cmdline); } else { oper_notice("Notice","Client has bogus conntype!"); } } if (this.nick) { if ( (this.pinged) && ((time() - this.pinged) > YLines[this.ircclass].pingfreq) ) { this.pinged = false; this.quit("Ping Timeout",true); } else if (!this.pinged && ((time() - this.idletime) > YLines[this.ircclass].pingfreq)) { this.pinged = time(); this.rawout("PING :" + servername); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/3a0a82db2f096ce1ac1bb5a9c7319a6849b0e22a/ircd.js/buggy/ircd.js |
} else { oper_notice("Notice","Client has bogus conntype!"); | } else { umode_notice(UMODE_OPER,"Notice", "Client has bogus conntype!"); | function IRCClient_work() { var command; var cmdline; var origin; if (!this.socket.is_connected) { this.quit("Connection reset by peer"); return 0; } if (this.socket.data_waiting && (cmdline=this.socket.recvline(4096,0)) ) { if(cmdline==null) return 0; // nothing to do // Allow only 512 bytes per RFC for clients, however, servers // are allowed to fill up the entire buffer for bandwidth // savings, since we trust them more. if(!this.server) cmdline=cmdline.slice(0,512); // Some (broken) clients add extra CR garbage to the // beginning (end) of a line. Fix. // Eventually we should just strip cmdline of all // invalid characters, including these and NUL (00) // among others. if ((cmdline[0] == "\r") || (cmdline[0] == "\n")) cmdline=cmdline.slice(1); if (debug) log(format("[%s<-%s]: %s",servername,this.nick,cmdline)); cmd=cmdline.split(' '); if (cmdline[0] == ":") { // Silently ignore NULL originator commands. if (!cmd[1]) return 0; // if :<originator> doesn't match nick of originating // socket, drop silently per RFC. origin = cmd[0].slice(1); if ((this.conntype == TYPE_USER) && (origin.toUpperCase() != this.nick.toUpperCase())) return 0; command = cmd[1].toUpperCase(); cmdline = cmdline.slice(cmdline.indexOf(" ")+1); } else { command = cmd[0].toUpperCase(); origin = this.nick; } this.idletime = time(); if (this.conntype == TYPE_UNREGISTERED) { this.unregistered_commands(command,cmdline); } else if (this.conntype == TYPE_USER) { this.registered_commands(command,cmdline); } else if (this.conntype == TYPE_SERVER) { this.server_commands(origin,command,cmdline); } else { oper_notice("Notice","Client has bogus conntype!"); } }} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/4288a1a511dbe07b6c8a7901a012ddfdeb204568/ircd.js/buggy/ircd.js |
if (!this.sendq.bytes && !sendsock.send(send_data + "\r\n")) | if (this.sendq.bytes || !sendsock.send(send_data + "\r\n")) | function ircout(str) { var send_data; var sendsock; if (debug) log(format("[%s->%s]: %s",servername,this.nick,str)); if(this.local) { sendsock = this.socket; } else if (this.parent) { sendsock = Servers[this.parent.toLowerCase()].socket; } else { log(LOG_ERR,"!ERROR: No socket to send to?"); return 0; } send_data = ":" + servername + " " + str; if (!this.sendq.bytes && !sendsock.send(send_data + "\r\n")) this.sendq.add(send_data);} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/a480ba7e9bd9e28acd5b0581357f6a699cc03670/ircd.js/buggy/ircd.js |
sendsock = Servers[this.parent].socket; | sendsock = Servers[this.parent.toLowerCase()].socket; | function ircout(str) { var sendsock; if (debug) log(format("[%s->%s]: %s",servername,this.nick,str)); if(this.local) { sendsock = this.socket; } else if (this.parent) { sendsock = Servers[this.parent].socket; } else { log("!ERROR: No socket to send to?"); return 0; } if (!writeout(sendsock,":" + servername + " " + str)) this.flagged_for_quit = "Socket write failed miserably";} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/9b31fc080a4a6c10c64fce10214bfae574877b10/ircd.js/clean/ircd.js |
var cindex; | function ircstring(str,startword) { if (startword) { for(sw_counter=0;sw_counter<startword;sw_counter++) { str=str.slice(str.indexOf(" ")+1); } } cindex = str.indexOf(":")+1; if (!cindex) cindex = str.lastIndexOf(" ")+1; if (!cindex) return str; return(str.slice(cindex));} | 4284 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4284/2a89ac90e96057c1f27b4ede559cce5d9d5a7f83/ircd.js/buggy/ircd.js |
|
var agt=navigator.userAgent.toLowerCase(); | var agt = navigator.userAgent.toLowerCase(); | function Is () { // convert all characters to lowercase to simplify testing var agt=navigator.userAgent.toLowerCase(); this.major = parseInt(navigator.appVersion); this.minor = parseFloat(navigator.appVersion); this.nav = ((agt.indexOf('mozilla') != -1) && ((agt.indexOf('spoofer') == -1) && (agt.indexOf('compatible') == -1))); this.gecko = (this.nav && (agt.indexOf('gecko') != -1)); this.ie = (agt.indexOf("msie") != -1);} // Is | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
this.x11 = (agt.indexOf("x11") != -1); this.mac = (agt.indexOf("macintosh") != -1); this.win = (agt.indexOf("windows") != -1); | function Is () { // convert all characters to lowercase to simplify testing var agt=navigator.userAgent.toLowerCase(); this.major = parseInt(navigator.appVersion); this.minor = parseFloat(navigator.appVersion); this.nav = ((agt.indexOf('mozilla') != -1) && ((agt.indexOf('spoofer') == -1) && (agt.indexOf('compatible') == -1))); this.gecko = (this.nav && (agt.indexOf('gecko') != -1)); this.ie = (agt.indexOf("msie") != -1);} // Is | 952 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/952/5917330c0d2e34cb6706d33cdb3cff9f12ceccb6/cq.js/buggy/cq.js |
|
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 6649 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6649/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 1604 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1604/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 269 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/269/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 6649 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/6649/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 949 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/949/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 2069 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2069/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 5523 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5523/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 1604 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1604/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 2338 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2338/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 2320 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/2320/19200c26046dc00f15305e03b7c1d28b4c38c952/dragdrop.js/clean/web/scripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 4687 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4687/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 167 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/167/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 5523 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5523/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 1534 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1534/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 4687 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/4687/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 167 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/167/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 269 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/269/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 1534 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/1534/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 107 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/107/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/buggy/railties/html/javascripts/dragdrop.js |
var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); | var containmentNode; if(drop.tree) { containmentNode = element.treeNode; } else { containmentNode = element.parentNode; } return drop._containers.detect(function(c) { return containmentNode == c }); | isContained: function(element, drop) { var parentNode = element.parentNode; return drop._containers.detect(function(c) { return parentNode == c }); }, | 5521 /local1/tlutelli/issta_data/temp/all_js/javascript/2006_temp/2006/5521/bb2276098a5a21c35e5ee72b3097bd9d7caa919f/dragdrop.js/clean/actionpack/lib/action_view/helpers/javascripts/dragdrop.js |
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.