Skip to content

Commit

Permalink
Merge pull request ddnet#8640 from Robyt3/Server-DNSBL-Ban-Only-New
Browse files Browse the repository at this point in the history
Only apply DNSBL bans once when player joins
  • Loading branch information
def- authored Jul 24, 2024
2 parents c7bcdc3 + 7f2908d commit a84a53c
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions src/engine/server/server.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -2890,12 +2890,12 @@ int CServer::Run()
str_format(aBuf, sizeof(aBuf), "ClientId=%d addr=<{%s}> secure=%s blacklisted", ClientId, aAddrStr, m_NetServer.HasSecurityToken(ClientId) ? "yes" : "no");

Console()->Print(IConsole::OUTPUT_LEVEL_ADDINFO, "dnsbl", aBuf);
}
}

if(m_aClients[ClientId].m_DnsblState == CClient::DNSBL_STATE_BLACKLISTED && Config()->m_SvDnsblBan)
{
m_NetServer.NetBan()->BanAddr(m_NetServer.ClientAddr(ClientId), 60 * 10, Config()->m_SvDnsblBanReason);
if(Config()->m_SvDnsblBan)
{
m_NetServer.NetBan()->BanAddr(m_NetServer.ClientAddr(ClientId), 60 * 10, Config()->m_SvDnsblBanReason);
}
}
}
}
}
Expand Down

0 comments on commit a84a53c

Please sign in to comment.