mirror of
https://github.com/ddnet/ddnet.git
synced 2024-11-10 10:08:18 +00:00
hacky bans fix
This commit is contained in:
parent
3cedbd5061
commit
e6e9bbc059
|
@ -406,8 +406,15 @@ int CNetBan::UnbanByIndex(int Index)
|
||||||
return Result;
|
return Result;
|
||||||
}
|
}
|
||||||
|
|
||||||
bool CNetBan::IsBanned(const NETADDR *pAddr, char *pBuf, unsigned BufferSize) const
|
bool CNetBan::IsBanned(const NETADDR *pOrigAddr, char *pBuf, unsigned BufferSize) const
|
||||||
{
|
{
|
||||||
|
NETADDR addr;
|
||||||
|
NETADDR *pAddr = pOrigAddr;
|
||||||
|
if (pOrigAddr->type == NETTYPE_WEBSOCKET_IPV4) {
|
||||||
|
mem_copy(&addr, pOrigAddr, sizeof(NETADDR));
|
||||||
|
pAddr = &addr;
|
||||||
|
addr.type = NETTYPE_IPV4;
|
||||||
|
}
|
||||||
CNetHash aHash[17];
|
CNetHash aHash[17];
|
||||||
int Length = CNetHash::MakeHashArray(pAddr, aHash);
|
int Length = CNetHash::MakeHashArray(pAddr, aHash);
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue