| View previous topic :: View next topic |
| Author |
Message |
ScaryBikerGuy Voice
Joined: 11 Feb 2009 Posts: 2
|
Posted: Wed Feb 11, 2009 6:54 pm Post subject: script to autovoice nicks that start with lower case letter |
|
|
Hi folks,
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.
Any help or pointers would be truly appreciated.
Regards,
-Ray |
|
| Back to top |
|
 |
speechles Revered One

Joined: 26 Aug 2006 Posts: 1398 Location: emerald triangle, california (coastal redwoods)
|
Posted: Wed Feb 11, 2009 8:13 pm Post subject: |
|
|
| Code: | 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 _________________ speechles' eggdrop tcl archive |
|
| Back to top |
|
 |
ScaryBikerGuy Voice
Joined: 11 Feb 2009 Posts: 2
|
Posted: Wed Feb 11, 2009 8:25 pm Post subject: |
|
|
wow...thank you so much!
the irc network won't allow non letter 1st chars so we are just perfectly set.
thanks so much!!
-R |
|
| Back to top |
|
 |
user

Joined: 18 Mar 2003 Posts: 1452 Location: Norway
|
Posted: Thu Feb 12, 2009 6:06 am Post subject: why not use regexp? :) |
|
|
| Code: | proc join:autovoice {nick uhost hand chan} {
if {[channel get $chan autovoicejoin]&&[regexp {^[^A-Za-z]*[a-z]} $nick]} {
pushmode $chan +v $nick
}
} |
_________________ Have you ever read "The Manual"? |
|
| Back to top |
|
 |
Salik83 Voice
Joined: 19 Apr 2009 Posts: 6 Location: Pk
|
Posted: Sun Apr 19, 2009 5:17 pm Post subject: Need little help |
|
|
hello guys,
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! |
|
| Back to top |
|
 |
Lord_Haus Voice
Joined: 23 Nov 2010 Posts: 1
|
Posted: Tue Nov 23, 2010 11:55 am Post subject: lower autovoice |
|
|
| 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. |
|
| Back to top |
|
 |
|