+ // Allow replacing a config line for an updated config line.
+ if (i->second->from_config && line->from_config)
+ {
+ // Nothing changed, skip adding this one.
+ if (i->second->reason == line->reason)
+ return false;
+
+ silent = true;
+ }
+ // Allow replacing a non-config line for a new config line.
+ else if (!line->from_config)
+ {
+ // X-line propagation bug was here, if the line to be added already exists and
+ // it's expired then expire it and add the new one instead of returning false
+ if ((!i->second->duration) || (ServerInstance->Time() < i->second->expiry))
+ return false;
+ }
+ else
+ {
+ silent = true;
+ }
+
+ ExpireLine(x, i, silent);