]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/xline.cpp
Allow non-opers to use /MKPASSWD
[user/henk/code/inspircd.git] / src / xline.cpp
index c92643bcd21d85e66030a3d6998ae467beb39466..f6fc8af0ae6e701f12086c4cd73111edc9cb0625 100644 (file)
@@ -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;
                }
        }