home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / WCPOST.ZIP / WCPOST_X.WCX (.txt) < prev    next >
Wildcat! WCX  |  1994-10-11  |  6KB  |  238 lines

  1. '! Decompiled with wccNosy version 4.20f (freeware)
  2. '! Input File: in.wcx  5559 bytes  12/30/122  04:12:34pm
  3. '! Code Segment Size  :2352 bytes
  4. '! Data Segment Size  :5490 bytes
  5. '! String Segment Size:3207 bytes
  6. '! Compiled with WCC version 4.01
  7.  
  8.       Type Type26
  9.         Filler0(1 To 6) As Byte
  10.         s6 As String*70
  11.         Filler76(1 To 14) As Byte
  12.         s90 As String*70
  13.         Filler160(1 To 14) As Byte
  14.         s174 As String*70
  15.         Filler244(1 To 20) As Byte
  16.         w264 As Word
  17.       End Type
  18.  
  19.       Declare Function Func2056 As Integer
  20.       Declare Function Func2156(mh65534 As MessageHeader) As Integer
  21.  
  22.       Dim s4463 As String
  23.       Dim ur4467 As UserRecord
  24.       Dim mh5117 As MessageHeader
  25.       Dim s5437 As String*1
  26.       Dim i5438 As Integer
  27.       Dim i5440 As Integer
  28.       Dim s5442 As String
  29.       Dim s5446 As String*10
  30.       Dim s5456 As String*10
  31.       Dim s5466 As String*10
  32.       Dim s5480 As String
  33.       Dim dt5484 As DateTime
  34.  
  35.       Dim s65532_ As String
  36.  
  37.       CurrentDateTime dt5484
  38.       s4463 = "1.01"
  39.       s5480 = ""
  40.       Open "wcpost.log" For Append As 1
  41.       Open "wcpost.err" For Append As 2
  42.       Join 0
  43.       Func2056
  44.       Do
  45.   115   Cls 
  46.         Locate 4, 1
  47.         Print "                  @0F@wcPOST @0E@v@0F@" + s4463 + "@0E@, the Simple Message Poster"
  48.         Print "                        written by, @0F@Stephen Barclay@0E@"
  49.         Print ""
  50.         Print "                   @0E@[@0F@A@0E@] - Send a Message to All Excluding"
  51.         Print "                         Two Different Security Profiles"
  52.         Print "                   @0E@[@0F@B@0E@] - Send a Message to All Excluding"
  53.         Print "                         One Different Security Profile"
  54.         Print "                   @0E@[@0F@C@0E@] - Send a Message to ONE Security Level"
  55.         Print "                   @0E@[@0F@D@0E@] - Send a Message to ALL Users"
  56.         Print "                   @0E@[@0F@E@0E@] - Drop/Shell to DOS"
  57.         Print "                   @0E@[@0F@Q@0E@] - Quit to @0F@"; MakeWild.BBSName; "@0E@"
  58.         Print ""
  59.         Print "                 Please Select @0E@[@0F@A,B,C,D,Q@0E@] : ";
  60.         Input s5437
  61.         s65532_ = UCase(s5437)
  62.         If s65532_ = "A" Then
  63.           Cls 
  64.           Locate 2, 1
  65.           Print "     wcPOST v" + s4463 + ", Send a Message to All Except TWO Security Levels"
  66.           Locate 5, 1
  67.           Print "   This Selection will allow you to send any specified text file"
  68.           Print "to a selected User Security Profile(s).  You may either only send"
  69.           Print "the Message to one Security Level or you may exclude one Security"
  70.           Print "Level.  Please make sure that the Text file you are sending dose"
  71.           Print "exist, and is in a text readable format."
  72.           Print ""
  73.           Locate 12, 1
  74.           s5442 = InputMask("Please enter the text file name : ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "", 1213417543)
  75.           s5456 = InputMask("Please enter the first Security Level to exclude : ", "XXXXXXXXXX", "", 1213417543)
  76.           s5466 = InputMask("@0F@Please enter the second Security Level to exclude : ", "XXXXXXXXXX", "", 1213417543)
  77.           i5438 = 0
  78.           i5438 = InputYesNo("Do you wish to continue ? ", 1213417543)
  79.           If i5438 = -1 Then
  80.             If s5442 <> "" And s5456 <> "" Then
  81.               If GetUser(ur4467, s5480) Then
  82.                 i5440 = 0
  83.   591           Do While GetNextUser(ur4467, 1213417543)
  84.                   If ur4467.SecLevel <> s5456 And ur4467.SecLevel <> s5466 Then
  85.                     If Func2156(mh5117) Then
  86.                       AddMessage(mh5117, s5442, "", 1213417543)
  87.                       i5440 = i5440 + 1
  88.                       Print #1, "          ! MSGTOUSERS1 sent to : "; ur4467.Name; ", sucessfully"
  89.                     End If
  90.                   End If
  91.   731           Loop
  92.   737           Print ""
  93.                 Print "A total of @0B@"; i5440; "@0E@ Message(s) were sent."
  94.                 WaitEnter 
  95.               End If
  96.             End If
  97.           End If
  98.   772   Else
  99.   778     If s65532_ = "B" Then
  100.             Cls 
  101.             Locate 2, 1
  102.             Print "    wcPOST v" + s4463 + ", Send a Message to All except One Security Level"
  103.             Locate 5, 1
  104.             Print "  This selection will allow you to send a message to All Users except"
  105.             Print "ONE different Security Profile.  This might be hand to send a message"
  106.             Print "to All of your normal Users exculding the NewUsers. "
  107.             Print ""
  108.             Locate 10, 1
  109.             s5442 = InputMask("Please enter the text file name : ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "", 1213417543)
  110.             s5456 = InputMask("Please enter the first Security Level to exclude : ", "XXXXXXXXXX", "", 1213417543)
  111.             i5438 = 0
  112.             i5438 = InputYesNo("Do you wish to continue ? ", 1213417543)
  113.             If i5438 = -1 Then
  114.               If s5442 <> "" And s5456 <> "" Then
  115.                 If GetUser(ur4467, s5480) Then
  116.                   i5440 = 0
  117.  1027             Do While GetNextUser(ur4467, 1213417543)
  118.                     If ur4467.SecLevel <> s5456 Then
  119.                       If Func2156(mh5117) Then
  120.                         AddMessage(mh5117, s5442, "", 1213417543)
  121.                         i5440 = i5440 + 1
  122.                         Print #1, "          ! MSGTOUSERS1 sent to : "; ur4467.Name; ", sucessfully"
  123.                       End If
  124.                     End If
  125.  1147             Loop
  126.  1153             Print ""
  127.                   Print "A total of @0B@"; i5440; "@0E@ Message(s) were sent."
  128.                   WaitEnter 
  129.                 End If
  130.               End If
  131.             End If
  132.  1188     Else
  133.  1194       If s65532_ = "C" Then
  134.               Cls 
  135.               Locate 2, 1
  136.               Print "     wcPOST v" + s4463 + ", Send a Message to ONE Security Level Option"
  137.               Locate 5, 1
  138.               Print "  This selection will allow you to send a text file to any ONE"
  139.               Print "Security Level you wish.  Pretty simple."
  140.               Print ""
  141.               Locate 10, 1
  142.               s5442 = Trim(InputMask("Please enter the text file name : ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "", 1213417543))
  143.               s5446 = Trim(InputMask("Please enter the Security Level to Send the Message to : ", "XXXXXXXXXX", "", 1213417543))
  144.               i5438 = 0
  145.               i5438 = InputYesNo("Do you wish to continue ?", 1213417543)
  146.               If i5438 = -1 Then
  147.                 If s5442 <> "" And s5446 <> "" Then
  148.                   If GetUser(ur4467, s5480) Then
  149.                     i5440 = 0
  150.  1440               Do While GetNextUser(ur4467, 1213417543)
  151.                       If ur4467.SecLevel = s5446 Then
  152.                         If Func2156(mh5117) Then
  153.                           AddMessage(mh5117, s5442, "", 1213417543)
  154.                           i5440 = i5440 + 1
  155.                           Print #1, "          ! MSGTOALL sent to : "; ur4467.Name; ", sucessfully"
  156.                         End If
  157.                       End If
  158.  1560               Loop
  159.  1566               Print ""
  160.                     Print "A total of @0B@"; i5440; "@0E@ Message(s) were sent."
  161.                     WaitEnter 
  162.                   End If
  163.                 End If
  164.               End If
  165.  1601       Else
  166.  1607         If s65532_ = "D" Then
  167.                 Locate 2, 1
  168.                 Print "      wcPOST v" + s4463 + ", Send a Message to ALL Users at once"
  169.                 Locate 5, 1
  170.                 Print "  This selection allows you to send a message to ALL of your Users"
  171.                 Print "at one time.  This is by far the easiest command to use to get more"
  172.                 Print "information to ALL of your Users."
  173.                 Locate 10, 1
  174.                 s5442 = InputMask("Please enter the text file name : ", "XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX", "", 1213417543)
  175.                 i5438 = 0
  176.                 i5438 = InputYesNo("Do you wish to continue ? ", 1213417543)
  177.                 If i5438 = -1 Then
  178.                   If s5442 <> "" Then
  179.                     If GetUser(ur4467, s5480) Then
  180.                       i5440 = 0
  181.  1800                 Do While GetNextUser(ur4467, 1213417543)
  182.                         If Func2156(mh5117) Then
  183.                           AddMessage(mh5117, s5442, "", 1213417543)
  184.                           i5440 = i5440 + 1
  185.                           Print #1, "          ! MSGTOUSERS1 sent to : "; ur4467.Name; ", sucessfully"
  186.                         End If
  187.  1896                 Loop
  188.  1902                 Print ""
  189.                       Print "A total of @0B@"; i5440; "@0E@ Message(s) were sent."
  190.                       WaitEnter 
  191.                     End If
  192.                   End If
  193.                 End If
  194.  1937         Else
  195.  1943           If s65532_ = "E" Then
  196.                   Shell "", ""
  197.                 Else
  198.  1979             If s65532_ = "Q" Then
  199.                     GoTo 2029
  200.                   Else
  201.  2008               Print "Not a valid Selection, please try again."
  202.                     Beep 
  203.                     WaitEnter 
  204.                   End If
  205.                 End If
  206.               End If
  207.             End If
  208.           End If
  209.         End If
  210.  2023 Loop
  211.  2029 Reset 
  212.  
  213. '! Called 1 time
  214.       Function Func2056 As Integer
  215.         Print #1, "------------------------------------------------------------------------------"
  216.         Print #1, FormatDate(dt5484.D, "mm/dd/yy") + " ";
  217.         Print #1, FormatTime(dt5484.T, "hh:mm:ss") + " ";
  218.         Print #1, " wcPost v" + s4463 + " Log File, the GREAT Message Poster!"
  219.       End Function
  220.  
  221. '! Called 4 times
  222.       Function Func2156(mh65534 As MessageHeader) As Integer
  223.         Dim i65530 As Integer
  224.  
  225.         Func2156 = 0
  226.         Do
  227.  2171     mh65534.From = "wcPOST v" + s4463
  228.           mh65534.To = ur4467.Name
  229.           mh65534.Flags = 1
  230.           mh65534.Subject = "Auto-Posting from wcPOST"
  231.           i65530 = Trim(mh65534.From + mh65534.To + mh65534.Subject) > ""
  232.           If Not i65530 Then
  233.             Print #2, "There wsa an Error creating the Message to the User!"
  234.           End If
  235.  2325   Loop Until i65530
  236.         Func2156 = -1
  237.       End Function
  238.