My problem is that, when the script is executed, I always get this error:
(22:52:59) (dless) [22:54] Tcl error [affv_dcctrig]: /home/albert/dless/index.html:
(22:52:59) (dless) .../dless/index.html: ETA: 0:00 15.44/ 15.44 kB 56.25 MB/s
(22:52:59) (dless) .../dless/index.html: ETA: 0:00 15.44/ 15.44 kB 531.45 kB/s
Whilst that is not an error, it is the response to the uploading commands of ncftp, so, it works, and it uploads the file, but the script breaks off right then and there, because of the error.
How do I tell the bot to ignore this text, and not see it as an error?
This is the code:
Code: Select all
proc affv_dcctrig {handle ipx arg} {
global affvpath affvconfig affvchan
global affv_localdir affv_useftp affv_url
putlog "affv: Please wait..."
exec $affvpath -co $affvconfig
foreach affvc [string tolower $affvchan] {
set affv_filename "$affvnew.html"
set affv_newurl "$affv_url/$affv_filename"
if {$affv_useftp == 1} {
set affv_localfile "$affv_localdir/$affv_filename"
affv_sendftp $affv_localfile
puthelp "PRIVMSG #channel : $affv_url"
return 0
}
puthelp "PRIVMSG #channel : $affv_url"
}
}
Code: Select all
proc affv_sendftp { localfile } {
global pingcheck
global affv_url
set pipe [open "|ncftp -u username -p password ftp.omgno.com" w]
#puts $pipe "binary" -- not needed
puts $pipe "put -f $localfile"
#puts $pipe "quit" -- not needed
close $pipe
puthelp "PRIVMSG #channel : $affv_url"
return 0
}