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 >
Wrap
Wildcat! WCX
|
1995-01-09
|
5KB
|
350 lines
'! Decompiled with wccNosy version 4.20f (freeware)
'! Input File: in.wcx 5481 bytes 12/30/122 04:12:10pm
'! Code Segment Size :3721 bytes
'! Data Segment Size :5645 bytes
'! String Segment Size:1760 bytes
'! Compiled with WCC version 4.01
Type Type28
s0 As String*70
s70 As String*8
End Type
Type Type27
Filler0(1 To 4) As Byte
w4 As Word
End Type
Type Type26
Filler0(1 To 661) As Byte
w661 As Word
End Type
Dim l4463 As Long
Dim l4467 As Long
Dim s4471 As String
Dim s4475 As String
Dim s4479 As String
Dim i4483 As Integer
Dim t26_4485 As Type26
Dim mh5151 As MessageHeader
Dim s5471 As String*70
Dim t28_5541 As Type28
Dim l5627 As Long
Dim l5631 As Long
Dim i5635 As Integer
Dim s5637 As String
Dim s5641 As String
Cls
Print "@0F@Listserv v2.11 (01/09/95) - by Pete Nelson"
Print "Terminal One BBS (510) 673-9217"
Print "Author: pete@terminal-one.com"
Print
Delay 1
MorePrompt(0)
If Not Exists("listserv.cfg") Then
Print
Print "@0C@You need to create the LISTSERV.CFG file first!"
Print
Else
120 Open "listserv.cfg" For Input As 1
Input #1, l4463
Reset
i4483 = t26_4485.w661
Join l4463
If Not Exists("listserv.dat") Then
Print
Print "@0C@You need to run Listutil to create a list of your mailing lists."
Else
207 Open "listserv.ptr" For Input As 1
Input #1, l4463
Reset
mh5151.Number = l4463
252 Reset
If Not GetNextMessage(mh5151) Then
Else
275 l5627 = 1
l5631 = 1
s4471 = mh5151.Subject
l4467 = mh5151.Number
mh5151.Subject = UCase(mh5151.Subject)
mh5151.To = UCase(mh5151.To)
Do
363 Reset
If mh5151.To = "LISTSERV" Then
If mh5151.Flags >= 1536 Then
Delay 0.001
Print "@0C@Skipping message flagged as deleted @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@..."
GoTo 252
End If
451 GoSub 3317
End If
457 Open "listserv.dat" For Random As 1 Len = 78 '! This value should probably be replaced with a "SizeOf" expression
Get 1, l5627, t28_5541 '! 78 bytes
If mh5151.To = t28_5541.s0 Then
If mh5151.Flags >= 1536 Then
Delay 0.001
Print "@0C@Skipping message flagged as deleted @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@..."
GoTo 252
End If
578 i5635 = 0
i5635 = InStr(mh5151.Subject, "WARNING FROM UUCP")
If i5635 > 0 Then
GoSub 3262
GoTo 252
End If
633 i5635 = 0
i5635 = InStr(mh5151.Subject, "UNDELIVERABLE")
If i5635 > 0 Then
GoSub 3262
GoTo 252
End If
688 i5635 = 0
i5635 = InStr(mh5151.Subject, "UNKNOWN HOST")
If i5635 > 0 Then
GoSub 3262
GoTo 252
End If
743 i5635 = 0
i5635 = InStr(mh5151.Subject, "EXECUTION FAILED")
If i5635 > 0 Then
GoSub 3262
GoTo 252
End If
798 i5635 = 0
i5635 = InStr(mh5151.Subject, "HOST UNKNOWN")
If i5635 > 0 Then
GoSub 3262
GoTo 252
End If
853 If mh5151.Subject = "" Then
Delay 0.001
Print "@0C@Skipping message with blank subject @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@..."
GoTo 252
End If
917 If mh5151.Subject = "SUB" Or mh5151.Subject = "SUBSCRIBE" Then
l5631 = 1
Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
Do
998 Get 2, l5631, s5471 '! 70 bytes
If s5471 = mh5151.From Then
Delay 0.001
Print "@0F@"; s5471; "@0A@ is already subsribed to@0B@ "; t28_5541.s0; "@0A@."
GoTo 252
End If
1090 l5631 = l5631 + 1
Loop Until l5631 > LOF(2)
Close 2
s5471 = mh5151.From
Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
Put 2, LOF(2) + 1, s5471 '! 70 bytes
Close 2
Delay 0.001
Print "@0A@Subscribed@0F@ "; mh5151.From; "@0A@ to@0B@ "; t28_5541.s0; "@0A@."
If Exists(t28_5541.s70 + ".add") Then
Delay 0.001
Print "@0D@Sending a thank you response...@0A@"
Open "listtmpa.tmp" For Append As 2
Open t28_5541.s70 + ".add" For Input As 3
Do
1345 Input #3, s4479
Print #2, s4479
Loop Until EOF(3)
Close 3
Close 2
mh5151.To = mh5151.From
mh5151.From = t28_5541.s0
mh5151.Subject = "Thanks for Subscribing!"
mh5151.Flags = 3
mh5151.Network = ""
AddMessage(mh5151, "listtmpa.tmp", "", 1213417543)
mh5151.Number = l4467
Kill "listtmpa.tmp"
End If
1504 GoTo 252
End If
1510 If mh5151.Subject = "UNSUBSCRIBE" Or mh5151.Subject = "UNSUB" Then
Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
s5471 = " "
l5631 = 1
Do
1602 Get 2, l5631, s5471 '! 70 bytes
s5471 = UCase(s5471)
If s5471 = mh5151.From Then
s5471 = " "
Put 2, l5631, s5471 '! 70 bytes
GoTo 1720
End If
1688 l5631 = l5631 + 1
Loop Until l5631 > LOF(2)
1720 Close 2
Delay 0.001
Print "@0C@Unsubscribed@0F@ "; mh5151.From; "@0C@ from @0B@"; t28_5541.s0; "@0C@."
If Exists(t28_5541.s70 + ".drp") Then
Delay 0.001
Print "@0D@Sending an unsubscription message..."
Open "listtmpu.tmp" For Append As 2
Open t28_5541.s70 + ".drp" For Input As 3
Do
1871 Input #3, s4479
Print #2, s4479
Loop Until EOF(3)
Close 2
Close 3
mh5151.To = mh5151.From
mh5151.From = t28_5541.s0
mh5151.Subject = "Unsubscription Request"
mh5151.Flags = 3
mh5151.Network = ""
AddMessage(mh5151, "listtmpu.tmp", "", 1213417543)
mh5151.Number = l4467
Kill "listtmpu.tmp"
End If
2030 GoTo 252
End If
2036 Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
Do
2068 Get 2, l5631, s5471 '! 70 bytes
If s5471 = mh5151.From Then
Close 2
GoTo 2383
End If
2118 l5631 = l5631 + 1
Loop Until l5631 > LOF(2)
Delay 0.001
Print "@0C@Skipping @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@. @0F@"; mh5151.From; "@0C@ is not a subscriber."
If Exists(t28_5541.s70 + ".not") Then
mh5151.To = mh5151.From
mh5151.From = t28_5541.s0
mh5151.FromId = 0
mh5151.Subject = "Your message to " + t28_5541.s0
mh5151.Flags = 3
mh5151.Network = ""
AddMessage(mh5151, t28_5541.s70 + ".not", "", 1213417543)
Print "@0C@Sending them a notification message."
Delay 0.001
End If
2377 GoTo 252
2383 Kill "listserv.t2"
GetMessageText(mh5151.Number, "listserv.t2")
If Exists("listserv.flt") Then
Delay 0.001
Print "@0D@Checking for lines to filter..."
Open "listserv.tmp" For Output As 5
Open "listserv.t2" For Input As 6
Do
2480 i5635 = 0
Input #6, s5641
Open "listserv.flt" For Input As 7
Do
2513 Input #7, s5637
If UCase(s5637) = UCase(s5641) Then
i5635 = 1
End If
2549 Loop Until i5635 = 1 Or EOF(7)
Close 7
If i5635 = 0 Then
Print #5, s5641
End If
2599 Loop Until EOF(6)
Close 5
Close 6
Else
2626 CopyFile("listserv.t2", "listserv.tmp")
End If
2640 Open "listserv.tmp" For Append As 2
mh5151.From = LCase(mh5151.From)
Print #2, " "
Print #2, " "
Print #2, "From: "; mh5151.From
Close 2
If Exists(t28_5541.s70 + ".sig") Then
Open "listserv.tmp" For Append As 2
Open t28_5541.s70 + ".sig" For Input As 3
Do
2808 Input #3, s4479
Print #2, s4479
Loop Until EOF(3)
Close 2
Close 3
End If
2845 Open t28_5541.s70 + ".dat" For Random As 2 Len = 70 '! This value should probably be replaced with a "SizeOf" expression
l5631 = 1
s4475 = mh5151.From
Do
2898 Get 2, l5631, s5471 '! 70 bytes
2913 Do While s5471 = " "
l5631 = l5631 + 1
Get 2, l5631, s5471 '! 70 bytes
If EOF(2) Then
GoTo 252
End If
2978 Loop
2984 mh5151.From = t28_5541.s0
If UCase(s5471) <> UCase(s4475) Then
mh5151.To = s5471
mh5151.Subject = s4471
mh5151.Flags = 3
mh5151.Network = ""
Delay 0.001
Print "@0A@Sending '@0F@"; mh5151.Subject; "@0A@' to @0B@"; mh5151.To; " @0A@on@0E@ "; t28_5541.s0
AddMessage(mh5151, "listserv.tmp", "", 1213417543)
mh5151.Number = l4467
End If
3180 l5631 = l5631 + 1
Loop Until l5631 > LOF(2)
GoTo 252
End If
3218 l5627 = l5627 + 1
If l5627 > LOF(1) Then
GoTo 252
End If
3256 Loop
3262 Delay 0.001
Print "@0C@Skipping @0F@"; mh5151.Subject; " @0B@(@07@#@0E@"; mh5151.Number; "@0B@)@0C@..."
Return
3317 s4479 = ""
Kill "templist.sub"
GetMessageText(mh5151.Number, "templist.sub")
Open "templist.sub" For Input As 5
Do
3372 Input #5, s4479
s4479 = UCase(s4479)
i5635 = 0
i5635 = InStr(s4479, "UNSUBSCRIBE")
If i5635 > 0 Then
s4479 = Mid(s4479, 13, 1213417543)
mh5151.To = s4479
mh5151.Subject = "UNSUBSCRIBE"
Return
End If
3475 i5635 = 0
i5635 = InStr(s4479, "SUBSCRIBE")
If i5635 > 0 Then
s4479 = Mid(s4479, 11, 1213417543)
mh5151.To = s4479
mh5151.Subject = "SUBSCRIBE"
Return
End If
3560 Loop Until EOF(5)
Return
End If
End If
End If
3572 Print
Delay 0.001
Print "@0C@Done sending messages..."
Kill "listtemp.tmp"
Kill "listserv.tmp"
Kill "listserv.t2"
Kill "listserv.ptr"
Open "listserv.ptr" For Output As 3
Print #3, mh5151.Number
Reset
Delay 0.001
Print "@0D@Rejoining original conference..."
Join i4483
Print
Print