mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-13 21:52:30 +00:00
* 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
This commit is contained in:
@@ -80,6 +80,8 @@ parse_command_single(const char* first) {
|
||||
parse_command_single(first, first + std::strlen(first));
|
||||
}
|
||||
|
||||
// Set 'download' to NULL to call the generic functions, thus reusing
|
||||
// the code below for both cases.
|
||||
torrent::Object
|
||||
parse_command_d_single(core::Download* download, const char* first, const char* last) {
|
||||
first = std::find_if(first, last, std::not1(command_map_is_space()));
|
||||
@@ -97,8 +99,10 @@ parse_command_d_single(core::Download* download, const char* first, const char*
|
||||
torrent::Object args;
|
||||
parse_whole_list(first + 1, last, &args);
|
||||
|
||||
// Replace any strings starting with '$' with the result of the
|
||||
// following command.
|
||||
if (args.is_list()) {
|
||||
for (torrent::Object::list_type::iterator itr = args.as_list().begin(), last = args.as_list().begin(); itr != last; itr++) {
|
||||
for (torrent::Object::list_type::iterator itr = args.as_list().begin(), last = args.as_list().end(); itr != last; itr++) {
|
||||
if (!itr->is_string())
|
||||
continue;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user