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.
Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
sjones
Voice
Posts: 16 Joined: Fri Nov 04, 2005 4:06 pm
Post
by sjones » Fri Nov 04, 2005 4:09 pm
Hi guys,
I'm looking for a script that will voice everyone who enters a channel, but also keeps track when someone is devoiced so that if this user parts and joins again they are not voiced by the bot.
Do you think this would be possible?
Thanks for your help!
avilon
Halfop
Posts: 64 Joined: Tue Jul 13, 2004 6:58 am
Location: Germany
Post
by avilon » Fri Nov 04, 2005 5:48 pm
Wrong forum!
Script Requests
Code: Select all
bind join - "#yourchannel *" av:join
bind part - "#yourchannel *" av:part
proc av:join {nick host hand chan} {
global dontvoice
if ![info exists dontvoice($chan)] { set dontvoice($chan) [list] }
if {[botisop $chan]&&[lsearch -exact $dontvoice($chan) $host]=="-1"} {
utimer 2 [list pushmode $chan +v $nick]
}
}
proc av:part {nick host hand chan {msg ""}} {
global dontvoice
if ![info exists dontvoice($chan)] { set dontvoice($chan) [list] }
if {![isbotnick $nick]&&![isvoice $nick $chan]&&![isop $nick $chan]&&[lsearch -exact $dontvoice($chan) $host]=="-1"} {
lappend dontvoice($chan) $host
timer 5 [list set dontvoice($chan) [lreplace $dontvoice($chan) [set foo [lsearch -exact $dontvoice($chan) $host]] $foo]]
}
}
As always, not tested!
Last edited by
avilon on Sat Nov 05, 2005 12:25 pm, edited 1 time in total.
NTHosts
Op
Posts: 100 Joined: Mon Oct 10, 2005 9:57 pm
Location: UK
Contact:
Post
by NTHosts » Sat Nov 05, 2005 12:07 pm
dood this is script requests
avilon
Halfop
Posts: 64 Joined: Tue Jul 13, 2004 6:58 am
Location: Germany
Post
by avilon » Sat Nov 05, 2005 12:15 pm
Oh.. really?
This thread was moved by a mod
sjones
Voice
Posts: 16 Joined: Fri Nov 04, 2005 4:06 pm
Post
by sjones » Sun Nov 06, 2005 10:10 am
Thanks alot for the speedy reply everyone, and sorry for creating the thread in the wrong forum doh!
I've loaded this script, and when I op the bot it sets +m channel mode, but does not op anyone who enters the channel. I've no idea about tcl so I can't try to figure out what could be wrong with the code
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Nov 06, 2005 10:25 am
There's no +m on op in avilon's code. Are you using some other script?
sjones
Voice
Posts: 16 Joined: Fri Nov 04, 2005 4:06 pm
Post
by sjones » Sun Nov 06, 2005 10:44 am
Hehe no sorry, that's set in the bot's config for the channel, the channelmodes are +nmt so that's why it sets it to +m.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sun Nov 06, 2005 6:35 pm
Did you replace #yourchannel with the channel where you want the script to work?
sjones
Voice
Posts: 16 Joined: Fri Nov 04, 2005 4:06 pm
Post
by sjones » Thu Nov 10, 2005 3:21 pm
Yes I did
and it voices people who enter now. If I devoice them, and they part and rejoin they do not get voiced, which is excellent. However If I voice them, and they then part and rejoin, the bot does not voice them again. Could I perhaps get this feature too, if you don't mind?
Sorry for the trouble guys - we're nearly there though
avilon
Halfop
Posts: 64 Joined: Tue Jul 13, 2004 6:58 am
Location: Germany
Post
by avilon » Thu Nov 10, 2005 4:49 pm
Code: Select all
bind mode - "#yourchannel +v" av:mode
proc av:mode {nick host hand chan mode {target ""}} {
global dontvoice
if ![info exists dontvoice($chan)] return
if {[set foo [lsearch -exact $dontvoice($chan) [getchanhost $target $chan]]]!="-1"} {
set dontvoice($chan) [lreplace $dontvoice($chan) $foo $foo]
}
}
sjones
Voice
Posts: 16 Joined: Fri Nov 04, 2005 4:06 pm
Post
by sjones » Thu Nov 10, 2005 5:04 pm
Thanks very much avilon, that's perfect
sjones
Voice
Posts: 16 Joined: Fri Nov 04, 2005 4:06 pm
Post
by sjones » Sat Nov 12, 2005 6:42 pm
Hi guys, for some reason this script does not work on either ip addresses of if the ident has ~.
Does anyone know how to overcome this?
sjones
Voice
Posts: 16 Joined: Fri Nov 04, 2005 4:06 pm
Post
by sjones » Sat Nov 12, 2005 7:07 pm
hi everyone, just tested it now, it's definately just if the host has a ~ in the ident, so if it's sjones@whatever it's fine, but if it's ~sjones@whatever it's not.
So, if they have a ~ in the ident, it will voice them after I devoic them and they part then join.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Sat Nov 12, 2005 7:50 pm
I don't think this should cause a problem but anyway, add this line to the first 2 procs (part and join)
Code: Select all
set host [string trimleft $host ~]
and this to the third (mode)
Code: Select all
set thost [string trimleft [getchanhost $target $chan] ~]
and replace
Code: Select all
if {[set foo [lsearch -exact $dontvoice($chan) [getchanhost $target $chan]]]!="-1"} {
with
Code: Select all
if {[set foo [lsearch -exact $dontvoice($chan) $thost]]!="-1"} {
sjones
Voice
Posts: 16 Joined: Fri Nov 04, 2005 4:06 pm
Post
by sjones » Sat Nov 12, 2005 8:00 pm
That's perfect, thank you so much