home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / CL15S1G.ZIP / LASTON13.ZIP / AUTOJOIN.PPS < prev    next >
Text File  |  1994-01-10  |  1KB  |  42 lines

  1. STRING  ConfNum
  2. BYTE    AutoJoin
  3. INTEGER MaxConf
  4.  
  5. ' See how many conferences there are.
  6. MaxConf = READLINE("PCBOARD.DAT", 108)
  7.  
  8. ' Get the position in U_CMNT1 for our ConfNum from the command line.
  9. GETTOKEN AutoJoin
  10.  
  11. GETUSER
  12. ConfNum = MID(U_CMNT1, AutoJoin, 4)     ' Get the ConfNum
  13.  
  14. WHILE (TRUE) DO
  15.    ConfNum = TRIM(ConfNum, " ")         ' Clean it up
  16.    PRINTLN
  17.    PRINTLN "To disable AutoJoin enter a blank"
  18.    PRINTLN
  19.    INPUTSTR "Conference to Join at Logon", ConfNum, DEFCOLOR(), 5, MASK_NUM()+" ", NEWLINE+FIELDLEN+GUIDE
  20.  
  21.    ConfNum = RIGHT("    " + TRIM(ConfNum, " "), 4)      ' Format it to 4 chars
  22.  
  23.    IF (ConfNum < 0 | ConfNum => MaxConf) THEN           ' Check range
  24.       OPTEXT ConfNum                                    ' Tell them invalid
  25.       DISPTEXT 281, NEWLINE+BELL
  26.       CONTINUE                                          ' and loop back
  27.    END IF
  28.  
  29.    IF (U_EXPDATE > DATE()) THEN                         ' Check expiration
  30.       IF (CONFEXP(ConfNum)) BREAK                       ' Yes, ok if expreg
  31.    ELSE
  32.       IF (CONFREG(ConfNum)) BREAK                       ' No, ok if reg
  33.    END IF
  34.    OPTEXT ConfNum                                       ' Tell them their
  35.    DISPTEXT 74, NEWLINE+BELL+LOGIT                      '   not registered!
  36. END WHILE
  37.  
  38. ' Built the new comment & write it
  39. U_CMNT1 = LEFT(U_CMNT1, AutoJoin-1) + ConfNum + RIGHT(U_CMNT1, 27-AutoJoin)
  40. PUTUSER
  41. END
  42.