- /* If the line exists, check if its an expired line */
+ if (line->duration && ServerInstance->Time() > line->expiry)
+ return false; // Don't apply expired XLines.
+
+ /* Don't apply duplicate xlines */
ContainerIter x = lookup_lines.find(line->type);
if (x != lookup_lines.end())
{
LookupIter i = x->second.find(line->Displayable());
if (i != x->second.end())
{
ContainerIter x = lookup_lines.find(line->type);
if (x != lookup_lines.end())
{
LookupIter i = x->second.find(line->Displayable());
if (i != x->second.end())
{
DefaultApply(u, "G", (strcmp(this->identmask, "*") == 0) ? true : false);
}
DefaultApply(u, "G", (strcmp(this->identmask, "*") == 0) ? true : false);
}
/* Force to uuid on apply of qline, no need to disconnect any more :) */
u->ForceNickChange(u->uuid.c_str());
}
/* Force to uuid on apply of qline, no need to disconnect any more :) */
u->ForceNickChange(u->uuid.c_str());
}
- ServerInstance->SNO->WriteToSnoMask('x',"Removing expired E-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,ServerInstance->Time() - this->set_time);
+ ServerInstance->SNO->WriteToSnoMask('x',"Removing expired E-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,(long int)(ServerInstance->Time() - this->set_time));
- ServerInstance->SNO->WriteToSnoMask('x',"Removing expired Q-Line %s (set by %s %ld seconds ago)",this->nick,this->source,ServerInstance->Time() - this->set_time);
+ ServerInstance->SNO->WriteToSnoMask('x',"Removing expired Q-Line %s (set by %s %ld seconds ago)",this->nick,this->source,(long int)(ServerInstance->Time() - this->set_time));
- ServerInstance->SNO->WriteToSnoMask('x',"Removing expired Z-Line %s (set by %s %ld seconds ago)",this->ipaddr,this->source,ServerInstance->Time() - this->set_time);
+ ServerInstance->SNO->WriteToSnoMask('x',"Removing expired Z-Line %s (set by %s %ld seconds ago)",this->ipaddr,this->source,(long int)(ServerInstance->Time() - this->set_time));
- ServerInstance->SNO->WriteToSnoMask('x',"Removing expired K-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,ServerInstance->Time() - this->set_time);
+ ServerInstance->SNO->WriteToSnoMask('x',"Removing expired K-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,(long int)(ServerInstance->Time() - this->set_time));
- ServerInstance->SNO->WriteToSnoMask('x',"Removing expired G-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,ServerInstance->Time() - this->set_time);
+ ServerInstance->SNO->WriteToSnoMask('x',"Removing expired G-Line %s@%s (set by %s %ld seconds ago)",this->identmask,this->hostmask,this->source,(long int)(ServerInstance->Time() - this->set_time));