From f17b6e834b3a33f734403463e1f3a56fd87ac225 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 26 Feb 2006 20:24:35 +0000 Subject: Now the obligotary typo fixes git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3344 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 33 +++++++++++++++++---------------- 1 file changed, 17 insertions(+), 16 deletions(-) diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 20c86f705..af1a70f19 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1204,75 +1204,76 @@ class TreeSocket : public InspSocket { char data[MAXBUF]; const char* sn = Srv->GetServerName().c_str(); + int iterations = 0; /* Yes, these arent too nice looking, but they get the job done */ - for (std::vector::iterator i = zlines.begin(); i != zlines.end(); i++) + for (std::vector::iterator i = zlines.begin(); i != zlines.end(); i++, iterations++) { snprintf(data,MAXBUF,":%s ADDLINE Z %s %s %lu %lu :%s",sn,i->ipaddr,i->source,(unsigned long)i->set_time,(unsigned long)i->duration,i->reason); this->WriteLine(data); - if ((i % 20) == 0) + if ((iterations % 20) == 0) { ServerInstance->DoOneIteration(false); } } - for (std::vector::iterator i = qlines.begin(); i != qlines.end(); i++) + for (std::vector::iterator i = qlines.begin(); i != qlines.end(); i++, iterations++) { snprintf(data,MAXBUF,":%s ADDLINE Q %s %s %lu %lu :%s",sn,i->nick,i->source,(unsigned long)i->set_time,(unsigned long)i->duration,i->reason); this->WriteLine(data); - if ((i % 20) == 0) + if ((iterations % 20) == 0) { ServerInstance->DoOneIteration(false); } } - for (std::vector::iterator i = glines.begin(); i != glines.end(); i++) + for (std::vector::iterator i = glines.begin(); i != glines.end(); i++, iterations++) { snprintf(data,MAXBUF,":%s ADDLINE G %s %s %lu %lu :%s",sn,i->hostmask,i->source,(unsigned long)i->set_time,(unsigned long)i->duration,i->reason); this->WriteLine(data); - if ((i % 20) == 0) + if ((iterations % 20) == 0) { ServerInstance->DoOneIteration(false); } } - for (std::vector::iterator i = elines.begin(); i != elines.end(); i++) + for (std::vector::iterator i = elines.begin(); i != elines.end(); i++, iterations++) { snprintf(data,MAXBUF,":%s ADDLINE E %s %s %lu %lu :%s",sn,i->hostmask,i->source,(unsigned long)i->set_time,(unsigned long)i->duration,i->reason); this->WriteLine(data); - if ((i % 20) == 0) + if ((iterations % 20) == 0) { ServerInstance->DoOneIteration(false); } } - for (std::vector::iterator i = pzlines.begin(); i != pzlines.end(); i++) + for (std::vector::iterator i = pzlines.begin(); i != pzlines.end(); i++, iterations++) { snprintf(data,MAXBUF,":%s ADDLINE Z %s %s %lu %lu :%s",sn,i->ipaddr,i->source,(unsigned long)i->set_time,(unsigned long)i->duration,i->reason); this->WriteLine(data); - if ((i % 20) == 0) + if ((iterations % 20) == 0) { ServerInstance->DoOneIteration(false); } } - for (std::vector::iterator i = pqlines.begin(); i != pqlines.end(); i++) + for (std::vector::iterator i = pqlines.begin(); i != pqlines.end(); i++, iterations++) { snprintf(data,MAXBUF,":%s ADDLINE Q %s %s %lu %lu :%s",sn,i->nick,i->source,(unsigned long)i->set_time,(unsigned long)i->duration,i->reason); this->WriteLine(data); - if ((i % 20) == 0) + if ((iterations % 20) == 0) { ServerInstance->DoOneIteration(false); } } - for (std::vector::iterator i = pglines.begin(); i != pglines.end(); i++) + for (std::vector::iterator i = pglines.begin(); i != pglines.end(); i++, iterations++) { snprintf(data,MAXBUF,":%s ADDLINE G %s %s %lu %lu :%s",sn,i->hostmask,i->source,(unsigned long)i->set_time,(unsigned long)i->duration,i->reason); this->WriteLine(data); - if ((i % 20) == 0) + if ((iterations % 20) == 0) { ServerInstance->DoOneIteration(false); } } - for (std::vector::iterator i = pelines.begin(); i != pelines.end(); i++) + for (std::vector::iterator i = pelines.begin(); i != pelines.end(); i++, iterations++) { snprintf(data,MAXBUF,":%s ADDLINE E %s %s %lu %lu :%s",sn,i->hostmask,i->source,(unsigned long)i->set_time,(unsigned long)i->duration,i->reason); this->WriteLine(data); - if ((i % 20) == 0) + if ((iterations % 20) == 0) { ServerInstance->DoOneIteration(false); } -- cgit v1.2.3