diff --git a/src/command_network.cc b/src/command_network.cc index 07f6666c..d0bfeacc 100644 --- a/src/command_network.cc +++ b/src/command_network.cc @@ -61,8 +61,6 @@ apply_tos(const torrent::Object::string_type& arg) { return torrent::Object(); } -torrent::Object apply_encoding_list(const std::string& arg) { torrent::encoding_list()->push_back(arg); return torrent::Object(); } - void initialize_rpc_handlers() { rpc::rpc.initialize_handlers(); @@ -221,8 +219,6 @@ initialize_command_network() { auto http_stack = torrent::net_thread::http_stack(); auto nw_config = torrent::runtime::network_config(); - CMD2_ANY_STRING ("encoding.add", std::bind(&apply_encoding_list, std::placeholders::_2)); - // Isn't port_open used? CMD2_VAR_BOOL ("network.port_open", true); CMD2_VAR_BOOL ("network.port_random", true); diff --git a/src/main.cc b/src/main.cc index 9880fdad..9d5e1923 100644 --- a/src/main.cc +++ b/src/main.cc @@ -383,6 +383,10 @@ main(int argc, char** argv) { // Users should check their setups to see if they need to modify their use of these options. CMD2_REDIRECT("max_memory_usage", "pieces.memory.max.set"); CMD2_REDIRECT("encoding_list", "encoding.add"); + + CMD2_ANY_STRING_V("encoding.add", [](auto, auto) { + lt_log_print(torrent::LOG_WARN, "The 'encoding.add' command is deprecated and does nothing."); + }); } {