home *** CD-ROM | disk | FTP | other *** search
/ OS/2 Shareware BBS: 2 BBS / 02-BBS.zip / murexx05.zip / SETEXP.CMD < prev    next >
OS/2 REXX Batch file  |  1994-12-15  |  3KB  |  51 lines

  1. /***************************************************************************/
  2. /*                                                                         */
  3. /* MaxUserREXX script to Set Expiry Information                            */
  4. /*                                                                         */
  5. /* This script needs a command line argument, the name of the LASTUSxx.BBS */
  6. /* file for the node that the user you want to work with is on.            */
  7. /*                                                                         */
  8. /* From a menu selection use something like:                               */
  9. /*                                                                         */
  10. /*  Multi-Node:                                                            */
  11. /*                                                                         */
  12. /*   ReRead  Xtern_Dos  SetExp.Cmd_LASTUS%K.BBS  Disgrace  "Upgrade Me"    */
  13. /*                                                                         */
  14. /*  Single Node:                                                           */
  15. /*                                                                         */
  16. /*   ReRead  Xtern_Dos  SetExp.Cmd_LASTUSER.BBS  Disgrace  "Upgrade Me"    */
  17. /*                                                                         */
  18. /* From a mecca file:                                                      */
  19. /*                                                                         */
  20. /*   [xtern_dos]@D:\Max\SetExp.Cmd LASTUS%K.BBS                            */
  21. /*                                                                         */
  22. /***************************************************************************/
  23.  
  24. '@echo off'
  25.  
  26. Parse Arg LastUserBBS .
  27.  
  28. Call RxFuncAdd 'UserLoadFuncs', 'MaxUser', 'UserLoadFuncs'
  29. Call UserLoadFuncs
  30.  
  31. Signal On Syntax Name SyntaxError
  32.  
  33. uPriv   = 'NORMAL'          /* Priviledge level to give user */
  34. xType   = 'DAYS'            /* Expiry time will be in days */
  35. xTime   = 30                /* Give them 30 days to play */
  36. xAction = 'DEMOTE'          /* We want to demote user priv after expiry */
  37. xPriv   = 'DISGRACE'        /* Priviledge to demote to after trial period */
  38.  
  39. userCount = OpenUserFile(LastUserBBS)
  40.  
  41. if userCount <> 'ERROR' Then Do
  42.     Call SetUserPriviledge 0, uPriv
  43.     Call SetUserExpiryInfo 0, xType, xTime, xAction, xPriv
  44.     Call CommitUser 0
  45.     Call CloseUserFile
  46. End
  47.  
  48. SyntaxError:
  49. Call UserDropFuncs
  50. Exit 0
  51.