home *** CD-ROM | disk | FTP | other *** search
/ ftp.wwiv.com / ftp.wwiv.com.zip / ftp.wwiv.com / pub / BBS / LIST211.ZIP / LISTSERV.WCX (.txt) < prev    next >
Wildcat! WCX  |  1995-01-09  |  5KB  |  350 lines

  1. '! Decompiled with wccNosy version 4.20f (freeware)
  2. '! Input File: in.wcx  5481 bytes  12/30/122  04:12:10pm
  3. '! Code Segment Size  :3721 bytes
  4. '! Data Segment Size  :5645 bytes
  5. '! String Segment Size:1760 bytes
  6. '! Compiled with WCC version 4.01
  7.  
  8.       Type Type28
  9.         s0 As String*70
  10.         s70 As String*8
  11.       End Type
  12.  
  13.       Type Type27
  14.         Filler0(1 To 4) As Byte
  15.         w4 As Word
  16.       End Type
  17.  
  18.       Type Type26
  19.         Filler0(1 To 661) As Byte
  20.         w661 As Word
  21.       End Type
  22.  
  23.       Dim l4463 As Long
  24.       Dim l4467 As Long
  25.       Dim s4471 As String
  26.       Dim s4475 As String
  27.       Dim s4479 As String
  28.       Dim i4483 As Integer
  29.       Dim t26_4485 As Type26
  30.       Dim mh5151 As MessageHeader
  31.       Dim s5471 As String*70
  32.       Dim t28_5541 As Type28
  33.       Dim l5627 As Long
  34.       Dim l5631 As Long
  35.       Dim i5635 As Integer
  36.       Dim s5637 As String
  37.       Dim s5641 As String
  38.  
  39.       Cls 
  40.       Print "@0F@Listserv v2.11 (01/09/95) - by Pete Nelson"
  41.       Print "Terminal One BBS (510) 673-9217"
  42.       Print "Author: pete@terminal-one.com"
  43.       Print
  44.       Delay 1
  45.       MorePrompt(0)
  46.       If Not Exists("listserv.cfg") Then
  47.         Print
  48.         Print "@0C@You need to create the LISTSERV.CFG file first!"
  49.         Print
  50.       Else
  51.   120   Open "listserv.cfg" For Input As 1
  52.         Input #1, l4463
  53.         Reset 
  54.         i4483 = t26_4485.w661
  55.         Join l4463
  56.         If Not Exists("listserv.dat") Then
  57.           Print
  58.           Print "@0C@You need to run Listutil to create a list of your mailing lists."
  59.         Else
  60.   207     Open "listserv.ptr" For Input As 1
  61.           Input #1, l4463
  62.           Reset 
  63.           mh5151.Number = l4463
  64.   252     Reset 
  65.           If Not GetNextMessage(mh5151) Then
  66.           Else
  67.   275       l5627 = 1
  68.             l5631 = 1
  69.             s4471 = mh5151.Subject
  70.             l4467 = mh5151.Number
  71.             mh5151.Subject = UCase(mh5151.Subject)
  72.             mh5151.To = UCase(mh5151.To)
  73.             Do
  74.   363         Reset 
  75.               If mh5151.To = "LISTSERV" Then
  76.                 If mh5151.Flags >= 1536 Then
  77.                   Delay 0.001
  78.                   Print "@0C@Skipping message flagged as deleted @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@..."
  79.                   GoTo 252
  80.                 End If
  81.   451           GoSub 3317
  82.               End If
  83.   457         Open "listserv.dat" For Random As 1 Len = 78 '! This value should probably be replaced with a "SizeOf" expression
  84.               Get 1, l5627, t28_5541 '! 78 bytes
  85.               If mh5151.To = t28_5541.s0 Then
  86.                 If mh5151.Flags >= 1536 Then
  87.                   Delay 0.001
  88.                   Print "@0C@Skipping message flagged as deleted @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@..."
  89.                   GoTo 252
  90.                 End If
  91.   578           i5635 = 0
  92.                 i5635 = InStr(mh5151.Subject, "WARNING FROM UUCP")
  93.                 If i5635 > 0 Then
  94.                   GoSub 3262
  95.                   GoTo 252
  96.                 End If
  97.   633           i5635 = 0
  98.                 i5635 = InStr(mh5151.Subject, "UNDELIVERABLE")
  99.                 If i5635 > 0 Then
  100.                   GoSub 3262
  101.                   GoTo 252
  102.                 End If
  103.   688           i5635 = 0
  104.                 i5635 = InStr(mh5151.Subject, "UNKNOWN HOST")
  105.                 If i5635 > 0 Then
  106.                   GoSub 3262
  107.                   GoTo 252
  108.                 End If
  109.   743           i5635 = 0
  110.                 i5635 = InStr(mh5151.Subject, "EXECUTION FAILED")
  111.                 If i5635 > 0 Then
  112.                   GoSub 3262
  113.                   GoTo 252
  114.                 End If
  115.   798           i5635 = 0
  116.                 i5635 = InStr(mh5151.Subject, "HOST UNKNOWN")
  117.                 If i5635 > 0 Then
  118.                   GoSub 3262
  119.                   GoTo 252
  120.                 End If
  121.   853           If mh5151.Subject = "" Then
  122.                   Delay 0.001
  123.                   Print "@0C@Skipping message with blank subject @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@..."
  124.                   GoTo 252
  125.                 End If
  126.   917           If mh5151.Subject = "SUB" Or mh5151.Subject = "SUBSCRIBE" Then
  127.                   l5631 = 1
  128.                   Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
  129.                   Do
  130.   998               Get 2, l5631, s5471 '! 70 bytes
  131.                     If s5471 = mh5151.From Then
  132.                       Delay 0.001
  133.                       Print "@0F@"; s5471; "@0A@ is already subsribed to@0B@ "; t28_5541.s0; "@0A@."
  134.                       GoTo 252
  135.                     End If
  136.  1090               l5631 = l5631 + 1
  137.                   Loop Until l5631 > LOF(2)
  138.                   Close 2
  139.                   s5471 = mh5151.From
  140.                   Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
  141.                   Put 2, LOF(2) + 1, s5471 '! 70 bytes
  142.                   Close 2
  143.                   Delay 0.001
  144.                   Print "@0A@Subscribed@0F@ "; mh5151.From; "@0A@ to@0B@ "; t28_5541.s0; "@0A@."
  145.                   If Exists(t28_5541.s70 + ".add") Then
  146.                     Delay 0.001
  147.                     Print "@0D@Sending a thank you response...@0A@"
  148.                     Open "listtmpa.tmp" For Append As 2
  149.                     Open t28_5541.s70 + ".add" For Input As 3
  150.                     Do
  151.  1345                 Input #3, s4479
  152.                       Print #2, s4479
  153.                     Loop Until EOF(3)
  154.                     Close 3
  155.                     Close 2
  156.                     mh5151.To = mh5151.From
  157.                     mh5151.From = t28_5541.s0
  158.                     mh5151.Subject = "Thanks for Subscribing!"
  159.                     mh5151.Flags = 3
  160.                     mh5151.Network = ""
  161.                     AddMessage(mh5151, "listtmpa.tmp", "", 1213417543)
  162.                     mh5151.Number = l4467
  163.                     Kill "listtmpa.tmp"
  164.                   End If
  165.  1504             GoTo 252
  166.                 End If
  167.  1510           If mh5151.Subject = "UNSUBSCRIBE" Or mh5151.Subject = "UNSUB" Then
  168.                   Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
  169.                   s5471 = " "
  170.                   l5631 = 1
  171.                   Do
  172.  1602               Get 2, l5631, s5471 '! 70 bytes
  173.                     s5471 = UCase(s5471)
  174.                     If s5471 = mh5151.From Then
  175.                       s5471 = " "
  176.                       Put 2, l5631, s5471 '! 70 bytes
  177.                       GoTo 1720
  178.                     End If
  179.  1688               l5631 = l5631 + 1
  180.                   Loop Until l5631 > LOF(2)
  181.  1720             Close 2
  182.                   Delay 0.001
  183.                   Print "@0C@Unsubscribed@0F@ "; mh5151.From; "@0C@ from @0B@"; t28_5541.s0; "@0C@."
  184.                   If Exists(t28_5541.s70 + ".drp") Then
  185.                     Delay 0.001
  186.                     Print "@0D@Sending an unsubscription message..."
  187.                     Open "listtmpu.tmp" For Append As 2
  188.                     Open t28_5541.s70 + ".drp" For Input As 3
  189.                     Do
  190.  1871                 Input #3, s4479
  191.                       Print #2, s4479
  192.                     Loop Until EOF(3)
  193.                     Close 2
  194.                     Close 3
  195.                     mh5151.To = mh5151.From
  196.                     mh5151.From = t28_5541.s0
  197.                     mh5151.Subject = "Unsubscription Request"
  198.                     mh5151.Flags = 3
  199.                     mh5151.Network = ""
  200.                     AddMessage(mh5151, "listtmpu.tmp", "", 1213417543)
  201.                     mh5151.Number = l4467
  202.                     Kill "listtmpu.tmp"
  203.                   End If
  204.  2030             GoTo 252
  205.                 End If
  206.  2036           Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
  207.                 Do
  208.  2068             Get 2, l5631, s5471 '! 70 bytes
  209.                   If s5471 = mh5151.From Then
  210.                     Close 2
  211.                     GoTo 2383
  212.                   End If
  213.  2118             l5631 = l5631 + 1
  214.                 Loop Until l5631 > LOF(2)
  215.                 Delay 0.001
  216.                 Print "@0C@Skipping @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@.  @0F@"; mh5151.From; "@0C@ is not a subscriber."
  217.                 If Exists(t28_5541.s70 + ".not") Then
  218.                   mh5151.To = mh5151.From
  219.                   mh5151.From = t28_5541.s0
  220.                   mh5151.FromId = 0
  221.                   mh5151.Subject = "Your message to " + t28_5541.s0
  222.                   mh5151.Flags = 3
  223.                   mh5151.Network = ""
  224.                   AddMessage(mh5151, t28_5541.s70 + ".not", "", 1213417543)
  225.                   Print "@0C@Sending them a notification message."
  226.                   Delay 0.001
  227.                 End If
  228.  2377           GoTo 252
  229.  2383           Kill "listserv.t2"
  230.                 GetMessageText(mh5151.Number, "listserv.t2")
  231.                 If Exists("listserv.flt") Then
  232.                   Delay 0.001
  233.                   Print "@0D@Checking for lines to filter..."
  234.                   Open "listserv.tmp" For Output As 5
  235.                   Open "listserv.t2" For Input As 6
  236.                   Do
  237.  2480               i5635 = 0
  238.                     Input #6, s5641
  239.                     Open "listserv.flt" For Input As 7
  240.                     Do
  241.  2513                 Input #7, s5637
  242.                       If UCase(s5637) = UCase(s5641) Then
  243.                         i5635 = 1
  244.                       End If
  245.  2549               Loop Until i5635 = 1 Or EOF(7)
  246.                     Close 7
  247.                     If i5635 = 0 Then
  248.                       Print #5, s5641
  249.                     End If
  250.  2599             Loop Until EOF(6)
  251.                   Close 5
  252.                   Close 6
  253.                 Else
  254.  2626             CopyFile("listserv.t2", "listserv.tmp")
  255.                 End If
  256.  2640           Open "listserv.tmp" For Append As 2
  257.                 mh5151.From = LCase(mh5151.From)
  258.                 Print #2, " "
  259.                 Print #2, " "
  260.                 Print #2, "From: "; mh5151.From
  261.                 Close 2
  262.                 If Exists(t28_5541.s70 + ".sig") Then
  263.                   Open "listserv.tmp" For Append As 2
  264.                   Open t28_5541.s70 + ".sig" For Input As 3
  265.                   Do
  266.  2808               Input #3, s4479
  267.                     Print #2, s4479
  268.                   Loop Until EOF(3)
  269.                   Close 2
  270.                   Close 3
  271.                 End If
  272.  2845           Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
  273.                 l5631 = 1
  274.                 s4475 = mh5151.From
  275.                 Do
  276.  2898             Get 2, l5631, s5471 '! 70 bytes
  277.  2913             Do While s5471 = " "
  278.                     l5631 = l5631 + 1
  279.                     Get 2, l5631, s5471 '! 70 bytes
  280.                     If EOF(2) Then
  281.                       GoTo 252
  282.                     End If
  283.  2978             Loop
  284.  2984             mh5151.From = t28_5541.s0
  285.                   If UCase(s5471) <> UCase(s4475) Then
  286.                     mh5151.To = s5471
  287.                     mh5151.Subject = s4471
  288.                     mh5151.Flags = 3
  289.                     mh5151.Network = ""
  290.                     Delay 0.001
  291.                     Print "@0A@Sending '@0F@"; mh5151.Subject; "@0A@' to @0B@"; mh5151.To; " @0A@on@0E@ "; t28_5541.s0
  292.                     AddMessage(mh5151, "listserv.tmp", "", 1213417543)
  293.                     mh5151.Number = l4467
  294.                   End If
  295.  3180             l5631 = l5631 + 1
  296.                 Loop Until l5631 > LOF(2)
  297.                 GoTo 252
  298.               End If
  299.  3218         l5627 = l5627 + 1
  300.               If l5627 > LOF(1) Then
  301.                 GoTo 252
  302.               End If
  303.  3256       Loop
  304.  3262       Delay 0.001
  305.             Print "@0C@Skipping @0F@"; mh5151.Subject; " @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@..."
  306.             Return 
  307.  3317       s4479 = ""
  308.             Kill "templist.sub"
  309.             GetMessageText(mh5151.Number, "templist.sub")
  310.             Open "templist.sub" For Input As 5
  311.             Do
  312.  3372         Input #5, s4479
  313.               s4479 = UCase(s4479)
  314.               i5635 = 0
  315.               i5635 = InStr(s4479, "UNSUBSCRIBE")
  316.               If i5635 > 0 Then
  317.                 s4479 = Mid(s4479, 13, 1213417543)
  318.                 mh5151.To = s4479
  319.                 mh5151.Subject = "UNSUBSCRIBE"
  320.                 Return 
  321.               End If
  322.  3475         i5635 = 0
  323.               i5635 = InStr(s4479, "SUBSCRIBE")
  324.               If i5635 > 0 Then
  325.                 s4479 = Mid(s4479, 11, 1213417543)
  326.                 mh5151.To = s4479
  327.                 mh5151.Subject = "SUBSCRIBE"
  328.                 Return 
  329.               End If
  330.  3560       Loop Until EOF(5)
  331.             Return 
  332.           End If
  333.         End If
  334.       End If
  335.  3572 Print
  336.       Delay 0.001
  337.       Print "@0C@Done sending messages..."
  338.       Kill "listtemp.tmp"
  339.       Kill "listserv.tmp"
  340.       Kill "listserv.t2"
  341.       Kill "listserv.ptr"
  342.       Open "listserv.ptr" For Output As 3
  343.       Print #3, mh5151.Number
  344.       Reset 
  345.       Delay 0.001
  346.       Print "@0D@Rejoining original conference..."
  347.       Join i4483
  348.       Print
  349.       Print
  350.