diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-17 00:26:15 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-02-17 00:26:15 +0000 |
commit | 8dcc694bb11c35f97c57262c1c03d425dd71686b (patch) | |
tree | 90c3cfedf543c1d764e840a43c19d3c715985fd4 /src | |
parent | f55e56f44a518b7ba478a4225208ca3019427759 (diff) |
I gots a better fix :p
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8951 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_spanningtree/netburst.cpp | 7 | ||||
-rw-r--r-- | src/xline.cpp | 10 |
2 files changed, 15 insertions, 2 deletions
diff --git a/src/modules/m_spanningtree/netburst.cpp b/src/modules/m_spanningtree/netburst.cpp index e9366ef71..86d13e96f 100644 --- a/src/modules/m_spanningtree/netburst.cpp +++ b/src/modules/m_spanningtree/netburst.cpp @@ -164,8 +164,11 @@ void TreeSocket::SendXLines(TreeServer* Current) { for (LookupIter i = lookup->begin(); i != lookup->end(); ++i) { - if (i->second->type == "K") - continue; + /* Is it burstable? this is better than an explicit check for type 'K'. + * We break the loop as NONE of the items in this group are worth iterating. + */ + if (!i->second->IsBurstable()) + break; snprintf(data,MAXBUF,":%s ADDLINE %s %s %s %lu %lu :%s\r\n",sn, it->c_str(), i->second->Displayable(), i->second->source, diff --git a/src/xline.cpp b/src/xline.cpp index 57e6221c4..547a54fea 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -391,6 +391,11 @@ void XLine::Apply(User* u) { } +bool XLine::IsBurstable() +{ + return true; +} + void XLine::DefaultApply(User* u, const std::string &line, bool bancache) { char sreason[MAXBUF]; @@ -595,6 +600,11 @@ const char* QLine::Displayable() return nick; } +bool KLine::IsBurstable() +{ + return false; +} + bool XLineManager::RegisterFactory(XLineFactory* xlf) { XLineFactMap::iterator n = line_factory.find(xlf->GetType()); |