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.
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Thu Nov 13, 2003 7:21 pm
i only get this error when a "~" is in the address.
i do not know why.
<Zip> [16:51] Tcl error in script for 'timer2555':
<Zip> [16:51] can't unset "av_ban(c-65-177-226-17.se.client2.attbi.com)": no such element in array
[join]
-> speakerJh (~
spea@c-65-177-226-17.se.client2.attbi.com )
Code: Select all
bind mode -|- "* -v" voice:cntrl
proc voice:cntrl {nick uhost handle channel mode victim} {
usual stuff here
set av_temp [getchanhost $victim $chan]
set av_ban([lindex [split $av_temp @] end]) 1
timer $av_ban_time [list unset av_ban([lindex [split $av_temp @] end])]
thanks for the help
I once was an intelligent young man, now i am old and i can not remember who i was.
Sir_Fz
Revered One
Posts: 3794 Joined: Sun Apr 27, 2003 3:10 pm
Location: Lebanon
Contact:
Post
by Sir_Fz » Thu Nov 13, 2003 7:54 pm
Code: Select all
set av_ban([lindex [split $av_temp @] end]) 1
timer $av_ban_time [list unset av_ban([lindex [split $av_temp @] end])]
should be:
Code: Select all
set av_ban([lindex [split $av_temp @] 1]) 1
timer $av_ban_time [list unset av_ban([lindex [split $av_temp @] 1])]
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Thu Nov 13, 2003 7:59 pm
still shows an error
I once was an intelligent young man, now i am old and i can not remember who i was.
egghead
Master
Posts: 481 Joined: Mon Oct 29, 2001 8:00 pm
Contact:
Post
by egghead » Fri Nov 14, 2003 3:29 am
Is there a "global av_ban" in the part where you say "usual stuff here"?
z_one
Master
Posts: 269 Joined: Mon Jan 14, 2002 8:00 pm
Location: Canada
Post
by z_one » Fri Nov 14, 2003 5:01 am
Dedan said
i only get this error when a "~" is in the address.
Are you filtering out the uneeded characters such as the "~" ?
If not, then try the following line of code which has been taken from Slennox's sentinel script (but of course change it to adapt the variables to your script):
Code: Select all
set uhost [string trimleft [getchanhost $nick $chan] "~+-^="]
Dedan
Master
Posts: 260 Joined: Wed Jul 09, 2003 10:50 pm
Location: Memphis
Post
by Dedan » Sat Nov 15, 2003 3:55 pm
i am still getting errors ...
these errors only occur when there
is a "~" in the address.
the error happens when the script
tries to unset the var
The var does not include the "~"
i can not see why it would even matter.
It should either set and unset or not
set them both.
Code: Select all
bind mode -|- "* -v" voice:cntrl
proc voice:cntrl {nick uhost handle channel mode victim} {
global botnick av_ctr av_ban av_ban_time
set chan [string tolower $channel]
set av_temp [getchanhost $victim $chan]
regsub -all -- {\~} $av_temp "" av_temp
set av_ban([lindex [split $av_temp @] end]) 1
timer $av_ban_time [list unset av_ban([lindex [split $av_temp @] end])]
}
thanks for the help
I once was an intelligent young man, now i am old and i can not remember who i was.