Changed to using new Address Model, Implemented Setup, Some minor CSS changes
This commit is contained in:
@@ -9,7 +9,7 @@ use Illuminate\Support\Facades\Log;
|
||||
use App\Classes\Protocol as BaseProtocol;
|
||||
use App\Classes\Sock\SocketClient;
|
||||
use App\Classes\Sock\SocketException;
|
||||
use App\Models\Node;
|
||||
use App\Models\Address;
|
||||
use App\Interfaces\CRC as CRCInterface;
|
||||
use App\Interfaces\Zmodem as ZmodemInterface;
|
||||
use App\Traits\CRC as CRCTrait;
|
||||
@@ -80,7 +80,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
{
|
||||
// If our parent returns a PID, we've forked
|
||||
if (! parent::onConnect($client)) {
|
||||
$this->session(self::SESSION_AUTO,$client,(new Node));
|
||||
$this->session(self::SESSION_AUTO,$client,(new Address));
|
||||
$this->client->close();
|
||||
Log::info(sprintf('%s: = End - Connection closed [%s]',__METHOD__,$client->getAddress()));
|
||||
}
|
||||
@@ -183,7 +183,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
// Site address, password and compatibility
|
||||
// @todo Only show the AKAs that is relevant to the node we are connecting to
|
||||
$makedata .= sprintf('{EMSI}{%s}{%s}{%s}{%s}',
|
||||
join(' ',$this->setup->nodes->pluck('ftn')->toArray()),
|
||||
join(' ',$this->setup->system->addresses->pluck('ftn')->toArray()),
|
||||
$this->node->password == '-' ? '' : $this->node->password,
|
||||
join(',',$link_codes),
|
||||
join(',',$compat_codes),
|
||||
@@ -295,7 +295,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
Log::debug(sprintf('%s: - Parsing AKA [%s]',__METHOD__,$rem_aka));
|
||||
|
||||
try {
|
||||
if (! ($o = Node::findFTN($rem_aka))) {
|
||||
if (! ($o = Address::findFTN($rem_aka))) {
|
||||
Log::debug(sprintf('%s: ? AKA is UNKNOWN [%s]',__METHOD__,$rem_aka));
|
||||
continue;
|
||||
}
|
||||
@@ -307,7 +307,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
}
|
||||
|
||||
// Check if the remote has our AKA
|
||||
if ($this->setup->nodes->pluck('ftn')->search($o->ftn) !== FALSE) {
|
||||
if ($this->setup->system->addresses->pluck('ftn')->search($o->ftn) !== FALSE) {
|
||||
Log::error(sprintf('%s: ! AKA is OURS [%s]',__METHOD__,$o->ftn));
|
||||
|
||||
continue;
|
||||
@@ -338,9 +338,9 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
}
|
||||
|
||||
if (! $c) {
|
||||
Log::info(sprintf('%s: - Remote has password [%s] on us',__METHOD__,$p));
|
||||
Log::info(sprintf('%s: - Remote has password [%s] on us, and we expect [%s]',__METHOD__,$p,$this->node->password));
|
||||
|
||||
if ($p)
|
||||
if ($p || $this->node->password)
|
||||
$this->node->optionSet(self::O_BAD);
|
||||
|
||||
} else {
|
||||
@@ -861,7 +861,7 @@ final class EMSI extends BaseProtocol implements CRCInterface,ZmodemInterface
|
||||
if ($gotreq++)
|
||||
return self::OK;
|
||||
|
||||
$this->client->buffer_add(self::EMSI_INQ);
|
||||
$this->client->buffer_add(self::EMSI_INQ.self::CR);
|
||||
$this->client->buffer_flush(5);
|
||||
|
||||
} elseif ($p && strstr($p,self::EMSI_BEG) && strstr($p,self::EMSI_ARGUS1)) {
|
||||
|
Reference in New Issue
Block a user