From 0ab7720ea4b53996a4bb6b8e47e8aae9304861a1 Mon Sep 17 00:00:00 2001 From: Peter Powell Date: Thu, 16 May 2019 17:56:37 +0100 Subject: Fix applying pending xlines to online users. --- src/xline.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src') diff --git a/src/xline.cpp b/src/xline.cpp index bf61d76ea..f9d94e447 100644 --- a/src/xline.cpp +++ b/src/xline.cpp @@ -446,9 +446,9 @@ void XLineManager::ExpireLine(ContainerIter container, LookupIter item, bool sil void XLineManager::ApplyLines() { const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers(); - for (UserManager::LocalList::const_iterator j = list.begin(); j != list.end(); ++j) + for (UserManager::LocalList::const_iterator j = list.begin(); j != list.end(); ) { - LocalUser* u = *j; + LocalUser* u = *j++; // Don't ban people who are exempt. if (u->exempt) @@ -458,7 +458,10 @@ void XLineManager::ApplyLines() { XLine *x = *i; if (x->Matches(u)) + { x->Apply(u); + break; + } } } -- cgit v1.2.3