summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-02-22 10:54:08 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-02-22 10:54:08 +0000
commit2497f6da2f34104f57a70a1720e903edbd828c85 (patch)
tree59158ebde7fa40fc3f241c35db7097f2086202f2
parentce19cce8cbad20bed283f7143034f030a3f8bcbc (diff)
Don't allow expired XLines to be added.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11139 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/xline.cpp3
1 files changed, 3 insertions, 0 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index c92643bcd..307ffc21c 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -167,6 +167,9 @@ bool XLineManager::AddLine(XLine* line, User* user)
{
ServerInstance->BanCache->RemoveEntries(line->type, false); // XXX perhaps remove ELines here?
+ if (line->duration && ServerInstance->Time() > line->expiry)
+ return false; // Don't apply expired XLines.
+
/* If the line exists, check if its an expired line */
ContainerIter x = lookup_lines.find(line->type);
if (x != lookup_lines.end())