home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / PK174V13.ZIP / RSB2PEEK.MRG < prev   
Text File  |  1992-07-29  |  10KB  |  181 lines

  1. * ------------[ BLED merge (c) Ken Goosens ]-------------
  2. * Merge this against RBBSSUB2.BAS to produce RBBSSUB2.NEW
  3. * RBBSSUB2.BAS:  Date 6-20-1992  Size 140946 bytes
  4. * ------------[ Created 07-29-1992 48:42:23 ]------------
  5. * REPLACING old line(s) by new
  6. 2021 ZOutTxt$ = "To A)ll,S)ysop," + _
  7.                  LEFT$("D)istribution,",-14*EnableCC) + _
  8. * ------[ first line different ]------
  9.                  " or name (2 Char. Min.)" + ZPressEnterExpert$      ' PEEK174
  10.      CALL SkipLine (1)
  11.      ZSemiOnly = ZTrue
  12.      CALL PopCmdStack
  13.      IF LEN(ZUserIn$(ZAnsIndex)) > 30 THEN _
  14.         CALL QuickTPut1 ("30 Char. Max") : _
  15.         GOTO 2021
  16.      IF LEFT$(ZUserIn$(ZAnsIndex),1) = " " THEN _                    ' PEEK174
  17.         CALL SkipLine (1) : _                                        ' PEEK174
  18.         CALL QuickTPut1 ("Name can't begin with a SPACE") : _        ' PEEK174
  19.         CALL SkipLine (1) : _                                        ' PEEK174
  20.         GOTO 2021                                                    ' PEEK174
  21.      Found = ZTrue
  22.      IF ZWasQ = 0 THEN _
  23.         GOTO 2033 _
  24.      ELSE ZWasDF$ = ZUserIn$(ZAnsIndex) : _
  25.           CALL AllCaps (ZWasDF$) : _
  26.           ZUserIn$(ZAnsIndex) = ZWasDF$ : _
  27.           IF ZWasDF$ = "A" THEN _
  28.              MsgTo$ = "ALL" _
  29.           ELSE IF ZWasDF$ = "S" THEN _
  30.              MsgTo$ = "SYSOP" _
  31.           ELSE IF ZWasDF$ = "D" AND EnableCC THEN _
  32.              GOTO 2025 _
  33.           ELSE MsgTo$ = ZUserIn$(ZAnsIndex) :_
  34.                CALL AllCaps (MsgTo$)
  35.      GOTO 2032
  36. * REPLACING old line(s) by new
  37. 2032 RcvrRecNum = 0
  38. * ------[ first line different ]------
  39.      IF MsgTo$ <> "ALL" THEN                                         ' PEEK174
  40.         IF (LEFT$(MsgTo$,4) <> "ALL " AND ZStartHash = 1) THEN       ' PEEK174
  41.            ZWasDF = INSTR(MsgTo$+" @"," @")                          ' PEEK174
  42.            TempHashValue$ = LEFT$(MsgTo$,ZWasDF-1)                   ' PEEK174
  43.            CALL WhoCheck (TempHashValue$,Found,RcvrRecNum)           ' PEEK174
  44.            IF Found AND MsgTo$ = ZSecretName$ THEN _                 ' PEEK174/RM072201
  45.               CALL QuickTPut (MsgTo$ + " not found!",1) : _          ' PEEK174/RM072201
  46.               Found = ZFalse                                         ' PEEK174/RM072201
  47.            IF NOT Found THEN                                         ' PEEK174
  48.               CALL QuickTPut1 ("Searching for a match to " + MsgTo$) ' PEEK174
  49.               CALL QuickPeek (ZUserIn$(ZAnsIndex),MsgTo$,Found)      ' PEEK174
  50.               IF Found THEN _                                        ' PEEK174/RM072901
  51.                  ZStartHash = 1 : _                                  ' PEEK174/RM072901
  52.                  CALL WhoCheck (MsgTo$,Found,RcvrRecNum)             ' PEEK174/RM072901
  53.            END IF                                                    ' PEEK174
  54.            IF NOT Found THEN                                         ' PEEK174
  55.               ZLastIndex = 0                                         ' PEEK174
  56.               RcvrRecNum = 0                                         ' PEEK174
  57.               IF NOT ZReply THEN                                     ' PEEK174
  58.                  CALL QuickTPut ("No match found for " + MsgTo$,1)   ' PEEK174
  59.                  ZOutTxt$ = "Send anyway (Y,[N])"                    ' PEEK174
  60.                  ZTurboKey = -ZTurboKeyUser                          ' PEEK174
  61.                  ZLastIndex = 0                                      ' PEEK174
  62.                  GOSUB 2034                                          ' PEEK174
  63.                  IF NOT ZYes THEN _
  64.                     GOTO 2021
  65.               END IF                                                 ' PEEK174
  66.            END IF                                                    ' PEEK174
  67.         END IF                                                       ' PEEK174
  68.      END IF                                                          ' PEEK174
  69.      IF MsgTo$ = Temp$ THEN _
  70.         ZOutTxt$ = "Really send this to YOURSELF (Y,[N])" : _
  71.         ZLastIndex = 0 : _
  72.         GOSUB 2034 : _
  73.         IF NOT ZYes THEN _
  74.            MsgTo$ = ""
  75.      CALL OpenWorkA (ZNodeWorkFile$)
  76.      CALL PrintWorkA (MsgTo$ + "," + STR$(RcvrRecNum))
  77.      CLOSE 2
  78.      ZNumHeaders = ZNumHeaders + 1
  79.      IF EnableCC AND (NOT ZReply) AND MsgTo$ <> "ALL" AND _
  80.         MsgTo$ <> "" AND LEFT$(MsgTo$,4) <> "ALL " AND _
  81.         (NOT ZSysopComment) AND (NOT ZSysopMsg) THEN _
  82.            ZOutTxt$ = "Carbon copy to another (Y,[N])" : _
  83.            CALL PopCmdStack : _
  84.            IF ZYes THEN _
  85.               GOTO 2021
  86. * REPLACING old line(s) by new
  87. 2250 ' $SUBTITLE: 'WhoCheck - Checks whether user exists'
  88. ' $PAGE
  89. '
  90. '  NAME    -- WhoCheck
  91. '
  92. '  INPUTS  --   PARAMETER                    MEANING
  93. '              WhoFind$                User to find
  94. '
  95. '  OUTPUTS --  WhoFound                Whether user found
  96. '              UserNumFound           Record # of user
  97. '
  98. '  PURPOSE --  Validate that user record exists.  Sysop
  99. '              counted as found even if lack user record.
  100. '
  101.      SUB WhoCheck (WhoFind$,WhoFound,UserNumFound) STATIC
  102.      UserNumFound = 0
  103.      IF ZStartHash <> 1 THEN _
  104.         WhoFound = ZTrue : _
  105.         EXIT SUB
  106.      Work128$ = ZUserRecord$
  107.      WhoFound = ZFalse
  108.      ToSysop = (INSTR(WhoFind$,"SYSOP") > 0 OR _
  109.                 INSTR(WhoFind$,ZSysopFirstName$ + " " + ZSysopLastName$) > 0)
  110.      CALL OpenUser (HighestUserRecord)
  111.      FIELD 5, 128 AS ZUserRecord$
  112.      IF ToSysop THEN _
  113.         WasX$ = ZSecretName$ _
  114.      ELSE WasX$ = WhoFind$
  115.      ZWasDF = INSTR(WasX$+"@","@")
  116.      WasX$ = LEFT$(WasX$,ZWasDF)
  117.      IF LEN(WasX$) > 1 THEN _
  118.         CALL FindUser (WasX$,"",ZStartHash,ZLenHash,_
  119.                        0,0,HighestUserRecord,WhoFound,_
  120.                        UserNumFound,ZWasSL)
  121.      LSET ZUserRecord$ = Work128$
  122.      IF NOT WhoFound THEN _
  123.         IF ToSysop THEN _
  124.            WhoFound = ZTrue _
  125. * ------[ first line different ]------
  126.         ELSE CALL QuickTPut1 (WhoFind$ + " not found!")              ' PEEK174
  127.      END SUB
  128. * INSERTING new line(s)
  129. 20340 ' $SUBTITLE: 'QuickPeek - Easy find user to send message to'   ' DD030692
  130. ' $PAGE                                                              ' DD030692
  131. '                                                                    ' DD030692
  132. '  NAME    -- QuickPeek                                              ' DD030692
  133. '                                                                    ' DD030692
  134. '                 PARAMETER                    MEANING               ' PEEK174
  135. '                                                                    ' PEEK174
  136. '  INPUTS  --     ZUserIn$                Search String User Input   ' DD030692
  137. '                                                                    ' DD030692
  138. '  OUTPUTS --     MsgTo$                  Who Message is To          ' DD030692
  139. '                                                                    ' DD030692
  140. '  PURPOSE -- Save User keystrokes when looking for message addressee' DD030692
  141. '                                                                    ' DD030692
  142.       SUB QuickPeek (ZUserIn$,MsgTo$,WhoFound)  Static               ' PEEK174
  143.       IF WhoFound = ZTrue THEN EXIT SUB                              ' PEEK174
  144.       ZLastDateTimeOnSave$ = ZLastDateTimeOn$                        ' PEEK174
  145.       UserInName$ = ZUserIn$                                         ' PEEK174
  146.       WhichUser = 1                                                  ' PEEK174
  147.       CALL OpenUser (ZHighestUserRecord)                             ' PEEK174
  148.       WHILE NOT EOF(5)                                               ' DD030692
  149.          GET #5, WhichUser                                           ' PEEK174
  150.          TempMsgTo$ = ZUserName$                                     ' PEEK174
  151.          CALL TRIM (TempMsgTo$)                                      ' PEEK174
  152.          IF UserInName$ = TempMsgTo$ THEN EXIT SUB                   ' PEEK174
  153.          IF INSTR(TempMsgTo$,UserInName$) > 0 THEN                   ' PEEK174
  154.          IF TempMsgTo$ = ZSecretName$ THEN _                         ' PEEK174/RM072201
  155.             GOTO 20345                                               ' PEEK174/RM072201
  156.          ZSubParm = 1                                                ' PEEK174
  157.          ZOutTxt$ = "Send to: " + TempMsgTo$ + " (Y)es, [N])o, A)bort)" ' PEEK174
  158.          ZTurboKey = -ZTurboKeyUser                                  ' PEEK174
  159.          CALL PopCmdStack                                            ' PEEK174
  160.          IF ZSubParm = -1 THEN _                                     ' PEEK174
  161.             EXIT SUB                                                 ' PEEK174
  162.          ZWasZ$ = ZUserIn$(1)                                        ' PEEK174
  163.          CALL AllCaps (ZWasZ$)                                       ' PEEK174
  164.          IF ZWasZ$ = "A" THEN _                                      ' PEEK174
  165.             EXIT SUB                                                 ' PEEK174
  166.          IF ZWasZ$ = "Y" THEN                                        ' PEEK174
  167.             MsgTo$ = TempMsgTo$                                      ' PEEK174
  168.             ZUserIn$ = TempMsgTo$                                    ' PEEK174
  169.             WhoFound = ZTrue                                         ' PEEK174
  170.             ZLastDateTimeOn$ = ZLastDateTimeOnSave$                  ' PEEK174
  171.             EXIT SUB                                                 ' PEEK174
  172.          ELSE                                                        ' PEEK174
  173.             WhichUser=WhichUser+1                                    ' PEEK174
  174.          END IF                                                      ' PEEK174
  175.          ELSE                                                        ' PEEK174
  176. 20345       WhichUser=WhichUser+1                                    ' PEEK174/RM072201
  177.          END IF                                                      ' PEEK174
  178.       WEND                                                           ' PEEK174
  179.       ZLastDateTimeOn$ = ZLastDateTimeOnSave$                        ' PEEK174
  180.       END SUB                                                        ' PEEK174
  181.