Move the definition of the BanCacheHit constructor into the source file from the header

This commit is contained in:
Attila Molnar 2014-06-13 15:19:27 +02:00
parent 2269b9740b
commit 9f27390382
2 changed files with 8 additions and 4 deletions

View File

@ -40,10 +40,7 @@ class CoreExport BanCacheHit
*/
time_t Expiry;
BanCacheHit(const std::string &type, const std::string &reason, time_t seconds)
: Type(type), Reason(reason), Expiry(ServerInstance->Time() + seconds)
{
}
BanCacheHit(const std::string& type, const std::string& reason, time_t seconds);
bool IsPositive() const { return (!Reason.empty()); }
};

View File

@ -21,6 +21,13 @@
#include "inspircd.h"
#include "bancache.h"
BanCacheHit::BanCacheHit(const std::string& type, const std::string& reason, time_t seconds)
: Type(type)
, Reason(reason)
, Expiry(ServerInstance->Time() + seconds)
{
}
BanCacheHit *BanCacheManager::AddHit(const std::string &ip, const std::string &type, const std::string &reason, time_t seconds)
{
BanCacheHit*& b = BanHash[ip];