diff options
author | Peter Powell <petpow@saberuk.com> | 2019-05-16 17:56:37 +0100 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-05-16 17:58:09 +0100 |
commit | 0ab7720ea4b53996a4bb6b8e47e8aae9304861a1 (patch) | |
tree | 073df49add18b11d3b7e3e689829c12fe7ad1bd9 /src | |
parent | 1808a9a1b01cd6c754adaf9cf6a69038e3dddf79 (diff) |
Fix applying pending xlines to online users.
Diffstat (limited to 'src')
-rw-r--r-- | src/xline.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
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; + } } } |