home *** CD-ROM | disk | FTP | other *** search
- /*
- ** Postnews Replacement Script
- ** GRn Can Now Post News :-)
- */
-
- Parse arg result
- a = 0
- art = word(result,1)
- art2 = word(result,3)
- alreadyinsertedfile = "FALSE"
- if art2 ~="" then
- do
- call open(file,art,"A")
- call seek(file,0,"B")
- do while ~eof(file)
- if word(line.a,1) == "Subject:" then call insertfile2
- a = a + 1
- line.a = readln(file)
- end
- call close(file)
- art = "t:grn-file"
- call open(file,art,"W")
- call seek(file,0,"B")
- do i = 1 to a
- call writeln(file,line.i)
- end
- call close(file)
- end
- address command "amitcp:bin/sendmail <" art "-f $USER -t mail2news@$NEWSSERVER"
- exit
-
- insertfile2:
- say "insertingfile"
- if alreadyinsertedfile == "FALSE" then
- do
- say "insertfile4real"
- call open(file2,art2,"R")
- do while ~eof(file2)
- a = a + 1
- line.a = readln(file2)
- end
- a = a + 1
- line.a = "Postnews Grn Fix V2 - Martin Hunt Jan 1995"
- alreadyinsertedfile = "TRUE"
- call close(file2)
- end
-