for (UserManager::LocalList::const_iterator u2 = list.begin(); u2 != list.end(); u2++)
{
LocalUser* u = *u2;
+ u->exempt = false;
/* This uses safe iteration to ensure that if a line expires here, it doenst trash the iterator */
LookupIter safei;
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;
}
ContainerIter x = lookup_lines.find(line->type);
if (x != lookup_lines.end())
{
- LookupIter i = x->second.find(line->Displayable().c_str());
+ LookupIter i = x->second.find(line->Displayable());
if (i != x->second.end())
{
// XLine propagation bug was here, if the line to be added already exists and
if (xlf->AutoApplyToUserList(line))
pending_lines.push_back(line);
- lookup_lines[line->type][line->Displayable().c_str()] = line;
+ lookup_lines[line->type][line->Displayable()] = line;
line->OnAdd();
FOREACH_MOD(OnAddLine, (user, line));
void ELine::Unset()
{
- /* remove exempt from everyone and force recheck after deleting eline */
- const UserManager::LocalList& list = ServerInstance->Users.GetLocalUsers();
- for (UserManager::LocalList::const_iterator u2 = list.begin(); u2 != list.end(); u2++)
- {
- LocalUser* u = *u2;
- u->exempt = false;
- }
-
ServerInstance->XLines->CheckELines();
}