Commit Graph

19 Commits

Author SHA1 Message Date
rakshasa 1cc1374c7a * Made rpc::CommandSlot into a template class and removed
"command_*_slot.{cc,h}".

* Added 'if' command. 


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@971 e378c898-3ddf-0310-93e7-cc216c733640
2007-09-02 15:07:37 +00:00
rakshasa ac2f5a8882 * Only request from the same tracker more than once if PEX is disabled.
* Added target_any.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@970 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-31 11:44:21 +00:00
rakshasa ded9e12ff1 * Added 'get_pid', 'get/set_name' and 'cat' command.
* SocketFd::open_local() should use SOCK_STREAM, not SOCK_DGRAM.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@959 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-20 01:38:38 +00:00
rakshasa 5ec7790aa9 * Added 'd.get_hash' and 'get_hostname' commands.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@958 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-18 23:44:59 +00:00
rakshasa 788b496241 * Fix the use of strlcpy.
* Allow lists as arguments in commands by using '{' and '}'. The list
will be recursed and all '$' will be called, while '~' will only be
expanded when in the first element in the list. E.g "execute =
touch,{~/tmp/,$get_client_version=}"

* Added rak::path_expand that works on char buffers.

* Fixed RequestList::calculate_pipe_size so it doesn't request too
many pieces from fast peers.

* Added 'execute_log' for logging the result of calls to 'execute'.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@952 e378c898-3ddf-0310-93e7-cc216c733640
2007-08-12 13:41:50 +00:00
rakshasa ac92b56f37 * Added 'get_d_ratio', 'view_list', 'get_d_tracker_focus',
'get_d_tracker_size', etc.

* Added tracker commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@945 e378c898-3ddf-0310-93e7-cc216c733640
2007-07-29 16:59:34 +00:00
rakshasa 1232cd44cb * Properly catch exceptions from commands called from DownloadFactory.
* The print command was not properly adding the final nul char to the
buffer.

* Added 'get_d_name' command.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@944 e378c898-3ddf-0310-93e7-cc216c733640
2007-07-24 23:12:42 +00:00
rakshasa 535db16850 * Bumping copyright year to 2007.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@938 e378c898-3ddf-0310-93e7-cc216c733640
2007-07-19 21:29:34 +00:00
rakshasa a8bd405040 * Added support for xmlrpc commands on torrent::File objects. The
xmlrpc command takes the download info-hash and the file index as the
first two parameters.

* Added several file commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@937 e378c898-3ddf-0310-93e7-cc216c733640
2007-07-19 20:50:48 +00:00
rakshasa 350bdfde7e * Allow ';' as a separator for multi-command lines. Not recognized by
the string parser, so it must be preceeded by whitespace.

* Allow escaping of newlines in the resource file.

* Cleanup of the parse_command_* commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@936 e378c898-3ddf-0310-93e7-cc216c733640
2007-07-17 16:24:57 +00:00
rakshasa 3570602a08 * Allow "print" command to take a list of parameters.
* Added "d_{start,stop,open,close,erase}" commands.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@934 e378c898-3ddf-0310-93e7-cc216c733640
2007-07-11 19:22:34 +00:00
rakshasa e9db89e6d6 * Put both global and download specific commands in a single
CommandMap.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@914 e378c898-3ddf-0310-93e7-cc216c733640
2007-06-17 03:14:38 +00:00
rakshasa 297b4b5f1d * Renamed VariableMap to CommandMap.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@913 e378c898-3ddf-0310-93e7-cc216c733640
2007-06-16 17:46:06 +00:00
rakshasa f8f2f80960 * Moved the rest of the helper functions from VariableMap to
parse_commands.h.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@912 e378c898-3ddf-0310-93e7-cc216c733640
2007-06-16 17:22:39 +00:00
rakshasa 0de4bbea7a * Re-enabled the umask option.
* Moved around command related classes.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@911 e378c898-3ddf-0310-93e7-cc216c733640
2007-06-16 00:14:09 +00:00
rakshasa c986357bab * Automatically add variables to XMLRPC unless added as private.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@898 e378c898-3ddf-0310-93e7-cc216c733640
2007-05-04 16:15:16 +00:00
rakshasa 43fd2c92ec * Return torrent::Object instead of reference from
utils::VariableMap::call_command(...).

* More cleanup of the command calls.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@895 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-28 02:37:08 +00:00
rakshasa 7077aba019 * More cleanup of commands, including some optimization by avoiding
some heap allocations.


git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@893 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-18 15:15:06 +00:00
rakshasa 81637ff5a0 * Converting various variables to the new command version.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@891 e378c898-3ddf-0310-93e7-cc216c733640
2007-04-17 14:57:56 +00:00