I've googled and checked the archive, but haven't been able to locate a TCL script for our little eggdrop which will auto voice nicks on entry to a room.
The catch is that nicks which should be auto-voiced should only be those that have a lower case letter as the 1st letter...and has to work with nicks that contain curly or square brackets.
setudef flag autovoicejoin
bind join - * join:autovoice
proc join:autovoice {nick host hand chan} {
if {[channel get $chan "autovoicejoin"]} {
foreach letter [split $nick ""] {
if {![regexp {[a-zA-Z]} $letter]} { continue }
if {[string equal [string tolower $letter] $letter]} {
pushmode $chan +v $nick
break
} else {
pushmode $chan -v $nick
break
}
}
flushmode $chan
}
}
If the nick is [-{eggy}-] or {{_egg_}} the script will know, the first letter is lowercase and voice the person. You didn't mention what to do when non alphabetical chars are used, and what I've done is skip them, until we find the first letter used. If it's lowercase indeed, the person is voiced, otherwise it will devoice them. Which most ircd's won't issue the devoice to a user already devoiced, so really nothing happens that was just for you, to edit later and add something denoting lowercase is favored, etc..
To use it dcc chat your bot and .chanset #yourchan +autovoicejoin
i have some autovoice tcl, but i just want to add some ips so user wont get voice matching those ips.
or some code that will add user if global op or master type in channel .human nick and nick will automatically added to the channel +g list? :/ sorry for my bad english!
I copied that small script and tried it, it crashed the bot, soo was it a add on to another script that i missed? if so what script was it be added to so i can use it for my bot.