|
|
@ -1699,15 +1699,19 @@ bool t_rpc_command_executor::print_bans()
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
for (auto i = res.bans.begin(); i != res.bans.end(); ++i)
|
|
|
|
if (!res.bans.empty())
|
|
|
|
{
|
|
|
|
{
|
|
|
|
tools::msg_writer() << i->host << " banned for " << i->seconds << " seconds";
|
|
|
|
for (auto i = res.bans.begin(); i != res.bans.end(); ++i)
|
|
|
|
|
|
|
|
{
|
|
|
|
|
|
|
|
tools::msg_writer() << i->host << " banned for " << i->seconds << " seconds";
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
else
|
|
|
|
|
|
|
|
tools::msg_writer() << "No IPs are banned";
|
|
|
|
|
|
|
|
|
|
|
|
return true;
|
|
|
|
return true;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
bool t_rpc_command_executor::ban(const std::string &address, time_t seconds)
|
|
|
|
bool t_rpc_command_executor::ban(const std::string &address, time_t seconds)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
cryptonote::COMMAND_RPC_SETBANS::request req;
|
|
|
|
cryptonote::COMMAND_RPC_SETBANS::request req;
|
|
|
|