Implement 2D domain processing - mainly for fidonet
This commit is contained in:
@@ -702,19 +702,31 @@ class Message extends FTNBase
|
||||
$node = (int)$item;
|
||||
}
|
||||
|
||||
$ftn = sprintf('%d:%d/%d',$this->fz,$net&DomainController::NUMBER_MAX,$node&DomainController::NUMBER_MAX);
|
||||
// @todo This should be enhanced to include the address at the time of the message.
|
||||
if ($aos->has($ftn))
|
||||
$ao = $aos->get($ftn);
|
||||
else
|
||||
$aos->put($ftn,($ao=(Address::findFTN($ftn))?->id));
|
||||
// If domain should be flattened, look for node regardless of zone (within the list of zones for the domain)
|
||||
if ($this->fdomain && $this->fdomain->flatten) {
|
||||
$ao = Address::findZone($this->fdomain,$net&DomainController::NUMBER_MAX,$node&DomainController::NUMBER_MAX);
|
||||
|
||||
if (! $ao) {
|
||||
$aoid = $ao?->id;
|
||||
|
||||
if (! $ao)
|
||||
$ftn = sprintf('%d:%d/%d',0,$net&DomainController::NUMBER_MAX,$node&DomainController::NUMBER_MAX);
|
||||
|
||||
} else {
|
||||
$ftn = sprintf('%d:%d/%d',$this->fz,$net&DomainController::NUMBER_MAX,$node&DomainController::NUMBER_MAX);
|
||||
|
||||
// @todo This should be enhanced to include the address at the time of the message.
|
||||
if ($aos->has($ftn))
|
||||
$aoid = $aos->get($ftn);
|
||||
else
|
||||
$aos->put($ftn,($aoid=(Address::findFTN($ftn))?->id));
|
||||
}
|
||||
|
||||
if (! $aoid) {
|
||||
Log::alert(sprintf('%s:! Undefined Node [%s] in %s.',self::LOGKEY,$ftn,$type));
|
||||
$rogue->push($ftn);
|
||||
|
||||
} else {
|
||||
$nodes->push($ao);
|
||||
$nodes->push($aoid);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user