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.

voice on/off

Old posts that have not been replied to for several years.
Locked
A
AW

voice on/off

Post by AW »

Hi,
i'll really apprecite if someone can help me to set a on/off switcher in dcc, so i can turn off or on in dcc
thanks
## allvoice.tcl
## - voices everyone in a channel when they join


# What channels should this work on?
# - note, "" is for all channels
set avchan ""

## Begin the code

bind join - * avjoin

proc avjoin {nick uhost hand chan} {
global avchan botnick
if {$nick == $botnick} {return 0}
if {$avchan == "" && [botisop $chan]} {
pushmode $chan +v $nick
return 0
}
set chan [string tolower $chan]
foreach i [string tolower $avchan] {
if {$i == $chan && [botisop $chan]} {
pushmode $chan +v $nick
return 0
}
}
}


regards
aw
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

You could:
1) Remove the exiting bind join from your code.
2) Create dcc commands .voiceon .voiceoff by binding dcc
3) Procedure bound to .voiceon will have one line of code creating a new bind join
4) Procedure bound to .voiceoff will have one line of code destroying the previous bind: unbind join.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
k
kain
Halfop
Posts: 91
Joined: Fri Mar 15, 2002 8:00 pm
Contact:

Post by kain »

or to save you time, you could just use or check the code out in AvOnJoin
simple public .av on/off per channel.
A
AW

Post by AW »

Thanks guys, i got it, but now if user changes his/her nick at the channel before gets voice, how do i set this check?so his/her new nick will get a voice?

thanks
aw
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

Well, that's a bit more complicated stuff. You can of course do that by setting another bind to catch nickname changes, have some global list where you would store last 5-10 nickname changes, check the nick you want to voice against that list, and update information if it is found to be changed. Even tho the 'perfect' voice script should have that functionlaity, i recon nickname change exactly at a very moment of voicing is very rare, so you probably don't really need it.

On the other hand, this is a perfect chance to improve your scripting skills.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
A
AW

Post by AW »

Thanks darko`` - but i think i am lost , i have tried to search a script doing that, but couldn't find it, i think this will be good for all tcl users.....if you don't mind, could you please write an example or something...if you have a time?

thanks
regards
aw
d
darko``
Op
Posts: 121
Joined: Sun Sep 08, 2002 5:33 pm
Location: Malta

Post by darko`` »

Well, it is a 'very complicated' script infact. It will mostly likely not work with people who do mass /nick by means of scripting or something. So, like i said, stick to what you have now, it will work in %99.999 cases. If someone changed nick by accident and didn't get their vocie, they can just /cycle, otherwise, if they did it on purpose, i guess they don't even deserve +v.
Ignorant and lazy people will save 30 minutes by chosing simple config file. Smart ones will save 3000 minutes of *everyone's* time by opting for complete config file.
Locked