Skip to content

Commit

Permalink
daemon: if no banned IPs print something
Browse files Browse the repository at this point in the history
  • Loading branch information
sumogr committed Feb 24, 2020
1 parent 39e1890 commit 6810150
Showing 1 changed file with 7 additions and 3 deletions.
10 changes: 7 additions & 3 deletions src/daemon/rpc_command_executor.cpp
Expand Up @@ -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;
}


bool t_rpc_command_executor::ban(const std::string &address, time_t seconds)
{
cryptonote::COMMAND_RPC_SETBANS::request req;
Expand Down

0 comments on commit 6810150

Please sign in to comment.