This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

seaching though Xtras

Old posts that have not been replied to for several years.
Locked
h
holo_doctor

seaching though Xtras

Post by holo_doctor »

this is the curent script im using

proc massposlookup {pos} {
set results ""
foreach user [userlist +O] {
if {[getuser $user XTRA possition] == $pos} {
lappend results $user
}
}
if {$results == ""} {
return 0
} else {
return $results
}
}

Dose anyone have an idea as to how i could do this with out having to sift though ALL the +O users. would be apriciated.
p
ppslim
Revered One
Posts: 3914
Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England

Post by ppslim »

Nope.

Thats pretty much the only way.

You have to look through each user (filtering by flags if needed), and see if there user record has certain information. If so, reacord the user and return the list if needed.

This is what you script does.
User avatar
stdragon
Owner
Posts: 959
Joined: Sun Sep 23, 2001 8:00 pm
Contact:

Post by stdragon »

If you do it often, you can optimize it by storing the positions in a global array. Then all you have to do is $positions($pos) to get the handle.

It all depends how often you do it. If you only have a few users, it won't make a difference anyway. If you have thousands of users, it may be a good idea.
h
holo_doctor

Post by holo_doctor »

Yer would be good only problem is the script for over a botnet so i ned it in the user file so the other bots can see it.
Locked