diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-26 20:24:35 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-02-26 20:24:35 +0000 |
commit | f17b6e834b3a33f734403463e1f3a56fd87ac225 (patch) | |
tree | e914946c1fbe652a951af37cc3ad9bef8364501d /src/modules/m_spanningtree.cpp | |
parent | f5c28c5e69f2d179eb54c5904d33d585b4e92a4e (diff) |
Now the obligotary typo fixes
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3344 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules/m_spanningtree.cpp')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 33 |
1 files 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<ZLine>::iterator i = zlines.begin(); i != zlines.end(); i++) + for (std::vector<ZLine>::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<QLine>::iterator i = qlines.begin(); i != qlines.end(); i++) + for (std::vector<QLine>::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<GLine>::iterator i = glines.begin(); i != glines.end(); i++) + for (std::vector<GLine>::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<ELine>::iterator i = elines.begin(); i != elines.end(); i++) + for (std::vector<ELine>::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<ZLine>::iterator i = pzlines.begin(); i != pzlines.end(); i++) + for (std::vector<ZLine>::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<QLine>::iterator i = pqlines.begin(); i != pqlines.end(); i++) + for (std::vector<QLine>::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<GLine>::iterator i = pglines.begin(); i != pglines.end(); i++) + for (std::vector<GLine>::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<ELine>::iterator i = pelines.begin(); i != pelines.end(); i++) + for (std::vector<ELine>::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); } |