X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fxline.cpp;h=accffb8d0ebaf7ba0181f69b506ed3f2c2f59b86;hb=2ec7654267f8ad127653839ba9aaf369705e3026;hp=bf61d76ea480b63cc0689baa7ab2ad830926245e;hpb=f87b72b76f9ef198bdbbb01f9ca409501666c6a2;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/xline.cpp b/src/xline.cpp index bf61d76ea..accffb8d0 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,14 @@ void XLineManager::ApplyLines() { XLine *x = *i; if (x->Matches(u)) + { x->Apply(u); + + // If applying the X-line has killed the user then don't + // apply any more lines to them. + if (u->quitting) + break; + } } }