mirror of
https://github.com/monero-project/monero.git
synced 2024-11-17 08:17:37 +00:00
Merge pull request #6353
6810150
daemon: if no banned IPs print something (sumogr)
This commit is contained in:
commit
6a6eedd842
1 changed files with 7 additions and 3 deletions
|
@ -1699,15 +1699,19 @@ bool t_rpc_command_executor::print_bans()
|
|||
}
|
||||
}
|
||||
|
||||
if (!res.bans.empty())
|
||||
{
|
||||
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;
|
||||
}
|
||||
|
||||
|
||||
bool t_rpc_command_executor::ban(const std::string &address, time_t seconds)
|
||||
{
|
||||
cryptonote::COMMAND_RPC_SETBANS::request req;
|
||||
|
|
Loading…
Reference in a new issue