set canal "#teamSIN"
set av "0"
bind join - * jjav
bind pub m "+autovoice" jav
bind pub m "-autovoice" jmav
proc jjav { nick uhost handle channel } {
global canal av
if { $channel == $canal } {
if { $av == 1 } {
pushmode $channel +v $nick
}
}
}
proc jav { nick uhost handle channel arg } {
global canal av
if { $channel == $canal } {
if { $av == 0 } {
set av 1
putserv "NOTICE $nick :Auto Voice is now ON!"
}
}
}
proc jmav { nick uhost handle channel arg } {
global canal av
if { $channel == $canal } {
if { $av == 1 } {
set av 0
putserv "NOTICE $nick :Auto Voice is now OFF!"
}
}
}
putlog "## AutoVoice by TEK7"
I haven't coded in like a few years so bear with me. I would rather use 'setudef' (example: 'setudef flag avoice') than a variable in this case. Below I tried to make something for you, not sure 100% if it's ok or not, just test it and let me now and will make the required adjustments.
You do realize there is a flag "g" that does this already? But I can see why you'd want a new script for it-its slow. I just did something like this to replace it:
This creates the new channel flag "A", which should be faster than g. When I was using g, my bot used puthelp to voice. The second part will voice anyone who changes their nick to one that has flag A in the bot.user file. Just another idea for you, I've never been a fan of "voice-everyone" scripts.