mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-08-15 14:42:30 +00:00
* Allow inlining functions in commands with parantheses, e.g:
print = (convert.time,(system.time)) schedule2 = test_print_2,2,2,((print,"current ",((convert.time,((system.time)))))) Multiple parantheses need to be used in schedule to ensure the command doesn't get evaluated at the time of calling schedule. git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@1191 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -39,6 +39,8 @@
|
||||
|
||||
#include "globals.h"
|
||||
|
||||
#include <torrent/object.h>
|
||||
|
||||
namespace rpc {
|
||||
|
||||
class CommandSchedulerItem {
|
||||
@@ -54,9 +56,7 @@ public:
|
||||
void disable();
|
||||
|
||||
const std::string& key() const { return m_key; }
|
||||
|
||||
const std::string& command() const { return m_command; }
|
||||
void set_command(const std::string& s) { m_command = s; }
|
||||
torrent::Object& command() { return m_command; }
|
||||
|
||||
// 'interval()' should in the future return some more dynamic values.
|
||||
uint32_t interval() const { return m_interval; }
|
||||
@@ -72,7 +72,7 @@ private:
|
||||
void operator = (const CommandSchedulerItem&);
|
||||
|
||||
std::string m_key;
|
||||
std::string m_command;
|
||||
torrent::Object m_command;
|
||||
|
||||
uint32_t m_interval;
|
||||
rak::timer m_timeScheduled;
|
||||
|
||||
Reference in New Issue
Block a user