summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-16 13:45:46 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-09-16 13:45:46 +0000
commit3626aeb9ce4798c73cf3a5621388406062c450f7 (patch)
treef0d056cf4cb9ee8143d91d577047463c83bc31d9 /src/xline.cpp
parent423d9be3b1d09607ce82d09dbb6414a8b5f006c8 (diff)
Fix iteration of ServerInstance->Users->local_users now that QuitUser can modify the vector
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11732 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index 33219b612..b15a7ce2b 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -338,9 +338,10 @@ void XLineManager::ExpireLine(ContainerIter container, LookupIter item)
// applies lines, removing clients and changing nicks etc as applicable
void XLineManager::ApplyLines()
{
- for (std::vector<User*>::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
+ std::vector<User*>::reverse_iterator u2 = ServerInstance->Users->local_users.rbegin();
+ while (u2 != ServerInstance->Users->local_users.rend())
{
- User* u = (User*)(*u2);
+ User* u = *u2++;
// Don't ban people who are exempt.
if (u->exempt)