time_t unlocktime;
int counter;
bool locked;
-
+ InspIRCd* ServerInstance;
+
joinfloodsettings() : secs(0), joins(0) {};
joinfloodsettings(int b, int c) : secs(b), joins(c)
{
- reset = InspIRCd::Time() + secs;
+ reset = time(NULL) + secs;
counter = 0;
locked = false;
};
void addjoin()
{
counter++;
- if (InspIRCd::Time() > reset)
+ if (time(NULL) > reset)
{
counter = 0;
- reset = InspIRCd::Time() + secs;
+ reset = time(NULL) + secs;
}
}
{
if (locked)
{
- if (InspIRCd::Time() > unlocktime)
+ if (time(NULL) > unlocktime)
{
locked = false;
return false;
void lock()
{
locked = true;
- unlocktime = InspIRCd::Time() + 60;
+ unlocktime = time(NULL) + 60;
}
};
virtual Version GetVersion()
{
- return Version(1, 0, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
+ return Version(1, 1, 0, 0, VF_COMMON | VF_VENDOR, API_VERSION);
}
};