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.

autovoice

Old posts that have not been replied to for several years.
Locked
c
coolio2004
Halfop
Posts: 68
Joined: Wed Jan 19, 2005 4:02 am

autovoice

Post by coolio2004 »

know of a script that'll autovoice every user after 30 secs of them joining?
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Code: Select all

bind join - * voice:after

proc voice:after {nick uhost hand chan} {
utimer 30 [list pushmode $chan +v $nick]
}
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

Sir_Fz wrote:

Code: Select all

bind join - * voice:after

proc voice:after {nick uhost hand chan} {
utimer 30 [list pushmode $chan +v $nick]
}
That script will work fine but it will however voice everyone in all channels your bot has ops in.

Code: Select all

bind join - * voice:after

proc voice:after {nick uhost hand chan} {
    set mainchan "#channel"

    if {[string tolower $chan] != [string tolower $mainchan]} {return}
    utimer 30 [list pushmode $chan +v $nick]
}
This however will limit it to one channel you specify.
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

Here's a little modification of ^DooM^'s code:

Code: Select all

#Set here the channels that you don't want the script to operate in.
set novoice(channels) "#chan1 #chan2 #chan3"

bind join - * voice:after 

proc voice:after {nick uhost hand chan} { 
    set chan [string tolower $chan] 

    if {([lsearch -exact [string tolower $::novoice(channels)] $chan] >= 0)} {return}

    utimer 30 [list pushmode $chan +v $nick] 
}
Last edited by Alchera on Thu Feb 03, 2005 8:00 pm, edited 1 time in total.
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
User avatar
^DooM^
Owner
Posts: 772
Joined: Tue Aug 26, 2003 5:40 pm
Location: IronForge
Contact:

Post by ^DooM^ »

lol anyone else wanna add some more to this??

Lets make this the best autovoice script ever :lol:

ok i am bored :wink:
The lifecycle of a noob is complex. Fledgling noobs gestate inside biometric pods. Once a budding noob has matured thru gestation they climb out of their pod, sit down at a PC, ask a bunch of questions that are clearly in the FAQ, The Noob is born
c
coolio2004
Halfop
Posts: 68
Joined: Wed Jan 19, 2005 4:02 am

Post by coolio2004 »

lol ......thanks guys
User avatar
caesar
Mint Rubber
Posts: 3778
Joined: Sun Oct 14, 2001 8:00 pm
Location: Mint Factory

Post by caesar »

What about 'string match -nocase' instead of two 'string tolower'? :mrgreen:
Once the game is over, the king and the pawn go back in the same box.
User avatar
awyeah
Revered One
Posts: 1580
Joined: Mon Apr 26, 2004 2:37 am
Location: Switzerland
Contact:

Post by awyeah »

I suggest lseach -exact would be better, because it can support multiple channels and works good. I use the same when I want my scripts to function on certain channels.

But when comparing Alchera with lsearch, try to string tolower or string toupper both of the variables to match, because here you left out $chan. Both should be in the same case, because lsearch has no -nocase switch like string manipulation commands do. And try to use "-1" because lsearch gives only one output, not 0, not 1 only -1. :)

If == -1 (no match)
If != -1 (match)
·­awyeah·

==================================
Facebook: jawad@idsia.ch (Jay Dee)
PS: Guys, I don't accept script helps or requests personally anymore.
==================================
User avatar
Sir_Fz
Revered One
Posts: 3794
Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:

Post by Sir_Fz »

Let him add the tweaks :P
User avatar
Alchera
Revered One
Posts: 3344
Joined: Mon Aug 11, 2003 12:42 pm
Location: Ballarat Victoria, Australia
Contact:

Post by Alchera »

I just couldn't help myself. LOL

Anyway, '>= 0' gives the same result awyeah. :)
Add [SOLVED] to the thread title if your issue has been.
Search | FAQ | RTM
Locked