X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fbancache.h;h=1d56decc11d2b897e2b20ab5fcc8bcef804aef06;hb=0377d937c5d1bf20fa0c29d4a41c7fd89502ab38;hp=9266149fc1507dbb7e5f8bcd499a4ad1b6b99143;hpb=b6dbd6caab62bc2c0d11ce5a45d511611eb9c2ef;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/bancache.h b/include/bancache.h index 9266149fc..1d56decc1 100644 --- a/include/bancache.h +++ b/include/bancache.h @@ -62,10 +62,10 @@ class CoreExport BanCacheHit : public classbase /* A container of ban cache items. * must be defined after class BanCacheHit. */ -#ifndef WIN32 -typedef nspace::hash_map > BanCacheHash; -#else +#if defined(WINDOWS) && !defined(HASHMAP_DEPRECATED) typedef nspace::hash_map > > BanCacheHash; +#else +typedef nspace::hash_map > BanCacheHash; #endif /** A manager for ban cache, which allocates and deallocates and checks cached bans. @@ -100,6 +100,10 @@ class CoreExport BanCacheManager : public classbase this->ServerInstance = Instance; this->BanHash = new BanCacheHash(); } + ~BanCacheManager() + { + delete BanHash; + } void RehashCache(); };