diff --git a/src/engine/shared/netban.cpp b/src/engine/shared/netban.cpp index 2bbc9dda2..0b7baec6d 100644 --- a/src/engine/shared/netban.cpp +++ b/src/engine/shared/netban.cpp @@ -406,8 +406,15 @@ int CNetBan::UnbanByIndex(int Index) 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]; int Length = CNetHash::MakeHashArray(pAddr, aHash);