Xpacket/XPREM.PAS

1771 lines
57 KiB
Plaintext
Raw Permalink Normal View History

2019-05-15 00:31:19 +02:00
{<7B><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ŀ
<20> <20>
<20> X - P a c k e t <20>
<20> <20>
<20> <20>
<20> X P R E M . P A S <20>
<20> <20>
<20> Routinen f<>r die Remotesteuerung (//Befehle) <20>
<20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>}
{remote1: 1-27; remote2: 28-50; remote3: 51-..}
Procedure Remote1 (Kanal : Byte; Art : Integer; CZeile : Str80);
Var i,i1,i2,
ix : Integer;
dB,Tn,C,
Anz : Byte;
Bstr,
Dummy : String;
P : String[4];
Komm : String[80];
Path : String[80];
Rufz : String[6];
RufzStr : String[9];
Hstr : String[9];
eigenc,
CBFrei,
Flag : Boolean;
Parm : Array[1..3] of String[60];
L_I : Longint;
Begin
with K[Kanal]^ do
begin
killstartblanks(CZeile);
killendblanks(Czeile);
Komm := UpCaseStr(CZeile);
for i := 1 to 3 do Parm[i] := '';
Dummy := ParmStr(1,B1,Komm);
Anz := Byte(ParmAnz - 1);
i1 := Anz;
if Anz > 3 then i1 := 3;
for i := 1 to i1 do Parm[i] := ParmStr(i,B1,RestStr(Komm));
Rufz := Call;
strip(Rufz);
if (node) and (not RemAll) and ((art in NodeCmds)=false) and
(art>0) and (art<100) then art:=111;
case Art of
1: if Anz = 0 then ParmWrong := true else {* CONNECT *}
Begin
if not Test then
begin
CBFrei:=true;
if not (TNC[tncnummer]^.AfuPort) and (Konfig.CBFilter)then
begin
hstr:=RestStr(komm);
for i:=1 to Anz do
begin
if (length(Parm[i])=1) and ((Parm[i][1] in ['0','1','2','3','4','5','6','7','8','9'])) then
CBFrei:=CBFrei
else if not CBCallCheck(Parm[i]) then CBFrei:=FALSE;
end;
end;
if CBFrei then
begin
FreiKanal := 0;
FreiKanalSuch(Kanal,RestStr(Komm));
Case FreiKanal of
0 : S_PAC(Kanal,NU,false,M1 + Star + InfoZeile(123) + M1);
253 : S_PAC(Kanal,NU,false,M1 + Star + InfoZeile(426) + M1);
254 : S_PAC(Kanal,NU,false,M1 + Star + InfoZeile(282) + M1);
FF : S_PAC(Kanal,NU,false,M1 + Star + InfoZeile(124) + M1);
else if FreiKanal in [1..maxLink] then
begin
eigenc:=false;
for i:=1 to maxlink do
begin
rufz :=UpcaseStr(K[i]^.OwnCall);
Strip(rufz);
rufzstr:=UpcaseStr(Parm[1]);
if length(rufzstr)=1 then rufzstr:=upcasestr(parm[2]);
Strip(rufzstr);
if rufz=rufzstr then EigenC:=true;
end;
if not eigenc then
begin
GegenKanal := FreiKanal;
NeuCall := RestStr(Komm);
RemoteCall := Call;
EinstiegsKanal := true;
NochNichtGelesen := false;
Remote_Connect_Aufbauen(Kanal,NeuCall);
K[GegenKanal]^.GegenKanal := Kanal;
K[GegenKanal]^.AusstiegsKanal := true;
K[GegenKanal]^.NochNichtGelesen := false;
K[GegenKanal]^.Ziel_Call := Parm[1];
SetzeFlags(Kanal);
end else s_pac(kanal, NU, true, M1+'LOOP DETECTED!!'+M1);{eigenc}
end;
end;
if not (Freikanal in [1..maxLink]) then Send_Prompt(Kanal,FF);
end else
begin
S_PAC(Kanal,NU,false,M1 + InfoZeile(441) + M1); {CBFRei}
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,M1 + InfoZeile(181) + M1);
Send_Prompt(Kanal,FF);
end;
End;
2: Begin (* Cstatus *)
Bstr := EFillStr(61,B1,B1 + InfoZeile(125)) + ZeitArt;
Bstr := M1 + Bstr + M1 + ConstStr('-',length(Bstr)) + M1;
S_PAC(Kanal,NU,false,Bstr);
for ix := 1 to maxLink do
if (K[ix]^.connected) and
((TNC[K[ix]^.tncnummer]^.AfuPort)=(TNC[K[kanal]^.tncnummer]^.AfuPort))then
begin
Bstr := SFillStr(3,B1,int_str(ix)) + B1;
if (ix = show) then Bstr[1] := RSK;
Bstr := Bstr + EFillStr(11,B1,K[ix]^.OwnCall)
+ EFillStr(4,B1,int_str(K[ix]^.TncNummer))
+ EFillStr(10,B1,K[ix]^.Call)
+ EFillStr(30,B1,K[ix]^.User_Name)
+ K[ix]^.QSO_Begin + M1;
S_PAC(Kanal,NU,false,Bstr);
end;
S_PAC(Kanal,NU,false,M1);
end;
3: Begin (* Directory *);
Bstr := '';
if pos('/',Parm[1]) > 0 then
begin
Dummy := '';
Bstr := Parm[1];
end else Dummy := Parm[1];
Dummy := MakePathName(Kanal,Flag,Dummy);
if Flag then RemoteDir(Kanal,Dummy + B1 + Bstr + B1 + Parm[2] + B1 + Parm[3])
else S_PAC(Kanal,NU,false,InfoZeile(240) + B1 + Dummy + M1);
End;
4: Begin (* Name *)
if Anz > 0 then
begin {UCALL}
Neu_Name(Kanal,1,Call,RestStr(CZeile));
S_PAC(Kanal,NU,true,DZeile + M1);
User_Name := RestStr(CZeile);
UserInStatus(Kanal);
end else ParmWrong := true;
End;
5: Begin (* Info *)
{if einstiegskanal then s_pac(kanal, nu, true, m1+'EINSTIEGSKANAL'+m1);
if ausstiegskanal then s_pac(kanal, nu, true, m1+'ausSTIEGSKANAL'+m1);}
TXT_Senden(Kanal,1,0);
End;
6: RemoteLnk(Kanal,T,Parm[1]); (* Links *)
7: Begin (* Mheard *)
RemoteMH(Kanal,T,Parm[1] + B1+ Parm[2] + B1+ Parm[3]);
End;
8: Begin (* Show *)
case Anz of
0 : ParmWrong := true;
1 : begin
WishBuf := true;
{S_PAC(Kanal,NU,false,M1 + InfoZeile(5) + M1 + ConstStr('-',29) + M1);}
{Bstr := GetName(Kanal,Parm[1],db,False);}
if not UserShow(Kanal,Parm[1]) then S_PAC(Kanal,NU,false,EFillStr(9,B1,Parm[1])+': '+ InfoZeile(137) + M1);
end;
end;
End;
9: Begin (* Convers *);
Case Anz of
0 : begin
ConversUser(Kanal);
S_PAC(Kanal,NU,false,InfoZeile(267) + M1);
Send_Prompt(Kanal,FF);
end;
1 : begin
i := Byte(str_int(Parm[1]));
if i in ConvMenge then
begin
Conv.Chan := i;
if ConversIni(Kanal,true) then
begin
S_PAC(Kanal,NU,true,Star + InfoZeile(246) + M1);
ConversUser(Kanal);
ConversTX(Kanal,true,true,Plus + InfoZeile(245) + M1);
end else
begin
Conv.Chan:=0;
Conv.AfuStatus:=0;
S_PAC(kanal, NU, TRUE, Conv.Fehler+m1);
end;
end else ParmWrong := true;
end;
end;
End;
10: Quit(Kanal); (* Quit *)
11,
12,
13:
Begin (* R + RBIN + RPRG *)
case Anz of
0 : ParmWrong := true;
1,2,3 : begin
Path := MakePathName(Kanal,Flag,Parm[1]);
if Flag then
begin
Assign(TxFile,Path);
if ResetBin(TxFile,T) = 0 then
Begin
RemFlag := false;
TX_Bin := Art - 11;
TX_Laenge := FileSize(TxFile);
if (Anz in [2,3]) then FileSendVon(Kanal,RestStr(RestStr(Komm)));
TX_Count := 0;
TX_CRC := 0;
FileSend := true;
FileSendRem := true;
TX_Time := Uhrzeit;
SetzeFlags(Kanal);
if TX_Bin = 2 then S_PAC(Kanal,NU,true,MakeBinStr(Kanal,Path));
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(144) + B1 + Path + M1);
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(240) + B1 + Path + M1);
Send_Prompt(Kanal,FF);
end;
end;
end;
End;
14: If not Rx_Save then (* WRITE *)
Begin
if Anz = 1 then
begin
if SaveNameCheck(0,Parm[1]) then
begin
Path := RemPath + Parm[1];
if PfadOk(1,RemPath) then
begin
if not Exists(Path) then
begin
FRxName := Path;
Assign(RXFile,FRxName);
if RewriteBin(RXFile,1) = 0 then
begin
RX_Count := 0;
RX_TextZn := 0;
RX_Laenge := 0;
RX_Bin := 1;
RX_Time := Uhrzeit;
Rx_Save := true;
RemoteSave := true;
S_PAC(Kanal,NU,true,Parm[1] + B1 + InfoZeile(145) + M1);
end else Send_Prompt(Kanal,FF);
end else
begin
S_PAC(Kanal,NU,false,Parm[1] + B1 + InfoZeile(149) + M1);
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(75) + DP + B2 + Path + M2);
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(147) + B1 + Parm[1] + M1 + InfoZeile(152) + M1);
Send_Prompt(Kanal,FF);
end;
end else ParmWrong := true;
End else
Begin
S_PAC(Kanal,NU,false,InfoZeile(43) + M1);
Send_Prompt(Kanal,FF);
End;
15: If not Rx_Save then (* WBIN *)
Begin
if Anz = 1 then
begin
if SaveNameCheck(0,Parm[1]) then
begin
Path := RemPath + Parm[1];
if PfadOk(1,RemPath) then
begin
if not Exists(Path) then
begin
FRxName := Path;
Assign(RXFile,FRxName);
if RewriteBin(RXFile,1) = 0 then
begin
RX_Save := true;
RX_Bin := 2;
RX_Count := 0;
RX_CRC := 0;
RX_Time := Uhrzeit;
RemoteSave := true;
Ignore := true;
SetzeFlags(Kanal);
Dummy := Parm[1] + B1 + InfoZeile(150) + B1 + InfoZeile(283) + M1;
S_PAC(Kanal,NU,true,Dummy);
end else Send_Prompt(Kanal,FF);
end else
begin
S_PAC(Kanal,NU,false,Parm[1] + B1 + InfoZeile(149) + M1);
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(75) + DP + B2 + Path + M2);
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(147) + B1 + Parm[1] + M1 + InfoZeile(152) + M1);
Send_Prompt(Kanal,FF);
end;
end else ParmWrong := true;
End else
Begin
S_PAC(Kanal,NU,false,InfoZeile(43) + M1);
Send_Prompt(Kanal,FF);
End;
16, (* WPRG *)
17: (* WAUTO *)
If not Rx_Save then
Begin
if Anz = 1 then
begin
if SaveNameCheck(0,Parm[1]) then
begin
Path := RemPath + Parm[1];
if PfadOk(1,RemPath) then
begin
if not Exists(Path) then
begin (* alles klar, File ist nicht da *)
AutoBinOn := true;
RX_Bin := 4;
FRxName := Path;
SetzeFlags(Kanal);
Dummy := Parm[1] + B1 + InfoZeile(150) + M1;
S_PAC(Kanal,NU,true,Dummy);
end else
begin
S_PAC(Kanal,NU,false,Parm[1] + B1 + InfoZeile(149) + M1);
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(75) + DP + B2 + Path + M2);
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(147) + B1 + Parm[1] + M1 + InfoZeile(152) + M1);
Send_Prompt(Kanal,FF);
end;
end else ParmWrong := true;
End else
Begin
S_PAC(Kanal,NU,false,InfoZeile(43) + M1);
Send_Prompt(Kanal,FF);
End;
18: Begin (* TNC *)
i2 := Anz;
case i2 of
0 : TNC_Parm(Kanal,1);
1,2 : begin
P := Parm[1];
Bstr := '';
TNC_Auswert(Kanal,P,Bstr);
if P > '' then
begin
Ausgabe := false;
if i2 = 2 then S_PAC(Kanal,CM,true,P + Parm[2]);
Ausgabe := false;
S_PAC(Kanal,CM,true,P);
S_PAC(Kanal,NU,false,LRK + P + RRK + B1 + Bstr + DP + B1 + Response + M1);
end else ParmWrong := true;
end;
end;
End;
19: Begin (* MYCALL *)
Case Anz of
0 : S_PAC(Kanal,NU,false,CutStr(InfoZeile(225)) + DP + B1 + OwnCall + M1);
1 : begin
i := str_int(Parm[1]);
if i > 0 then
begin
if i in [1..maxLink]
then S_PAC(Kanal,NU,false,InfoZeile(225) + B1 + int_str(i) + DP + B1 + K[i]^.OwnCall + M1)
else ParmWrong := true;
end else
begin
OwnCall := Parm[1];
S_PAC(Kanal,NU,false,InfoZeile(276) + B1 + Parm[1] + M1);
end;
end;
2 : begin
i := str_int(Parm[1]);
if i in [1..maxLink] then
begin
K[i]^.OwnCall := Parm[2];
Rufz_TNC_init(i);
S_PAC(Kanal,NU,false,'MYCALL - Port '+ int_str(i) + DP + B1 + K[i]^.OwnCall + M1);
end else ParmWrong := true;
end;
end;
End;
20: Begin (* Paclen *)
ix := Byte(str_int(RestStr(Komm)));
if ix in [1..FF] then Paclen := ix;
S_PAC(Kanal,NU,false,'PacLen = ' + int_str(PacLen) + M1);
End;
21: If Anz = 1 then (* CDROM *)
Begin
if Rom_Exists and Rom_Ready then
begin
if (Parm[1] = ON) then
begin
if not use_RomLw then RemPath := RomDisk;
use_RomLw := true;
S_PAC(Kanal,NU,false,InfoZeile(321) + B1 + RemPath + M1);
end;
if (Parm[1] = OFF) then
begin
if use_RomLw then RemPath := G^.Drive;
use_RomLw := false;
S_PAC(Kanal,NU,false,InfoZeile(322) + B1 + RemPath + M1);
end;
end else S_PAC(Kanal,NU,false,InfoZeile(323) + M1);
End else ParmWrong := true;
22: Begin (* CD *)
Bstr := Parm[1];
Ch_Dir(Kanal,Bstr);
S_PAC(Kanal,NU,false,Bstr + M1);
End;
23: Begin (* Umlaut *)
if (Anz = 0) or
((Anz = 1) and (Byte(str_int('$'+Parm[1])) in UmlMenge)) then
begin
i := Byte(str_int('$'+Parm[1]));
if (Anz = 1) and (i in UmlMenge) then Umlaut := i;
SetzeFlags(Kanal);
case Umlaut of
0 : Bstr := InfoZeile(210);
1 : Bstr := InfoZeile(211);
2 : Bstr := InfoZeile(212);
3 : Bstr := InfoZeile(213);
end;
Bstr := M1 + Bstr + M1;
S_PAC(Kanal,NU,false,Bstr);
end else ParmWrong := true;
End;
24: Begin (* RC *)
RC_update(Kanal, Komm);
if Komm <> S_ch then S_PAC(Kanal,NU,false,Komm + M1)
else RC_Alle(Kanal,1);
End;
25: Begin (* RAUTO *)
if (Anz > 0) then
begin
RemFlag := false;
Dummy := RestStr(Komm);
GetMem(Dir,SizeOf(Dir^));
While Dummy > '' do
begin
Path := MakePathName(Kanal,Flag,CutStr(Dummy));
if Flag then
begin
GetDirFiles(Path,AnyFile - Directory,1);
if DirFiles > 0 then
begin
Bstr := Path;
While (length(Bstr) > 0) and (Bstr[length(Bstr)] <> BS)
do delete(Bstr,length(Bstr),1);
for i := 1 to DirFiles do
begin
Path := Bstr + Dir^[i].Name;
While pos('..',Path) > 0 do delete(Path,pos('..',Path),1);
BIN_TX_File_Sofort(Kanal,Path);
end;
end else S_PAC(Kanal,NU,false,InfoZeile(144) + B1 + Path + M1);
end else S_PAC(Kanal,NU,false,InfoZeile(240) + B1 + Path + M1);
Dummy := RestStr(Dummy);
end;
FreeMem(Dir,SizeOf(Dir^));
end else ParmWrong := true;
End;
26: Begin
S_PAC(Kanal,NU,true,'');
if TxComp then S_PAC(Kanal,NU,true,M1 + Meldung[22] + M1);
if node then S_PAC(Kanal,NU,true,'73!'+#13);
S_PAC(Kanal,CM,true,'D'); (* Disc ohne Verabschiedungstext *)
End;
27: if Anz > 0 then (* DELETE File loeschen *)
Begin
Path := MakePathName(Kanal,Flag,Parm[1]);
if Flag then
begin
if Exists(Path) then
begin
Dummy := Path;
Delete_Datei(Dummy);
S_PAC(Kanal,NU,false,M1 + Dummy + M1);
end else S_PAC(Kanal,NU,false,M1 + InfoZeile(162) + DP + B1 + Parm[1] + M1);
end else S_PAC(Kanal,NU,false,InfoZeile(240) + B1 + Path + M1);
End else ParmWrong := true;
254: notRC := true;
FF: ParmWrong := true;
else
unknown := true;
end;
if (not ParmWrong) and (not notRC) and (not unknown) then Send_Prompt(Kanal,Art);
if Node then begin
for i:=1 to MaxAutoSys do
begin
if Pos(UpcaseStr(AutoSysKenner[i]), UpcaseStr(CZeile))>0 then unknown:=false;
end;
if (node) then
begin
if czeile='' then
begin
unknown:=false;
ParmWrong:=false;
end;
if Art=111 then
begin
S_PAC(Kanal,NU,false,InfoZeile(21) + M1);
Send_Prompt(Kanal,FF);
unknown:=false;
parmwrong:=false;
end;
if Mail_SP then unknown:=false;
if not RX_Save then Mail_sp:=false;
end;
end;
end;
End;
{**********remote2 28-50 ***********************}
Procedure Remote2 (Kanal : Byte; Art : Integer; CZeile : Str80);
Var i,i1,i2,
ix : Integer;
dB,Tn,C,
Anz : Byte;
Bstr,
Dummy : String;
P : String[4];
Komm : String[80];
Path : String[80];
Rufz : String[6];
srec : SearchRec;
flagq,
Flag : Boolean;
Parm : Array[1..3] of String[60];
Begin
with K[Kanal]^ do
begin
killstartblanks(CZeile);
killendblanks(Czeile);
Komm := UpCaseStr(CZeile);
for i := 1 to 3 do Parm[i] := '';
Dummy := ParmStr(1,B1,Komm);
Anz := Byte(ParmAnz - 1);
i1 := Anz;
if Anz > 3 then i1 := 3;
for i := 1 to i1 do Parm[i] := ParmStr(i,B1,RestStr(Komm));
Rufz := Call;
strip(Rufz);
if (node) and (not RemAll) and ((art in NodeCmds)=false) and
(art>0) and (art<100) then art:=111;
case Art of
28,
29,
30: Begin
case Art of
28 : P := 'O';
29 : P := 'N';
30 : P := 'T';
end;
Bstr := '';
TNC_Auswert(Kanal,P,Bstr);
if P > '' then
begin
Ausgabe := false;
if Anz > 0 then S_PAC(Kanal,CM,true,P + Parm[1]);
Ausgabe := false;
S_PAC(Kanal,CM,true,P);
S_PAC(Kanal,NU,false,LRK + P + RRK + B1 + Bstr + DP + B1 + Response + M1);
end else ParmWrong := true;
End;
31,32: begin
flagq:=quiet;
if ((VIP_) and (VIPG)) then quiet:=false;
KLingel:=not quiet;
if quiet then S_PAC(Kanal,NU,false,InfoZeile(60) + M1);
if not quiet then
begin
if (Klingel) then (* Ring * / * Bell *)
begin
if (BellCount=3) then S_Pac(Kanal, NU, False, InfoZeile(439) +m1)
else
begin
inc(BellCount);
Bimmel(kanal);
quiet:=flagq;
Klingel:=not quiet;
{Triller;}
S_PAC(Kanal,NU,false,InfoZeile(59) + M1);
end;
End else S_PAC(Kanal,NU,false,InfoZeile(60) + M1);
end; {quiet}
end;
33: S_PAC(Kanal,NU,false,M1 + Pfeil + Version (* VERSION *)
+M1 +
Pfeil + InfoZeile(109) + B2 +
lastEdit + M2);
34, (* RMAIL *)
35, (* KMAIL *)
36, (* LMAIL *)
37: (* SMAIL *)
If TopBox then
Begin
Flag := false;
Case Art of
34: begin (* RMAIL *)
if Anz >= 1 then Dummy := Parm[1] else Dummy := Rufz;
Strip(Dummy);
Dummy := Konfig.MailVerz + Dummy + MsgExt;
if Exists(Dummy) then SF_Text(Kanal,Dummy)
else Flag := true;
end;
35: begin (* KMAIL *)
if Anz >= 1 then Dummy := Parm[1] else Dummy := Rufz;
Strip(Dummy);
Dummy := Konfig.MailVerz + Dummy + MsgExt;
if Exists(Dummy) then
begin
KillFile(Dummy);
S_PAC(Kanal,NU,false,M1 + InfoZeile(134) +M2);
Eig_Mail_Zeile := '';
Check_Eig_Mail(1,maxLink);
SetzeFlags(show);
end else Flag := true;
end;
36: begin (* LMAIL *)
Dummy := '';
if Anz < 1 then
begin
FindFirst(Konfig.Mailverz + S_ch + MsgExt,Archive,srec);
if DosError = 0 then
begin
Dummy := InfoZeile(265);
Dummy := M1 + Dummy + M1 + ConstStr('-',length(Dummy));
S_PAC(Kanal,NU,false,Dummy + M1);
Dummy := '';
end else Flag := true;
While DosError = 0 do
begin
if (length(Dummy) + 7) >= 79 then
begin
S_PAC(Kanal,NU,false,Dummy + M1);
Dummy := '';
end;
Dummy := Dummy + EFillStr(7,B1,copy(srec.Name,1,pos(Pkt,srec.Name)-1));
FindNext(srec);
end;
if Dummy <> '' then S_PAC(Kanal,NU,false,Dummy + M1);
end else
begin
Dummy := Parm[1];
Strip(Dummy);
Dummy := Konfig.Mailverz + Dummy + MsgExt;
if Exists(Dummy) then S_PAC(Kanal,NU,false,M1 + InfoZeile(266) +
B1 + Parm[1] + M1)
else Flag := true;
end;
end;
37: if not RX_Save then
begin
if Anz = 1 then
begin
if SaveNameCheck(0,Parm[1]) then
begin
i := pos(Pkt,Parm[1]);
if i > 0 then Parm[1] := copy(Parm[1],1,i-1);
strip(Parm[1]);
Path := Konfig.Mailverz + Parm[1] + MsgExt;
for i := 1 to maxLink do
begin
Dummy := K[i]^.OwnCall;
Strip(Dummy);
if Parm[1] = Dummy then MsgToMe := true;
end;
FRxName := Path;
if OpenTextFile(Kanal) then
begin
RX_Count := 0;
RX_TextZn := 0;
RX_Laenge := 0;
RX_Bin := 1;
RX_Time := Uhrzeit;
RX_Save := true;
if node then Mail_sp:=true;
RemoteSave := true;
Dummy := M1 + InfoZeile(105) + B1+ EFillStr(10,B1,Call) +
Datum + B2 + copy(Uhrzeit,1,5) + B1 + ZeitArt + M1;
Dummy := Dummy + ConstStr('-',length(Dummy)) + M1;
Write_RxFile(Kanal,Dummy);
S_PAC(Kanal,NU,true,Parm[1] + B1 + InfoZeile(145) + M1);
end else Send_Prompt(Kanal,FF);
SetzeFlags(Kanal);
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(147) + B1 + Parm[1] + M1 + InfoZeile(148) + M1);
Send_Prompt(Kanal,FF);
end;
end else ParmWrong := true;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(43) + M1);
Send_Prompt(Kanal,FF);
end;
end;
if Flag then S_PAC(Kanal,NU,false,M1 + InfoZeile(133) + M2);
End else S_PAC(Kanal,NU,false,InfoZeile(252) + M2);
38: If Anz = 2 then (* Rename *)
Begin
i := 0;
File_Umbenennen(RemPath + Parm[1],RemPath + Parm[2],i,i2);
if i2 = 3 then Dummy := Parm[1] + B1 + 'in' + B1 + Parm[2] else Dummy := Parm[i2];
S_PAC(Kanal,NU,false,M1 + InfoZeile(i) + B1 + Dummy +M2);
End else ParmWrong := true;
39: S_PAC(Kanal,NU,false,M1 + InfoZeile(279) + B1 + Datum + B2 + (* DATE *)
Uhrzeit + B1 + ZeitArt + M2);
40: if Anz >= 2 then (* Copy *)
Begin
Dummy := Parm[1] + B1 + Parm[2] + B1 + RemPath;
FileKopieren(Dummy);
S_PAC(Kanal,NU,false,M1 + Dummy + M2);
End else ParmWrong := true;
41: If Anz > 0 then (* CRC *)
Begin
Path := MakePathName(Kanal,Flag,Parm[1]);
if Flag then
begin
if Exists(Path) then
begin
Dummy := Path + B1 + RestStr(RestStr(Komm));
KillEndBlanks(Dummy);
CRC_Datei(Dummy);
S_PAC(Kanal,NU,true,M1 + Dummy + M2);
end else S_PAC(Kanal,NU,true,M1 + InfoZeile(162) + DP + B1 + Parm[1] + M2);
end else S_PAC(Kanal,NU,true,InfoZeile(240) + B1 + Path + M1);
End else ParmWrong := true;
42: Begin (* Priv-Befehl empfangen und vorbereiten *)
Randomize;
Dummy := '';
Priv_Errechnet := '';
i := 0;
While i < 5 do
begin
i1 := random(61);
if (i1 in [1..60]) and (pos(int_str(i1) + B1,Dummy) = 0) then
begin
Dummy := Dummy + int_str(i1) + B1;
Priv_Errechnet := Priv_Errechnet + Priv_PassWord[i1];
inc(i);
end;
end;
KillEndBlanks(Dummy);
S_PAC(Kanal,NU,true,OwnCall + '> ' + Dummy + M1);
Priv_Modus := true;
End;
43: If Anz = 1 then (* MD *)
Begin
Mk_Dir(Kanal,Komm);
S_PAC(Kanal,NU,false,Komm + M2);
End else ParmWrong := true;
44: If Anz = 1 then (* RD *)
Begin
Rm_Dir(Kanal,Komm);
S_PAC(Kanal,NU,false,Komm + M2);
End else ParmWrong := true;
45: Begin (* DRIVE *)
Komm := RestStr(Komm);
if Anz = 0 then S_PAC(Kanal,NU,false,InfoZeile(201) + B1 +
copy(RemPath,1,2) + M1) else
if length(Komm) = 2 then
begin
if PfadOk(0,Komm) then
begin
if pos(DP,Komm) = 0 then Komm := Komm + DP;
RemPath := Komm + BS;
S_PAC(Kanal,NU,false,InfoZeile(202) + B1 + Komm + M1);
end else S_PAC(Kanal,NU,false,InfoZeile(203) + B1 + Komm + M1);
end else ParmWrong := true;
End;
46: If Anz > 0 then (* DOS *)
Begin
Komm := RestStr(Komm);
Dummy := Komm + B1 + RSK + B1 + Konfig.TempVerz + DosBild;
S_PAC(Kanal,NU,true,InfoZeile(53) + M2);
GetDir(0,Bstr);
ChDir(copy(RemPath,1,length(RemPath)-1));
DosAufruf(Dummy,2);
ChDir(BS);
ChDir(Bstr);
if Dummy = OK then
begin
if Exists(Konfig.TempVerz + DosBild) then
begin
SF_Text(Kanal,Konfig.TempVerz + DosBild);
KillFile(Konfig.TempVerz + DosBild);
end;
end else S_PAC(Kanal,NU,false,InfoZeile(166) + B1 + Komm + M2);
End else ParmWrong := true;
47: Begin (* Help *)
case Anz of
0 : begin
WishBuf := true;
REM_HelpLong(Kanal,G^.OHelp[16]);
end;
1 : begin
if RemAll then i1 := 2
else i1 := 1;
ix := REM_Auswert(Kanal,i1,Parm[1]);
case ix of
1..98
: begin
if (not node) or ((node) and (ix in nodecmds)) or ((node) and (Remall)) then
begin
WishBuf := true;
S_PAC(Kanal,NU,false,M2);
REM_Help(Kanal,ix);
end
else S_PAC(Kanal,NU,false,InfoZeile(207) + parm[1] +M2);
end;
99
: S_PAC(Kanal,NU,false,M1 + InfoZeile(214) + Parm[1] + M2);
254
: S_PAC(Kanal,NU,false,M1 + InfoZeile(207) + Parm[1] + M2);
else begin
if Exists(Konfig.RunVerz + Parm[1] + DocExt)
then SF_Text(Kanal,Konfig.RunVerz + Parm[1] + DocExt)
else S_PAC(Kanal,NU,false,M1 + InfoZeile(206) + Parm[1] +M2);
end;
end;
end;
end;
End;
48: begin { PORTS }
S_PAC(Kanal,NU, false, m1+infoZeile(20)+M2);
for i:=1 to 8 do
if TNC_used[i] then S_Pac(Kanal, NU, false, ' '+int_Str(i)+': '+Konfig.TNC[i].PortNam+M1);
{Send_Prompt(Kanal,FF);}
end;
49: If Anz = 0 then ParmWrong := true (* ECHO *)
else S_PAC(Kanal,NU,true,RestStr(CZeile) + M1);
50,62: If Kanal > 0 then (* LAUFZEIT / RTT *)
Begin
RTF := true;
S_PAC(Kanal,NU,true,M1 + InfoZeile(222) + B1 + Meldung[25] + Uhrzeit + M1);
End;
254: notRC := true;
FF: ParmWrong := true;
else
unknown := true;
end;
if (not ParmWrong) and (not notRC) and (not unknown) then Send_Prompt(Kanal,Art);
if Node then begin
for i:=1 to MaxAutoSys do
begin
if Pos(UpcaseStr(AutoSysKenner[i]), UpcaseStr(CZeile))>0 then unknown:=false;
end;
if (node) then
begin
if czeile='' then
begin
unknown:=false;
ParmWrong:=false;
end;
if Art=111 then
begin
S_PAC(Kanal,NU,false,InfoZeile(21) + M1);
Send_Prompt(Kanal,FF);
unknown:=false;
parmwrong:=false;
end;
if Mail_SP then unknown:=false;
if not RX_Save then Mail_sp:=false;
end;
end;
end;
End;
{*********** Remotes3 *************}
Procedure Remote3 (Kanal : Byte; Art : Integer; CZeile : Str80);
Var i,i1,i2,
ix : Integer;
dB,Tn,C,
Anz : Byte;
Bstr,
Dummy : String;
P : String[4];
Komm : String[80];
Path : String[80];
Rufz : String[6];
Hstr : String[9];
flagq,
Flag : Boolean;
Parm : Array[1..3] of String[60];
Udb : User_typ2;
L_I : Longint;
ENTFG,
RICHTG : REAL;
STATUS : Boolean;
OESLAE,NOEBRE:real;
Begin
with K[Kanal]^ do
begin
killstartblanks(CZeile);
killendblanks(Czeile);
Komm := UpCaseStr(CZeile);
for i := 1 to 3 do Parm[i] := '';
Dummy := ParmStr(1,B1,Komm);
Anz := Byte(ParmAnz - 1);
i1 := Anz;
if Anz > 3 then i1 := 3;
for i := 1 to i1 do Parm[i] := ParmStr(i,B1,RestStr(Komm));
Rufz := Call;
strip(Rufz);
if (node) and (not RemAll) and ((art in NodeCmds)=false) and
(art>0) and (art<100) then art:=111;
case Art of
51: TXT_Senden(Kanal,2,0); (* Aktuell *)
52: If Anz = 0 then
Begin
WishBuf := true;
S_PAC(Kanal,NU,false,M1);
Send_Hilfe(Kanal,G^.OHelp[30]);
S_PAC(Kanal,NU,true,'');
End else ParmWrong := true;
53: begin {* LOCator}
if Anz > 0 then
begin
FillChar(udb,SizeOf(udb),0);
Udb.Locator:=RestStr(upcaseStr(CZeile));
User_loc:=udb.locator;
{UCALL}
udb.Call:=call;
userinstatus(kanal);
PutUser(Udb,c,2,L_I,false);
case c of
0: s_pac(Kanal, NU, true, ParmStr(5,B1,infozeile(195))+': '+udb.LOCator+' -> '+InfoZeile(10)+m1);
1: s_pac(Kanal, NU, true, ParmStr(5,B1,infozeile(195))+': '+udb.LOCator+' -> '+InfoZeile(11)+m1);
10:s_pac(Kanal, NU, true, InfoZeile(370)+m2);
end;
end else ParmWrong := true;
end;
54: begin {* QTH}
if Anz > 0 then
begin
FillChar(udb,SizeOf(udb),0);
Udb.QTH:=RestStr(CZeile);
User_QTH:=udb.qth;
{UCALL}
udb.Call:=call;
UserInStatus(kanal);
PutUser(Udb,c,3,L_I,false);
case c of
0: s_pac(Kanal, NU, true, ParmStr(4,B1,infozeile(195))+': '+udb.QTH+' -> '+InfoZeile(10)+m1);
1: s_pac(Kanal, NU, true, ParmStr(4,B1,infozeile(195))+': '+udb.QTH+' -> '+InfoZeile(11)+m1);
10:s_pac(Kanal, NU, true, InfoZeile(370)+m2);
end;
end else ParmWrong := true;
end;
55: begin {* PErsonal}
flagq:=false;
flagq:=CheckXP161 (kanal);
if Konfig.persname<>'' then
begin
if flagq then
s_pac(Kanal, NU, False, Meldung[32]+' '+Konfig.PersName+m1)
else s_pac(Kanal, NU, False, '//N '+Konfig.PersName+m1);
end;
if Konfig.PersLoc <>'' then
begin
if flagq then s_pac(Kanal, NU, False, Meldung[31]+' '+Konfig.PersLoc+m1)
else s_pac(Kanal, NU, False, '//LOC '+Konfig.PersLoc+m1);
end;
if Konfig.PersQTH <>'' then
begin
if flagq then s_pac(Kanal, NU, false, Meldung[33]+' '+Konfig.PersQTH+m1)
else s_pac(Kanal, NU, false, '//QTH '+Konfig.PersQTH+m1);
end;
if (Konfig.persname<>'') or (Konfig.PersLoc <>'') or (Konfig.PersQTH <>'') then
s_pac(kanal, nu, true, M1)
else
begin
s_pac(kanal, nu, false, InfoZeile(415)+m1);
Send_Prompt(Kanal,FF);
end;
end;
56: begin {* ACTion *}
S_pac(kanal, nu, false, M1+int_str(NoActivity)+ ' '+infozeile(393)+m1);
end;
57: begin {* ONACTiv *}
OnAct:=Parm[1];
if OnAct<>'' then
begin
S_pac(kanal, nu, false, M1+'* '+OnAct+ ' '+infozeile(394)+m1);
_OnAct:=true;
end
else
begin
S_pac(kanal, nu, false, M1+infozeile(396)+m1);
_ONAct:=false;
for i:=1 to maxlink do
if k[i]^.Onact<>'' then _Onact:=true;
end;
end;
58: Begin {* CALCLOC *}
if Anz<>0 then
begin
flag:=false;
parmwrong:=false;
if (anz=1) then
begin
if (pos('/',Parm[1])>0) or (Konfig.persLoc<>'') then flag:=true else ParmWrong:=true;
if flag then Parm[2]:=Konfig.persLoc;
end;
if not ParmWrong then
begin
QTH_Pruefen(Parm[1],Oeslae,NoeBre,status);
Parm[1]:= WINKEL_IN_NEU(OESLAE,NOEBRE);
end;
if Flag then
begin
S_pac(kanal, nu, false,m1+InfoZeile(411)+B1+Parm[1]+m1);
end;
if (Parm[1]<>'') then
begin
QTH_Pruefen(Parm[2],Oeslae,NoeBre,status);
Parm[2]:= WINKEL_IN_NEU(OESLAE,NOEBRE);
QTH_ENTFG_RICHTG(Parm[1],Parm[2],ENTFG,RICHTG,STATUS);
str(Richtg:0:1,hstr);
hstr:=SFillStr(6,B1,hstr);
S_pac(kanal, nu, false,m1+InfoZeile(406)+B1+Parm[1]+' > '+Parm[2]+hstr+b1+InfoZeile(407)+m1);
QTH_ENTFG_RICHTG(parm[2],Parm[1],ENTFG,RICHTG,STATUS);
str(Richtg:0:1,hstr);
hstr:=SFillStr(6,B1,hstr);
S_pac(kanal, nu, false,InfoZeile(406)+B1+Parm[2]+' > '+Parm[1]+hstr+B1+InfoZeile(407)+m1);
str(entfg:0:1,hstr);
S_pac(kanal, nu, false,InfoZeile(408)+b1+hstr+' km'+m1);
end;
end else ParmWrong:=true;
end;
{$IFNDEF no_Netrom} {//db1ras}
59: REMNodesListen (Kanal, CZeile); (* NODES *)
60: REMRoutesListen(Kanal, CZeile); (* ROUTES *)
{$ENDIF}
61:
Begin (* RXBIN *)
if anz>0 then
begin
Path := MakePathName(Kanal,Flag,Parm[1]);
if Flag then
begin
Assign(TxFile,Path);
if ResetBin(TxFile,T) = 0 then
Begin
RemFlag := false;
TX_Bin := 2;
TX_Laenge := FileSize(TxFile);
TX_Count := 0;
TX_CRC := 0;
FileSend := true;
FileSendRem := true;
TX_Time := Uhrzeit;
xbin.an:=true;
SetzeFlags(Kanal);
if TX_Bin = 2 then S_PAC(Kanal,NU,true,MakeBinStr(Kanal,Path));
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(144) + B1 + Path + M1);
Send_Prompt(Kanal,FF);
end;
end else
begin
S_PAC(Kanal,NU,false,InfoZeile(240) + B1 + Path + M1);
Send_Prompt(Kanal,FF);
end;
end else parmwrong:=true;
End;
99: Begin (* Runfile suchen und wenn vorhanden dann starten *)
if SaveNameCheck(0,CutStr(Komm)) then
begin
Dummy := Konfig.RunVerz + Komm;
Flag := false;
i := 0;
Repeat
inc(i);
Flag := Exists(CutStr(Dummy) + DExt[i]);
Until Flag or (i >= 3);
if Flag then
begin
Dummy := CutStr(Dummy) + DExt[i] + B1 + RestStr(Dummy);
KillEndBlanks(Dummy);
GetDir(0,Bstr);
ChDir(copy(Konfig.RunVerz,1,length(Konfig.RunVerz)-1));
Dummy := Dummy + B1 + RSK + B1 + Konfig.TempVErz + DosBild;
DosAufruf(Dummy,0);
ChDir(BS);
ChDir(Bstr);
if Dummy = OK then
begin
if Exists(Konfig.TempVerz + DosBild) then
begin
SF_Text(Kanal,Konfig.TempVerz + DosBild);
KillFile(Konfig.TempVerz + DosBild);
end;
end else S_PAC(Kanal,NU,false,InfoZeile(166) + B1 + Komm + M2);
Send_Prompt(Kanal,FF);
end else unknown := true;
end else unknown := true;
End;
254: notRC := true;
FF: ParmWrong := true;
else
unknown := true;
end;
if (not ParmWrong) and (not notRC) and (not unknown) then Send_Prompt(Kanal,Art);
if Node then begin
for i:=1 to MaxAutoSys do
begin
if Pos(UpcaseStr(AutoSysKenner[i]), UpcaseStr(CZeile))>0 then unknown:=false;
end;
if (node) then
begin
if czeile='' then
begin
unknown:=false;
ParmWrong:=false;
end;
if Art=111 then
begin
S_PAC(Kanal,NU,false,InfoZeile(21) + M1);
Send_Prompt(Kanal,FF);
unknown:=false;
parmwrong:=false;
end;
if Mail_SP then unknown:=false;
</