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.
-
HecKel
- Voice
- Posts: 23
- Joined: Wed Jan 19, 2005 3:50 pm
- Location: Lisbon, Portugal
Post
by HecKel »
I want to get all users with a flag on a channel and print this on my private or by notice, for example:
!getusers +f
return this:
/msg HecKel HecKel (+nfopmj #lammechannel)
/msg HecKel Paul (+fv #lammer)
/msg HecKel Raul (+lfo #cool)
tnks, HecKel
-
user
-
- Posts: 1452
- Joined: Tue Mar 18, 2003 9:58 pm
- Location: Norway
Post
by user »
Try this
Code: Select all
bind msg n !getusers userlistByChanFlag
proc userlistByChanFlag {n u h a} {
if ![string match {[a-zA-Z0-9]} $a] {
puthelp "NOTICE $n :usage: $::lastbind <a single flag>"
return
}
set i 0
foreach c [channels] {
foreach h [userlist |$a $c] {
puthelp "NOTICE $n :$h (+[lindex [split [chattr $h $c] |] 1] $c)"
incr i
}
}
if !$i {
puthelp "NOTICE $n :no users have that channel flag."
}
}
(i didn't test it, so don't complain if it doesn't work..just fix the bug and be happy

)
Have you ever read "The Manual"?