summaryrefslogtreecommitdiff
path: root/src/xline.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/xline.cpp')
-rw-r--r--src/xline.cpp11
1 files changed, 3 insertions, 8 deletions
diff --git a/src/xline.cpp b/src/xline.cpp
index 66d24f439..0506005ad 100644
--- a/src/xline.cpp
+++ b/src/xline.cpp
@@ -159,6 +159,7 @@ void XLineManager::CheckELines()
for (LocalUserList::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
{
User* u = (User*)(*u2);
+ u->exempt = false;
/* This uses safe iteration to ensure that if a line expires here, it doenst trash the iterator */
LookupIter safei;
@@ -169,7 +170,8 @@ void XLineManager::CheckELines()
safei++;
XLine *e = i->second;
- u->exempt = e->Matches(u);
+ if ((!e->duration || ServerInstance->Time() < e->expiry) && e->Matches(u))
+ u->exempt = true;
i = safei;
}
@@ -325,13 +327,6 @@ bool XLineManager::DelLine(const char* hostmask, const std::string &type, User*
void ELine::Unset()
{
- /* remove exempt from everyone and force recheck after deleting eline */
- for (LocalUserList::const_iterator u2 = ServerInstance->Users->local_users.begin(); u2 != ServerInstance->Users->local_users.end(); u2++)
- {
- User* u = (User*)(*u2);
- u->exempt = false;
- }
-
ServerInstance->XLines->CheckELines();
}