X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fxline.cpp;h=a57f604c515df05cf3566d242053419c9f2ae1f2;hb=6eeecaada5818d8dc1f3bb98c3e0916d195e3592;hp=c92643bcd21d85e66030a3d6998ae467beb39466;hpb=f209cce90b394acd26e22eacef0bff61e8f5b4e1;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/xline.cpp b/src/xline.cpp index c92643bcd..a57f604c5 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -3,7 +3,7 @@ * +------------------------------------+ * * 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. @@ -167,17 +167,17 @@ bool XLineManager::AddLine(XLine* line, User* user) { 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; } }