egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

script to autovoice nicks that start with lower case letter

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
ScaryBikerGuy
Voice


Joined: 11 Feb 2009
Posts: 2

PostPosted: Wed Feb 11, 2009 6:54 pm    Post subject: script to autovoice nicks that start with lower case letter Reply with quote

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
View user's profile Send private message
speechles
Revered One


Joined: 26 Aug 2006
Posts: 1398
Location: emerald triangle, california (coastal redwoods)

PostPosted: Wed Feb 11, 2009 8:13 pm    Post subject: Reply with quote

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
View user's profile Send private message
ScaryBikerGuy
Voice


Joined: 11 Feb 2009
Posts: 2

PostPosted: Wed Feb 11, 2009 8:25 pm    Post subject: Reply with quote

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
View user's profile Send private message
user
 


Joined: 18 Mar 2003
Posts: 1452
Location: Norway

PostPosted: Thu Feb 12, 2009 6:06 am    Post subject: why not use regexp? :) Reply with quote

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
View user's profile Send private message
Salik83
Voice


Joined: 19 Apr 2009
Posts: 6
Location: Pk

PostPosted: Sun Apr 19, 2009 5:17 pm    Post subject: Need little help Reply with quote

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
View user's profile Send private message MSN Messenger
Lord_Haus
Voice


Joined: 23 Nov 2010
Posts: 1

PostPosted: Tue Nov 23, 2010 11:55 am    Post subject: lower autovoice Reply with quote

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
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber