aboutsummaryrefslogtreecommitdiff
path: root/src/daemon/command_server.cpp
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-26 00:04:22 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2015-11-26 00:04:22 +0000
commit38ceb73848a3c37df60bce637d855b7564b09730 (patch)
treeed35b91ab9e9b6a90e612cfe1ad42d54ce1d5321 /src/daemon/command_server.cpp
parentnet_node: allow bans for custom amounts of time (diff)
downloadmonero-38ceb73848a3c37df60bce637d855b7564b09730.tar.xz
add RPC calls and commands to get/set bans
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)