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.

how to voice everyone that has no voice in channel? tnx

Old posts that have not been replied to for several years.
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

how to voice everyone that has no voice in channel? tnx

Post by kublador »

how to voice everyone that has no voice in channel?
how can i perform mass voice in a chennel when the bot owner typed a for example: !massvoice in a channel..
can someone help me?
thank you all of you for your help right when i started eggdrop...
thank you very much..
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

try this:

Code: Select all

bind pub m|m .voiceall voice_all

proc voice_all {nick host handle chan args} {
 if {![botisop $chan]} {
puthelp "NOTICE $nick :I'm not oped on $chan."
   return 1
  }
 foreach user [chanlist $chan] {
   if {![isvoice $user $chan]} {
pushmode $chan +v $user
    }
 }
 puthelp "NOTICE $nick :Voiced all users on $chan."
}
«A fantastic spaghetti is a spaghetti that does not exist»
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

Post by kublador »

oh [censored]! it worked! what a simple code..... thank you very much
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

Post by kublador »

i have a last question....
in the script u made.... it voices everyone even if it is not on the list....
what will i add in the script u made to voice only users in the userlist that has +x flag?
thank you very much...
i learned a lot from ur script... thank you very much
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

Code: Select all

if {![isvoice $user $chan] && ([matchattr [nick2hand $user $chan] X] || [matchattr [nick2hand $user $chan] -|X $chan]) }
i assume you meant the custom uppercase "X" flag when you said "x"
should work for global and channel X
photon?
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

I think he meant the default flag a user has when he's added (+x)
anyway, if you need x replace the X flags in the lines spock told you or keep the X flags
«A fantastic spaghetti is a spaghetti that does not exist»
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

you really get +x when added ? :oops:
i didnt know that heheh. im still running 1.6.7 so maybe something's changed :o

1.6.7 lists x as

x xfer (user has file-area access)
photon?
User avatar
user
 
Posts: 1452
Joined: Tue Mar 18, 2003 9:58 pm
Location: Norway

Post by user »

Default flags is a setting in the .conf.

matchattr can be used like this:

Code: Select all

matchattr handle flag|flag #chan
so there's no need to do two matchattrs to check for global/local flag.
s
spock
Master
Posts: 319
Joined: Thu Dec 12, 2002 8:40 pm

Post by spock »

i know its a setting in the conf, but not what default flags are set "by default" in the newer versions.

and about the two matchattr's, i was trying to display some kind of "logic" so it could easily be understood, but it turned out being stupid i know :lol:
photon?
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

Post by kublador »

kewl! this is really interesting.. thanks to all of you...
wait... in this if-then:

if {![isvoice $user $chan] && ([matchattr [nick2hand $user $chan] X] || [matchattr [nick2hand $user $chan] -|X $chan]) }

can someone explain me the -|X <-- what does this mean? why 2 flags? whats with the left? how bout the right?

and what is nick2hand?
thank you very much ;)
God bless.
User avatar
ReaLz
Op
Posts: 121
Joined: Sat Oct 19, 2002 5:33 am
Location: Athens, Greece

Post by ReaLz »

the flag left of the | is a global flag and the flag right of the | is a channel flag.
if you want to use both global and channel flag use X|X, if you want only global use X and if you want only channel use -|X.
nick2hand is a tcl command that returns the handle of a nickname (you should read the tcl-commands.doc).
«A fantastic spaghetti is a spaghetti that does not exist»
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

Post by kublador »

thanks realz for the explanation ;)

i have another question...
i have this script... and this deops all that have ops in channel... the worst thing is the bot also kicks itself because the bot itself is an operator..
what should i add or modify to except the bot from this trigger...
can someone help? thank you man ;)

this is my script:----------------------------------------------------------------

bind pub m !massdeop deop_all

proc deop_all {nick host handle chan args} {
if {![botisop $chan]} {
puthelp "NOTICE $nick :I'm not oped on $chan."
return 1
}
foreach user [chanlist $chan] {
if {[isop $user $chan]} {
pushmode $chan -o $user
}
}
puthelp "NOTICE $nick :De-opped all users on $chan. -Eggdrop 1.6.13"
}
User avatar
Papillon
Owner
Posts: 724
Joined: Fri Feb 15, 2002 8:00 pm
Location: *.no

Post by Papillon »

Code: Select all

if {[isop $user $chan]} {
change this line to:

Code: Select all

if {[isop $user $chan] && ![string equal -nocase $user $::botnick]} {
Elen sila lúmenn' omentielvo
k
kublador
Voice
Posts: 21
Joined: Sun May 25, 2003 1:25 pm

Post by kublador »

thanks ;) hehehehe
God bless!
A
Alexander
Voice
Posts: 16
Joined: Tue Jun 17, 2003 12:32 am

Post by Alexander »

this line dosnt work for me?. If one who isn't oped try to voiceall he dont get a notice

puthelp "NOTICE $nick :I'm not oped on $chan."
Locked