* +------------------------------------+
*
* InspIRCd: (C) 2002-2009 InspIRCd Development Team
- * See: http://www.inspircd.org/wiki/index.php/Credits
+ * See: http://wiki.inspircd.org/Credits
*
* This program is free but copyrighted software; see
* the file COPYING for details.
#include "bancache.h"
/*
- * This is now version 3 of the XLine subsystem, let's see if we can get it as nice and
+ * This is now version 3 of the XLine subsystem, let's see if we can get it as nice and
* efficient as we can this time so we can close this file and never ever touch it again ..
*
* Background:
{
ServerInstance->BanCache->RemoveEntries(line->type, false); // XXX perhaps remove ELines here?
- /* If the line exists, check if its an expired line */
+ if (line->duration && ServerInstance->Time() > line->expiry)
+ return false; // Don't apply expired XLines.
+
+ /* Don't apply duplicate xlines */
ContainerIter x = lookup_lines.find(line->type);
if (x != lookup_lines.end())
{
LookupIter i = x->second.find(line->Displayable());
if (i != x->second.end())
{
- if (i->second->duration && ServerInstance->Time() > i->second->expiry)
- ExpireLine(x, i);
- else
- return false;
+ return false;
}
}
lookup_lines[line->type][line->Displayable()] = line;
line->OnAdd();
- FOREACH_MOD(I_OnAddLine,OnAddLine(user, line));
+ FOREACH_MOD(I_OnAddLine,OnAddLine(user, line));
return true;
}
i->second.clear();
}
lookup_lines.clear();
-
+
}
void XLine::Apply(User* u)
}
void GLine::Apply(User* u)
-{
+{
DefaultApply(u, "G", (strcmp(this->identmask, "*") == 0) ? true : false);
}
}
void ZLine::Apply(User* u)
-{
+{
DefaultApply(u, "Z", true);
}
}
void QLine::Apply(User* u)
-{
+{
/* Force to uuid on apply of qline, no need to disconnect any more :) */
u->ForceNickChange(u->uuid.c_str());
}
return n->second;
}
-