home *** CD-ROM | disk | FTP | other *** search
/ Gold Fish 1 / GoldFishApril1994_CD2.img / d4xx / d473 / cnewssrc / cnews_src.lzh / relay / amiga / addgroup.e next >
AmigaDOS Script File  |  1991-01-04  |  786b  |  35 lines

  1. .key GROUP/M,TYPE/M
  2. .bra [
  3. .ket ]
  4. ; addgroup - add a newsgroup, locally only
  5.  
  6. Path NewsBin:misc
  7.  
  8. ;    What about =realgroup ???
  9. if [TYPE] ne n and [TYPE] ne y and [TYPE] ne m and [TYPE] ne x
  10.     echo "Usage: addgroup groupname {y|n|m|x|=realgroup}"
  11.     quit 10
  12. endif
  13.  
  14. grep -x "[GROUP]" NewsCtl:active
  15. if val $RC ne 0
  16.     echo "addgroup: [GROUP] already exists!"
  17.     quit 10
  18. endif
  19.  
  20. Lab Again
  21. if Exists T:Cnews.lock
  22.     wait 50
  23.     SkipBack again
  24. endif
  25. echo >T:Cnews.lock "addgroup"
  26.  
  27. echo >>NewsCtl:active "[GROUP] 0000000000 0000000001 [TYPE]"
  28.  
  29. ; These next lines are not essential, so we leave them out...
  30. ; mkpdir $NEWSARTS/`echo $1 | tr . /`
  31. ; echo "$1 `getdate now` $SENDER" >>$NEWSCTL/active.times  # rn hook
  32. ; echo "newsgroup $1 was created locally by $SENDER." | mail $NEWSMASTER
  33.  
  34. delete T:Cnews.lock
  35.