home *** CD-ROM | disk | FTP | other *** search
- /* FTick.rexx -- */
- /* process new files received via Tick */
-
- parse arg Area' 'Path' 'Orig' 'Farea' 'Desc'FF'X /* get the parameters from FTick */
-
- /* we don't want conflicts with DLGUpload, so we change any "-characters in the
- Description to '-characters */
-
- Desc = translate(Desc,"'",'"')
-
- if Area = 'IBASE' then do /* this is our "special-area" which allows our points */
- call Local /* to upload files to any User/File-Areas via Tick */
- call Upload /* all they have to do is specify FILE: or USER: and */
- end /* a AreaNumber/User_Name as first part of Desc... */
-
- if Area = 'NODEDIFF' then do /* this will process the nodediff immediately when it */
- call Diff /* arrives */
- call Upload
- end
-
-
- /* if it's one of those File-Echos, we will make an announcement in our local
- request-area: */
-
- if left(Area,3) = 'SKY' | left(Area,3) = 'ADS' | left(Area,4) = 'ANSI' then do
- call Announce
- call Upload
- end
-
- /* if the file is NOT of any special Area, it will NOW be moved to the BBS */
-
- Upload: /* this calls DLGUpload and moves the File to the BBS */
-
- address command 'c:dupload del -f 'Path' -a 'Farea' -d "'Desc'" -u "FTick 0.84 Beta"'
-
- exit
-
- Local: /* when we get files in our "special-area", they will now be checked */
-
- if translate(left(Desc,5)) = 'USER:' then do /* is it to a USER ??? */
- parse var Desc dummy ':' UName ' ' NewDesc /* get his name... */
- Farea = 'User:'UName
- if ~open(Data,FArea'/User.data','R') then do /* does User exist ?? */
- NewDesc = 'Error: 'Desc
- FArea = 'User:Marcus_Kuba' /* if NOT, move it to the SysOp */
- end
- Desc = NewDesc
- return
- end
-
- if translate(left(Desc,5)) = 'FILE:' then do /* is it for a file-area ??? */
- parse var Desc dummy ':' Number ' ' NewDesc /* get the Area-Number */
- Farea = 'File:'Number
- if ~open(Data,FArea'/User.File','R') then do /* does area exist ?? */
- NewDesc = 'Fehler: 'Desc
- FArea = 'User:Marcus_Kuba' /* if NOT, move it to the SysOp */
- end
- Desc = NewDesc
- return
- end
- /* if the USER: or FILE:-prefix was wrong or some */
- Farea = 'User:Marcus_Kuba' /* other problem with this description occured, the */
- Desc = 'Wrong Desc: 'Desc /* File will be moved to the SysOp, too... */
-
- return
-
- /* if the file is in one of the announcement-areas, NOW it will be listed in the body
- of the announcement. Since FTick does not supply a %-switch for the length of the
- file yet, we do it the hard way and use NEWLIST 5.0a's feature of formatted
- listing... (if you know a better way, just tell me :-) */
-
- Announce:
-
- address command 'c:nl >>t:Newticks -T -h -F "\nFile: %n (%s Bytes), Area: 'Area', Origin: 'Orig'\nDesc: 'Desc'" 'Path
-
- return
-
- /* ^^^ this will get you something like:
-
- File: DLGUL060.lha (2???? Bytes), Area: DLG_PR, Origin: 2:247/706
- Desc: latest version of DLGUpload (0.60), works well with DLG 0.985 and FTick 0.84
-
- */
-
- /* this one will call your TrapList(or whatever...)-script. It passes along the
- path/filename of the actual nodediff-update-file, so your batch should expect and
- use this parameter !!! */
-
- Diff:
-
- address command 'execute DLGConfig:Batch/NList2 'Path
-
- return
-
- exit
-