interim checkin of the rebased code

This commit is contained in:
Some Random Crypto Guy
2025-03-13 17:57:28 +00:00
parent 9570c7a910
commit 9baeb750ac
81 changed files with 1232 additions and 766 deletions
+10
View File
@@ -696,6 +696,16 @@ bool t_command_parser_executor::ban(const std::vector<std::string>& args)
std::ifstream ifs(ban_list_path.string());
for (std::string line; std::getline(ifs, line); )
{
// ignore comments after '#' character
const size_t pound_idx = line.find('#');
if (pound_idx != std::string::npos)
line.resize(pound_idx);
// trim whitespace and ignore empty lines
boost::trim(line);
if (line.empty())
continue;
auto subnet = net::get_ipv4_subnet_address(line);
if (subnet)
{