So, I threw together a little script that loops through the userbase andãcompares email addresses no problem, however, I am having difficulty storingãthe user number in an array for access later on in the script; what I haveãtried (resulting in no list displayed.ããload("sbbsdefs.js");ããconst REVISION = "$Revision: .01 $".split(' ')[1];ããprint("Synchronet Duplicate Email Address Checker " + REVISION + "\r\n");ããvar u; // user objectãvar d;ãvar dups=0;ãvar recs=0;ãvar dups;ãvar lastuser;ãvar has_dup = false;ãvar dup_u =0;ããlastuser=system.lastuser;ããfor(i=1; i<=lastuser; i++) // loop through users and grab the email addressã{ã u = new User(i);ã ã if(u.settings&(USER_DELETED|USER_INACTIVE))ã continue;ãã // start new new loop and compare email addressesã for(n=1; n<=lastuser; n++)ã {ã d = new User(n)ã if(u.number == d.number) continue;ã if(d.settings&(USER_DELETED|USER_INACTIVE)) continue;ã ã if(u.netmail == d.netmail) ã {ã print(u.alias + " [" + u.number + "] shares " + d.alias + " ["ã+ãd.number + "] ("+d.netmail+")\r");ã ã has_dup[i] = true; ã dup_u[dups] = i;ã dups++; ã }ã }ã ã recs++;ã}ããdups = dups/2; // since if one is found then 2 are found :-Pããif(dups == 1) dup = "Entry"; else dup = "Entries";ããfor(y=1; y<= lastuser; y++) {ã if(has_dup[y] == true) {ã print("Dup user " + dup_u[y] + " user alias " + "alias "ã+u.alias[dup_u[y]]);ã }ã}ãã// ^^^^^^^^^ this section is skipped if the if(has_dup[y] == true) is commentedã// out and prints undefined if usedããprint("\r\nScanned " + recs + " records. Found " + dups + " Duplicate " + dup +ã"!\r\n\r\n"); ããAny help would be appreciated, ThanksãããããããMy teachers always said "You can't make a living looking out a window!", theyãwere wrong, I drive truck
:-Pãã---ã þ Synchronet þ AlleyCat! BBS -
http://alleycat.synchro.net:81ã