Understand some gated messages, that are gated from a different zone
This commit is contained in:
@@ -93,7 +93,8 @@ class Message extends FTNBase
|
||||
private string $subject; // Message subject
|
||||
|
||||
private string $msgid; // MSG ID
|
||||
private string $replyid; // Reply ID
|
||||
private string $replyid; // Reply ID
|
||||
private string $gateid; // MSG ID if the message came via gate
|
||||
|
||||
private string $echoarea; // FTS-0004.001
|
||||
private string $intl; // Netmail details
|
||||
@@ -182,6 +183,7 @@ class Message extends FTNBase
|
||||
$this->message = '';
|
||||
|
||||
$this->msgid = '';
|
||||
$this->gateid = '';
|
||||
$this->replyid = '';
|
||||
|
||||
$this->echoarea = '';
|
||||
@@ -373,6 +375,7 @@ class Message extends FTNBase
|
||||
|
||||
case 'msgid':
|
||||
case 'replyid':
|
||||
case 'gateid':
|
||||
|
||||
case 'message':
|
||||
case 'message_src':
|
||||
@@ -411,6 +414,7 @@ class Message extends FTNBase
|
||||
case 'user_to':
|
||||
case 'subject':
|
||||
|
||||
case 'gateid':
|
||||
case 'msgid':
|
||||
case 'replyid':
|
||||
|
||||
@@ -491,6 +495,9 @@ class Message extends FTNBase
|
||||
if ($this->replyid)
|
||||
$return .= sprintf("\01REPLY: %s\r",$this->replyid);
|
||||
|
||||
if ($this->gateid)
|
||||
$return .= sprintf("\01GATE: %s\r",$this->gateid);
|
||||
|
||||
foreach ($this->_kludge as $k=>$v) {
|
||||
if ($x=$this->kludge->get($k))
|
||||
$return .= sprintf("\01%s%s\r",$v,$x);
|
||||
@@ -803,6 +810,9 @@ class Message extends FTNBase
|
||||
elseif ($t = $this->kludge('MSGID: ',$kl))
|
||||
$this->msgid = $t;
|
||||
|
||||
elseif ($t = $this->kludge('GATE: ',$kl))
|
||||
$this->gateid = $t;
|
||||
|
||||
elseif ($t = $this->kludge('PATH: ',$kl))
|
||||
$this->path->push($t);
|
||||
|
||||
@@ -827,9 +837,10 @@ class Message extends FTNBase
|
||||
|
||||
// Work out our zone/point
|
||||
// http://ftsc.org/docs/fsc-0068.001
|
||||
// MSGID should be the basis of the source, we'll overrite our src from origin if we have it
|
||||
// MSGID should be the basis of the source, we'll overwrite our src from origin if we have it
|
||||
// If the message was gated, we'll use the gateid
|
||||
$m = [];
|
||||
if ($this->msgid && preg_match('#([0-9]+:[0-9]+/[0-9]+)?\.?([0-9]+)?(\.[0-9]+)?@?([A-Za-z-_~]+)?\ +#',$this->msgid,$m)) {
|
||||
if (($this->msgid || $this->gateid) && preg_match('#([0-9]+:[0-9]+/[0-9]+)?\.?([0-9]+)?(\.[0-9]+)?@?([A-Za-z-_~]+)?\ +#',$this->gateid ?: $this->msgid,$m)) {
|
||||
try {
|
||||
$this->src = Address::parseFTN($m[1].((isset($m[2]) && $m[2] != '') ? '.'.$m[2] : '').(isset($m[4]) ? '@'.$m[4] : ''));
|
||||
} catch (\Exception $e) {
|
||||
|
Reference in New Issue
Block a user