home *** CD-ROM | disk | FTP | other *** search
/ Fresh Fish 8 / FreshFishVol8-CD1.bin / new / comm / bbs / 4d-bbsdemo / arexx / 4dafterpost.rexx next >
OS/2 REXX Batch file  |  1993-12-28  |  1KB  |  50 lines

  1. /*    AfterPost.Rexx                 Copyright 1993 © CornerStone Software
  2.  *                                   Written By Dale E. Reed Jr.
  3.  *                                   All Rights Reserved
  4.  *
  5.  *  This program simply checks to see if the person who just got a message
  6.  *  written to them is on another line of 4D. It does this by checking for
  7.  *  port names from the base name to the base name +"16".
  8.  *
  9.  */
  10.  
  11. options results
  12.  
  13. ARG port sub username
  14.  
  15. IF length(port)=0 THEN port = '4D-BBS'
  16.  
  17. basename=port
  18.  
  19. if datatype( right(basename,1)) = NUM then
  20.     basename=left(basename, length(basename)-1)
  21.  
  22. if datatype( right(basename,1)) = NUM then
  23.     basename=left(basename, length(basename)-1)
  24.  
  25. do numb=0 to 8
  26.     
  27.     portname=basename||numb
  28.  
  29.     if numb=0 then
  30.         portname=basename
  31.  
  32.     if show(p, portname) then
  33.         do
  34.         address VALUE portname
  35.  
  36.         'userinfo' 'A'
  37.         name=RESULT
  38.  
  39.         if upper(name)=upper(username) then
  40.             do
  41.             string='** A Message Was Just Left To You On Sub-Board' sub '**'
  42.             'messqueue' string
  43.             end
  44.  
  45.         end
  46.     
  47.     end
  48.  
  49. exit
  50.