From 2497f6da2f34104f57a70a1720e903edbd828c85 Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 22 Feb 2009 10:54:08 +0000 Subject: [PATCH] Don't allow expired XLines to be added. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11139 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/xline.cpp | 3 +++ 1 file changed, 3 insertions(+) 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()) -- 2.39.5