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.

getting all users with specified flag

Old posts that have not been replied to for several years.
Locked
j
jellicle

getting all users with specified flag

Post by jellicle »

hello,

Code: Select all

bind pub - !vo vo 

proc vo {nick uhost handle chan text} { 
   if {([achan $chan] != "no_achan")} { 
if {![matchattr $handle "V"]} {putserv "PRIVMSG $chan :\001ACTION not allowed.\001" ;return 1} else { 
      pushmode $chan +v $nick 
      return 0 
   } 
   return 0 
} 
} 
i want to modified this so that all users with the userflag +V get voiced on command.

example: i type !vo on the channel and all users with the flag +V get voiced by the bot - but i dont know how i can do this :(

can anybody please help me?
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

Code: Select all

foreach user [chanlist $chan V|V] { do something with $user }
photon?
j
jellicle

Post by jellicle »

hm, dont work - the bot voiced only me
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

Code: Select all

bind pub - !v pub:v
proc pub:v { n uh h c t } {
  foreach u [chanlist $c V|V] {
    pushmode $c +v $u
  }
}
voices global and channel +V (make sure your users have uppercase V flag)
photon?
Locked