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.
Old posts that have not been replied to for several years.
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Wed Jun 25, 2003 2:55 pm
Hi i have a simple tcl script and it keeps sending me errors like
[14:54] Tcl error [time:devoice]: can't read "channel": no such variable
any help will be appreciated
Code: Select all
# Sur quel canal cette fonction prendra effet
set channel "#protect"
# Manipulation ...
set $channel [string tolower $channel]
# Déclanchement événementiel
bind msgm - * msgm:revoice
bind time - "* % % % %" time:devoice
# Procédure redonnant le +v
proc msgm:revoice {nick host hand text} {
# Validation du canal
if {[string tolower $channel] != $channel} {return 0}
putquick "MODE $chan +v $nick"
}
# Procédure enlevant le +v
proc time:devoice {m h d o y} {
# Listage des usager du canal
foreach list [chanlist $channel] {
# Validation de la néssecité de dévoicer
if {[getchanidle $list $list] > 5} {putserv "Mode $chan -v $nick"}
}
return 0
}
thanks and dont stop helping poor people like me
stdragon
Owner
Posts: 959 Joined: Sun Sep 23, 2001 8:00 pm
Contact:
Post
by stdragon » Wed Jun 25, 2003 3:22 pm
channel isn't defined.. looks like somebody changed the var names around in the proc definition maybe.
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Wed Jun 25, 2003 3:35 pm
yeah i`ts seems obvious
but the problem is that i dont know how to fix it , i`ve tried to change the $channel to $chan and chan to channel and so on but i always end up with that error
so now i just go round and round and i dont know how to just fix it
Pitchat
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Jun 25, 2003 3:52 pm
Replace :
Code: Select all
proc time:devoice {m h d o y} {
# Listage des usager du canal
foreach list [chanlist $channel] {
# Validation de la néssecité de dévoicer
if {[getchanidle $list $list] > 5} {putserv "Mode $chan -v $nick"}
}
return 0
}
with
Code: Select all
proc time:devoice {nick host hand chan rest} {
# Listage des usager du canal
foreach list [chanlist $chan] {
# Validation de la néssecité de dévoicer
if {[getchanidle $list $list] > 5} {putserv "Mode $chan -v $nick"}
}
return 0
}
I think this should make it work
egghead
Master
Posts: 481 Joined: Mon Oct 29, 2001 8:00 pm
Contact:
Post
by egghead » Wed Jun 25, 2003 4:34 pm
Sir_Fz wrote:
[snip]
I think this should make it work
I think the opposite
(the whole script initially posted is kind of strange)
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Wed Jun 25, 2003 5:19 pm
oh ok
tried my luck, lol
Pitchat
Op
Posts: 122 Joined: Tue Feb 18, 2003 11:24 pm
Location: Hebertville Quebec Canada
Contact:
Post
by Pitchat » Wed Jun 25, 2003 9:48 pm
héhé
egghead was right
it doesnt work and display a different error
[21:42] Tcl error [time:devoice]: invalid channel: 05
for the record
this script is suppose to voice user known from the bot when they say something and devoice them after a period of idle (15 min)
i found a script that almost do that (av.pubmsg.tcl) but it voices everybody when the talk instead of only people with certain flags
i`m open to any suggestions
Pitchat