From 4abc2ff167877be048707a8482015b0ffc88d345 Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 16 Nov 2008 15:50:42 +0000 Subject: Don't burst expired X:, should help stop bounce wars.. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10808 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree/netburst.cpp | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index b97c582d0..704afdc42 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -159,6 +159,7 @@ void TreeSocket::SendXLines(TreeServer* Current) const char* sn = n.c_str(); std::vector types = ServerInstance->XLines->GetAllTypes(); + time_t current = ServerInstance->Time(); for (std::vector::iterator it = types.begin(); it != types.end(); ++it) { @@ -174,6 +175,11 @@ void TreeSocket::SendXLines(TreeServer* Current) if (!i->second->IsBurstable()) break; + /* If it's expired, don't bother to burst it + */ + if (i->second->duration && current > i->second->expiry) + continue; + snprintf(data,MAXBUF,":%s ADDLINE %s %s %s %lu %lu :%s",sn, it->c_str(), i->second->Displayable(), i->second->source, (unsigned long)i->second->set_time, -- cgit v1.2.3