]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/bancache.cpp
Patch: /rehash (not /rehash ssl) will now rebind SSL ports, but not dh params etc...
[user/henk/code/inspircd.git] / src / bancache.cpp
index 3678dda0bd13c13dc4641722200c22b0e392c5a8..2254a117b3f0aaeb972a3e18b1780b5e8eb3e5d1 100644 (file)
@@ -29,6 +29,19 @@ BanCacheHit *BanCacheManager::AddHit(const std::string &ip, const std::string &t
        return b;
 }
 
+BanCacheHit *BanCacheManager::AddHit(const std::string &ip, const std::string &type, const std::string &reason, time_t seconds)
+{
+       BanCacheHit *b;
+
+       if (this->BanHash->find(ip) != this->BanHash->end()) // can't have two cache entries on the same IP, sorry..
+               return NULL;
+
+       b = new BanCacheHit(ServerInstance, ip, type, reason, seconds);
+
+       this->BanHash->insert(std::make_pair(ip, b));
+       return b;
+}
+
 BanCacheHit *BanCacheManager::GetHit(const std::string &ip)
 {
        BanCacheHash::iterator i = this->BanHash->find(ip);