inspircd

A modular C++ IRC daemon (ircd). https://www.inspircd.org/
Log | Files | Refs | README

commit 0ab7720ea4b53996a4bb6b8e47e8aae9304861a1
parent 1808a9a1b01cd6c754adaf9cf6a69038e3dddf79
Author: Peter Powell <petpow@saberuk.com>
Date:   Thu, 16 May 2019 17:56:37 +0100

Fix applying pending xlines to online users.

Diffstat:
Msrc/xline.cpp | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git 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; + } } }