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.
Old posts that have not been replied to for several years.
z_one
Master
Posts: 269 Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada
Post
by z_one » Fri Oct 03, 2003 6:07 am
Hi,
What's the loop that would list all the users added on the bot with a flag "+o" for example.
Thanks.
GodOfSuicide
Master
Posts: 463 Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria
Post
by GodOfSuicide » Fri Oct 03, 2003 7:10 am
Code: Select all
foreach myuser [userlist] {
if {[matchattr $myuser o]} {
....
}
}
not tested, but it should work
ppslim
Revered One
Posts: 3914 Joined: Sun Sep 23, 2001 8:00 pm
Location: Liverpool, England
Post
by ppslim » Fri Oct 03, 2003 7:18 am
You don't need the matchattr command, userlist provides this function allready.
Code: Select all
foreach op [userlist o|o] {
...code
}
Bytez
Op
Posts: 168 Joined: Mon Aug 11, 2003 1:42 pm
Post
by Bytez » Fri Oct 03, 2003 11:30 pm
can't you just type .match +o
GodOfSuicide
Master
Posts: 463 Joined: Mon Jun 17, 2002 8:00 pm
Location: Austria
Post
by GodOfSuicide » Sat Oct 04, 2003 2:26 am
Bytez wrote: can't you just type .match +o
he's talking about a loop to list all admins, what he does with the output is another question...
.match is just one formated output of the same proc
z_one
Master
Posts: 269 Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada
Post
by z_one » Sat Oct 04, 2003 6:05 pm
Thanks for your replies, however the code suggested by ppslim does the trick for me.
I don't want to list admins only. I wanted to list all the users with any flag I choose. It could be flag "f" or anything else.