mirror of
https://github.com/rakshasa/rtorrent.git
synced 2026-10-06 22:29:23 +00:00
* Added command scheduler, currently it only calls option handler.
git-svn-id: svn://rakshasa.no/libtorrent/trunk/rtorrent@609 e378c898-3ddf-0310-93e7-cc216c733640
This commit is contained in:
@@ -83,3 +83,13 @@ OptionHandler::process(const std::string& key, const std::string& arg) const {
|
||||
|
||||
itr->second->process(key, arg);
|
||||
}
|
||||
|
||||
void
|
||||
OptionHandler::process_command(const std::string& command) const {
|
||||
std::string::size_type pos = command.find('=');
|
||||
|
||||
if (pos == std::string::npos)
|
||||
throw torrent::input_error("Option handler could not find '=' in command.");
|
||||
|
||||
process(command.substr(0, pos), command.substr(pos + 1, std::string::npos));
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user