summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-02-22 10:54:09 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2009-02-22 10:54:09 +0000
commit590dd9292f0d3cdd95c3ba1786ad8ff9487bb400 (patch)
tree2bdb8d5a0f35409b12b7b17a0a29eb0078b41f87
parent2497f6da2f34104f57a70a1720e903edbd828c85 (diff)
Don't remove an expired xline on add, simply drop duplicates (1.1 behaviour). This can lead to bouncing between servers.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11140 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/xline.cpp11
1 files changed, 2 insertions, 9 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index 307ffc21c..4bd3e51b5 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -170,18 +170,11 @@ bool XLineManager::AddLine(XLine* line, User* user)
if (line->duration && ServerInstance->Time() > line->expiry)
return false; // Don't apply expired XLines.
- /* If the line exists, check if its an expired line */
+ /* 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;
}
/*ELine* item = new ELine(ServerInstance, ServerInstance->Time(), duration, source, reason, ih.first.c_str(), ih.second.c_str());*/