Hi.
I got a problem (again
).
I'm making a .wget <url> command to use the linux command wget <url>.
My problem with doing this:
if i let wget download it without any dirchange, the file comes into /home/zygo/eggdrop (my eggdrop dir), but i want it in /home/zygo/temp
if i do it like this:
proc <name> {blablabla}{
set http [lindex $arg 0]
cd /home/zygo/temp
exec wget $http
}
it works, i get the file in the /home/zygo/temp dir, but when i rehash my eggdrop it quits with error: Config file not founded. (this error is because of the dirchange.)
even when i add the command
cd /home/zygo/eggdrop
or
cd /home/zygo/eggdrop/scripts
after the exec ... command, i still get the same error when rehashing.
Now i'm trying to do this by logging in again to the shell with ssh, but i get errors when my eggdrop has to enter the pass.
script i use for ssh loging in atm:
proc pub_wget {nick uhost hand chan arg} {
global sship sshlogin sshpass
set http [lindex $arg 0]
set sshclient [exec which ssh]
set ssh [open "|$sshclient -l $sshlogin $sship" w]
puts $ssh "$sshpass"
puts $ssh "cd /home/zygo/temp"
puts $ssh "wget $http"
putserv "NOTICE $nick :File $http successfully put in /home/zygo/temp."
puts $ssh "exit"
close $ssh
}
error i get:
[17:13] Userfile loaded, unpacking...
zygo@80.56.131.50's password:
zygo@80.56.131.50's password:
zygo@80.56.131.50's password:
[17:13] TCL error [pub_wget]: Pseudo-terminal will not be allocated because stdin is not a terminal.
Permission denied, please try again.
Permission denied, please try again.
Permission denied (publickey,password).
i still get this error when changing the line:
puts $ssh "$sshpass"
into:
puts $ssh $sshpass
and into:
puts $ssh "<passtypedout>"
can someone help me?
Thanx in advance, Zygo.