Hi, i was trying to trace the timer error for a long time, finally i got it, proc name, i will appreciate if someone will help me to fix this timer error
its an antisocks tcl.
<Ta> Timer timer338 due in 13 sek., proc: timeout sock12 216.123.73.107 join #testing [ChatBug]
<Ta> [02:44] Tcl error in script for 'timer338':
<Ta> [02:44] invalid command name "ChatBug"
codes:
if {[catch {puts $sock $data}]} {
if {$type == "dcc"} { putdcc [lindex $args 0] "\002NO SOCKS\002: not a socks host $host." }
if {$type == "msg"} { putserv "NOTICE [lindex $args 0] :\002NO SOCKS\002: not a socks host $host."}
if {$type == "pub"} { putserv "PRIVMSG [lindex $args 0] :\002NO SOCKS\002: not a socks host $host." }
if {[info exists timeout($sock)]} { unset timeout($sock) }
catch {close $sock}
}
}
# Scanner.
proc wingate {host type args} {
global timeout
set args [join $args " "]
# Not a valid host.
if {[catch {set sock [socket -async $host 1080]}]} {
if {$type == "dcc"} { putdcc [lindex $args 0] "\002Not Valid\002: Unable to connect to $host." }
if {$type == "msg"} { putserv "NOTICE [lindex $args 0] :\002Not Valid\002: Unable to connect to $host." }
if {$type == "pub"} { putserv "PRIVMSG [lindex $args 0] :\002Not Valid\002: Unable to connect to $host." }
return 0
}
fileevent $sock writable [list gotconnect $sock $host $type $args] ;# wait for connect.
fileevent $sock readable [list gotread $sock $host $type $args] ;#wait for responce.
# Timeout after 15seconds
set timeout($sock) ""
utimer 15 "timeout $sock $host $type $args"
}
# Connection timed out.
proc timeout {sock host type args} {
global timeout
if {[info exists timeout($sock)]} {
unset timeout($sock)
fileevent $sock writable {} ;# remove previous handler
fileevent $sock readable {} ;# remove previous handler
close $sock ;# close the socket
if {$type == "dcc"} { putdcc [lindex $args 0] "\002TIME OUT\002: Timeout on connection to $host." }
if {$type == "msg"} { putserv "NOTICE [lindex $args 0] :\002TIME OUT\002: Timeout on connection to $host." }
if {$type == "pub"} { putserv "PRIVMSG [lindex $args 0] :\002TIME OUT\002: Timeout on connect to $host." }
}
return 0
}
i will really appreciate for your kind help
thank you
AW