hacky bans fix

This commit is contained in:
eeeee 2015-05-15 18:27:10 -07:00
parent 3cedbd5061
commit e6e9bbc059

View file

@ -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);