aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_server.cpp
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2015-11-30 00:16:32 +0200
committerRiccardo Spagni <ric@spagni.net>2015-11-30 00:16:34 +0200
commita2d1e5a82cdc67f3b84ef476a08fb0f4da047ab1 (patch)
treeed35b91ab9e9b6a90e612cfe1ad42d54ce1d5321 /src/daemon/command_server.cpp
parentMerge pull request #501 (diff)
parentadd RPC calls and commands to get/set bans (diff)
downloadmonero-a2d1e5a82cdc67f3b84ef476a08fb0f4da047ab1.tar.xz
Merge pull request #502
38ceb73 add RPC calls and commands to get/set bans (moneromooo-monero) 7bc4dce net_node: allow bans for custom amounts of time (moneromooo-monero)
Diffstat (limited to 'src/daemon/command_server.cpp')
-rw-r--r--src/daemon/command_server.cpp15
1 files changed, 15 insertions, 0 deletions
diff --git a/src/daemon/command_server.cpp b/src/daemon/command_server.cpp
index 8714b2569..0999ed30c 100644
--- a/src/daemon/command_server.cpp
+++ b/src/daemon/command_server.cpp
@@ -194,6 +194,21 @@ t_command_server::t_command_server(
, std::bind(&t_command_parser_executor::hard_fork_info, &m_parser, p::_1)
, "Print hard fork voting information"
);
+ m_command_lookup.set_handler(
+ "bans"
+ , std::bind(&t_command_parser_executor::show_bans, &m_parser, p::_1)
+ , "Show the currently banned IPs"
+ );
+ m_command_lookup.set_handler(
+ "ban"
+ , std::bind(&t_command_parser_executor::ban, &m_parser, p::_1)
+ , "Ban a given IP for a time"
+ );
+ m_command_lookup.set_handler(
+ "unban"
+ , std::bind(&t_command_parser_executor::unban, &m_parser, p::_1)
+ , "Unban a given IP"
+ );
}
bool t_command_server::process_command_str(const std::string& cmd)