Auto adding torrents using autodl-irssi and deluge

When using my vps last time, i can easily add my torrent to deluge via prefrences in autodl and “run program”
/usr/bin/deluge-console
add $(TorrentPathName) ; quit

But installing quickbox in my dedi server, i cant seem to make this work.
Can you suggest any revisions to the command above, i suspect it might have something to do with the directory of deluge-console.

Many thanks .

i use

/usr/bin/deluge-console
connect 127.0.0.1:DAEMONPORT; “add -p /path/here/ $(TorrentPathName)”

if you do not need to specify the path, remove the -p /path/here/