; msg segment public bulletins public rd.mail public sd.mail public wr.letter bulletins gosub bl.start:goto link.main rd.mail gosub rd.mail0:if a4$=sys$ un=1 goto link.main sd.mail gg=0:gosub snd.mail:goto link.main wr.letter gg=0:s=8:gosub wr.ltr link.main gosub msg.upd:link "a:main.seg","return" link.term gosub msg.upd:link "a:main.seg","term1" link.t2 gosub msg.upd:link "a:main.seg","termin2" ; *** bulletins / e-mail *** bl.start on nocar goto link.term open #1,"b:data3":position #1,80,5:input #1,mn:close gosub bl.ldinf if bf$="" print \"[ This sub-board is temporarily down ]":bb=1:goto bl.start if b1<1 print \"[ Access too low: Requires flag "b3" ]":bb=1:goto bl.start if i$="Q" gosub bl.qscan print \"%> "bn$" <%"\\"Bulletins from 1 to "msg(0) bl.cmd1 if msg(0) goto bl.cmd2 print\"Leave bulletin? (Y/[N]): ";:gosub get.key sb$="":if i$<>"Y" print "No":return print "Yes":gosub bl.post:if not b2 return goto bl.cmd1 bl.cmd2 print \"[B#"bb",1-"msg(0)"]" if clock(2)<>0 print (clock(2)-clock(1))/60":";:i$=str$((clock(2)-clock(1)) mod 60):if len(i$)<2 i$="0"+i$ if not clock(2) i$="00:00" print i$" Option (?) [>";:input i$ a=val(i$):push bl.cmd2 if i$="A" or i$="Q" pop:return if i$="E" goto mail.coms if i$="T" goto hang.up if left$(i$,1)="F" goto bl.fwd if i$="M" goto bl.mrk if i$="N" goto bl.new if i$="K" goto bl.kill if i$="B" goto bl.brws if (i$="C") and (flag(1)) goto bl.config if i$="S" goto bl.scan if i$="G" goto bl.qscan if i$="J" goto bl.jump if i$="L" goto bl.list if left$(i$,1)="J" i$=mid$(i$,2):goto bl.jmp3 if i$="P" sb$="":goto bl.post if (a>0) and (a<=msg(0)) print \s$:goto bl.show if i$<>"?" print \"Invalid Command":return f$="b:msg.menu":gosub show.file:print \"%> "bn$" <%":return hang.up print \"Ready to log-off? (Y/[N]): ";:gosub get.key if i$="Y" print "Yes":pop:pop:goto link.t2 print "No":return mail.coms print ' [R)ead or [S)end E-mail? '; gosub get.key:if i$="R" print "Read":pop:gosub rd.mail0:i$="":goto bl.start if i$="S" print "Send":gg=0:pop:gosub snd.mail:i$="":goto bl.start print "Quit":return bl.config print \"Configure Your Global New-Scan" bl.con push bl.con print \"L)ist, C)hange: ";:gosub get.key if i$="L" print "List":goto bl.list if i$<>"C" print "Quit":pop:return input @2 "Change sub #"a:if (a<1) or (a>tb) return open #1,"f:b."+str$(un):position #1,2,a:input #1,i$ if i$="Y" i$="N":else i$="Y" position #1,2,a:print #1,i$:close if i$="Y" print \"That sub-board is now in your Global Quickscan." if i$="N" print \"That sub-board is no longer in your Global Quickscan." return load.file print "Load a file" input @2 \"File Name (to load):"i$ edit(0):if i$<>"" copy i$,#8 goto editor bl.post if not b2 print \"Sorry, you aren't validated.":return edit(0):if kl goto bl.post2 if msg(0)=mb print \"Sorry, no room on this sub-board.":return if msg(0)=info(1) print \"Sub-board directory full.":return if info(6)<29 print \"Sub-board bit-map full.":return bl.post2 print \"Leave Bulletin"\:if sb$<>"" print "Subj %>" sb$ if sb$="" input @4 "Subj %>" sb$:if sb$="" return a$=a4$:if (un=bs) and (bs$<>"") a$=bs$ if (nb$<>"") and not info(5) a$=a$+" ["+nb$+"]" a$=a$+" (#"+str$(un)+")" if info(5) input @3 "Name %>" i$:if i$<>"" a$=i$ print j2 i$="[Y]/N/X":if info(5) i$=i$+"/L" an=0:print "Correct? ("i$"): ";:gosub get.key:if i$="N" print "No":return if (i$="L") and (info(5)) push j3:goto load.file if i$<>chr$(14) goto j1 print " "chr$(8,21)"Anonymous post? (Y/[N]): ";:gosub get.key:if i$="Y" an=1 if i$<>"Y" print chr$(8,25);chr$(32,25);chr$(8,25);:goto j2 j1 if i$="X" print "X/Ymodem":goto up.xmdm print "Yes":edit(0):gosub editor j3 if not edit(2) return print \"Wait.."; if (kl>0) and (kl<=msg(0)) kill #msg(kb):crunch a=msg(0)+1:if not an print #msg(a),un,sb$ if an print #msg(a),"0",sb$:a$="Anonymous poster" print #6,"Name %>"a$:if an print #6 if not an print #6,"From %>"a3$ gosub date1 if not an print #6,"Date %>"i$\ copy #8,#6:msg(a)=mn:mn=mn+1:update byte(1)=byte(1)+1:print ".saved." f$="f:u."+str$(un):open #1,f$:position #1,5,0 input #1,a:position #1,5,0:print #1,a+1 print "You have now posted "a+1" times." position #1,5,2:input #1,a position #1,5,2:print #1,a+(edit(2)/79):close RETURN if bb<>22 return create "b:wait.data":open #1,"b:wait.data" position #1,150,0:input #1,x x=x+1:position #1,150,0:print #1,x position #1,150,x:print #1,sb$,a4$,sn$,date$" "time$ close:create "b:wait"+str$(x):open #1,"b:wait"+str$(x) copy #8,#1:print #1,"`":close:return bl.new print \"New Bulletins" if nn>msg(msg(0)) print \"No new bulletins":return x=msg(0):if not lr a=1:goto bl.fwd2 bl.new2 if nn=1 a=val(mid$(i$,2)):goto bl.fwd1 print \"Start at [1-"msg(0);:input @2 "] #" a bl.fwd1 if a=0 return if a>msg(0) print \"That bulletin does not exist!":return bl.fwd2 print \s$\"[N] for next bulletin" bl.fwd3 gosub bl.show:if x return if amsg(0) print \"That Bulletin Does Not Exist!":return input #msg(a),x,a$ if flag(4) or (un=bs) goto bl.kill1 if x<>un print \"You Don't Own That Bulletin!":return bl.kill1 print \"Numb %>"a\"Subj %>"a$ print\"Kill this? (Y/[N]): ";:gosub get.key if i$<>"Y" print "No":return print "Yes" bl.kill2 y=msg(msg(0)):kill #msg(a):crunch b=msg(0):if b msg(b)=y update:print \"Bulletin killed...":return bl.brws print \"Browse Titles" input @3 \"Scan for string (=Abort):" m$ a=1:if m$="" return goto bl.scan1 bl.scan print \"Scan Bulletins" print \"Start at [1-"msg(0);:input @3 "] #" a m$="":if a=0 return if a>msg(0) print \"That Bulletin Does Not Exist!":return bl.scan1 input @2 \"Allow marking? " i$ ms=0:if i$="Y" ms=a d=0:x=15:print:z=flag:flag=ram2 bl.scan2 a$=" ":if msg(a)>nn a$=">" flag(a-ms)=0:input #msg(a),b,t$ if m$ if not instr(m$,t$) goto bl.scan3 x=x-1:d=d+1:print a$a". "t$ if i$<>"Y" goto bl.scan3 print "Mark Y/N/Q? ";:get a$:print if a$="Q" goto bl.scan4 flag(a-ms)=(a$="Y") bl.scan3 a=a+1:if a>msg(0) goto bl.scan4 if x goto bl.scan2 input @2 \"More? " a$ if a$="Y" print:x=15:goto bl.scan2 bl.scan4 me=a:flag=z:if not d print "Sorry, no match.":ms=0:return if i$="Y" goto bl.mrk return bl.jump print \"Jump to which sub-board? [1-"ab",?] #";:input @2 i$ bl.jmp3 a=val(i$) if (a>0) and (a<=ab) pop:bb=a:goto bl.start if i$<>"?" pop:bb=1:goto bl.start push bl.jump bl.list print \s$\:open #1,"b:data2":open #2,"f:b."+str$(un) for x=1 to ab:position #1,128,x+8 input #1,a$\b$\a:position #2,2,x:input #2,i$ if i$="N" x$=")":else x$="]" b=1:if a b=flag(a) setint(1):if b and (b$<>"") print "["x;x$" "a$ if key(1) setint(""):x=ab next:close #1:close #2: print \"Note: A ']' indicates that sub is in your Global Quickscan." return bl.qscan ob=bb:bb=1:print \"Global Quickscan" open #1,"f:b."+str$(un):clear #10 for a=1 to tb:position #1,2,a:input #1,a$ print #10,a$:next:close:mark(10)=0 bl.qs2 input #10,a$:if a$<>"Y" goto bl.qs4 gosub bl.ldinf:if b1<1 goto bl.qs4 print \"Scanning sub-board #"; i$="":a$=right$("0"+str$(bb),2) open #1,"l:messages":position #1,40,bb:input #1,o$:close print a$" : "o$; if (bf$="") or (msg(0)=0) goto bl.qs4 if nn>msg(msg(0)) goto bl.qs4 gl=1:gosub bl.new:x$="Y" bl.qs4 bb=bb+1:if bb>ab print \\"[ Global New-Scan Completed ]":goto bl.qs5 if x$="Y" print \"Leave bulletin? (Y/[N]): ";:gosub get.key:if i$="Y" print "Yeah":o$="Y":sb$="":gosub bl.post if (x$="Y") and (o$<>"Y") print "Nope" x$="":goto bl.qs2 bl.qs5 if i$="" print bb=ob:gl=0:goto bl.ldinf bl.show if nn<=msg(a) nn=msg(a)+1 x=0:if lr<=msg(a) lr=msg(a)+1 bl.show1 input #msg(a),d,sb$:setint(2) print #x,\"Numb %>"a" of "msg(0)\"Subj %>"sb$ copy #6,#x:x=0:setint("") if key(1) x=1:return if key(2) return bl.show2 if i$="+" return print if clock(2)<>0 print (clock(2)-clock(1))/60":";:i$=str$((clock(2)-clock(1)) mod 60):if len(i$)<2 i$="0"+i$ if not clock(2) i$="00:00" print i$" Read command: "; get1 gosub get.key if i$="?" setint(1):print 'Menu [A]uto-reply [B]ack one bulletin [N]ext (or RETURN) [R]e-read [S]kip this sub-board [+] Nonstop read [Q]uit':setint(""):goto bl.show2 if i$="N" or i$=chr$(13) or i$="+" print "Next":return if (i$="B") and (a>1) print "Back":a=a-1:goto bl.show if (i$="S") and gl pop:print "Skip":return if (i$="Q") and gl bb=1:pop:pop:pop:print "Quit":gl=0:i$="":goto bl.start if i$="Q" x=1:print "Quit":return if i$="R" print "Re-read":goto bl.show if (i$="P") and info(5) x=5:goto bl.show1 if i$="A" print "Auto-reply":goto bl.show5 if (d<>un) and (not flag(4)) goto get1 if i$="E" goto bl.show4 if (i$="W") and info(5) goto bl.show7 if i$<>"K" goto get1 print "Kill"\\"Are you sure? (Y/[N]): ";:gosub get.key if i$<>"Y" print "No":goto get1 print "Yes":gosub bl.kill2:a=a-1:return bl.show4 print "Edit"\\"Are you sure? (Y/[N]): ";:gosub get.key if i$<>"Y" print "No":goto bl.show2 print "Yes":edit(0):input #msg(a),a$\b$\i$\b:copy #6,#8 edit(1):if not edit(2) goto bl.show2 x=msg(a):kill #msg(a):print #msg(a),a$\b$\i$\ copy #8,#6:msg(a)=x:update:goto bl.show2 bl.show5 print \"Is this a private letter? (Y/[N]): ";:gosub get.key if i$="Y" print "Yes":goto bl.show6 print "No":if left$(sb$,3)<>"Re:" sb$="Re: "+sb$ b=a:gosub bl.post:a=b-1:goto bl.show2 bl.show6 if a=0 print \"Sorry, anonymous poster.":goto bl.show2 edit(0):gosub editor:if not edit(2) goto bl.show2 h$=" -%> Reply to a Bulletin <%-" print:s=8:gg=0:gosub wr.ltr ready bf$:goto bl.show2 bl.show7 input @2 \\"Filename (to write):" i$ if i$="" goto bl.show2 create i$:open #1,i$:append #1 copy #msg(a),#1:close:goto bl.show2 bl.ldinf if bb=0 bf$="":bl=0:return me=0:if bl=bb ready bf$:return bl=bb:open #1,"b:data2" mark(1)=1120:input #1,ab if bb>ab close:bf$="":bl=0:return position #1,128,bb+8 input #1,bn$\bf$\b3,b4\bs,bs$\mb,kl,kb b1=1:if b3 b1=flag(b3) b2=1:if b4 b2=flag(b4) close:if bf$="" bl=0:return if b1 ready bf$:nn=nb return ; read e-mail rd.mail0 on nocar goto link.term print:if un=0 print "Guests can not receive mail.":return if flag(4) input @2 "Mail for user #"un:print:if un=0 un=1 ready "e:mail":r1=msg(un):print " Total e-mail: "r1 ready "e:gmail":r2=msg(un):print "Total system mail: "r2 if (r1<1) and (r2<1) print \"You have no mail.":return if (r1<>0) and (r2<>0) goto rd.mail1 if r1 a$="e:mail":print \"Reading e-mail":ma=1 if r2 a$="e:gmail":print \"Reading system mail":ma=2 goto automail rd.mail1 print \"Read: [1) User e-mail or [2) System mail? ";:gosub get.key ma=val(i$):if (ma<1) or (ma>2) print "Quit":return print ma:if ma=1 a$="e:mail":else a$="e:gmail" automail ready a$:ready #msg(un) rd.mail2 x=0:input #7,i$:d=val(i$):if i$ goto rd.mail3 if ma=1 m1=1:r1=0 if ma=2 m2=1:r2=0 print \"[ No more mail ]":if (r1<>0) or (r2<>0) goto rd.mail1 return rd.mail3 print #x,\md$:setint(2):copy #7,#x setint(""):print #x,md$ if key(2) goto rd.mail2 rd.mail4 print \"Mail command? "; rd.mail5 gosub get.key if i$<>"?" goto rd.menu1 setint(1):print 'Menu [A]uto-reply [N]ext (or RETURN) [R]e-read [F]orward letter [Q]uit' if info(5) print '[P]rint [W]rite to disk' setint(""):goto rd.mail4 rd.menu1 if i$=chr$(13) or i$="C" or i$="N" print "Next":goto rd.mail2 if i$="Q" print "Quit":return if i$="R" rewind:x=0:print "Re-read":goto rd.mail3 if (i$="P") and info(5) rewind:x=5:print "Print":goto rd.mail3 if (i$="W") and info(5) print "Write":goto wr.mail if i$="F" print "Forward letter":goto forward if i$<>"A" goto rd.mail5 print "Auto-reply" if d=0 print \"Sorry, anonymous sender.":goto rd.mail4 edit(0):gosub editor:if not edit(2) goto rd.mail4 print:h$="":s=8:gg=0:gosub wr.ltr:goto rd.mail2 wr.mail input @2 \"Filename (to write): "i$:if i$="" goto rd.mail4 create i$:rewind:open #1,i$:input #7,i$ append #1:copy #7,#1:close:goto rd.mail4 forward print \"Forward Letter" fx=d:gg=0:an=0:gosub mail.who if not d d=fx:goto rd.mail4 rewind:s=7 h$=" -%> A Forwarded Letter <%-" gosub snd.bulk d=fx:goto rd.mail4 ; send e-mail snd.mail on nocar goto link.term if not flag(1) print \"Unvalidated users cannot send mail.":return an=0:h$="" gg=0:print \"Send Electronic Mail" gosub mail.who:if d<1 return if info(5)=0 goto snd.m1 print \"Load from file? ";:gosub get.key if i$<>"Y" print "No":goto snd.m1 print "Yes"\:gosub load.file:goto snd.m2 snd.m1 edit(0):gosub editor snd.m2 if edit(2)=0 close #2:return s=8:goto snd.bulk mail.who print \"To who [1-"nu;:input @2 ",B,Q,?]: " i$ if (i$="") or (i$="Q") d=0:return if i$="?" f$="b:mail.hlp":gosub show.file:goto mail.who kill "l:bulk":create "l:bulk":open #2,"l:bulk if i$="B" goto bulk gosub mail.wh2:if i$<>"." d4$=a$+" "+i$:else d4$=a$ position #2,80,0:print #2,d,d4$:return bulk print \"Bulk Mailing":x=1 y=5:gg=1:if flag(3) y=25 bulk1 input @2 \"Send copy to [#,]:" i$ if i$="" d=0:if x=1 return bb=1:h$=" -%> Bulk Mail <%-" if i$ gosub mail.wh2:if d=0 goto bulk1 if i$<>"." d4$=a$+" "+i$:else d4$=a$ position #2,80,x-1:print #2,d,d4$ x=x+1:if d if xnu) goto snd.usr2 open #1,"b:users" position #1,64,d:input #1,a$,i$:close #1 if a$="" goto snd.usr2 print \"Send to "a$" "i$"? ";:a=len(a$+i$) x$=i$:gosub get.key if i$=chr$(14) goto snd.anon if i$<>"Y" d=0:print "No":else print "Yes":i$=x$ return snd.anon print chr$(8,12+a);chr$(32,12+a);chr$(8,12+a); print "Anonymous letter"; if gg print "s? ";:else print "? "; gosub get.key:if i$="N" i$=x$:an=0:print "No":return an=1:i$=x$:print "Yes":return ; write a bunch of letters to disk snd.bulk x=0:print snd.blk2 position #2,80,x:input #2,d,d1$ if d=0 close #2:return x=x+1:if s=7 rewind gosub wr.ltr:goto snd.blk2 ; write the letter to disk wr.ltr open #1,"b:users":position #1,64,d input #1,d1$,d2$:close #1 if d2$<>"." d4$=d1$+" "+d2$:else d4$=d1$ ready "e:mail" if info(6)<29 print \"Mail bit-map full":return print "Mailing "d4$"'s "; a=msg(d)+1:print a;:if a>3 i$="th ":goto ltrs i$=" st nd rd th ":i$=mid$(i$,a*3,3) ltrs print i$"letter." if an=0 print #msg(d),un:else print #msg(d),0 if h$ print #6,h$\ print #6,"Letter From -%>"; if an=0 print #6,a4$;:if nb$ print #6," ["nb$"]"; if (an) and (d<>1) print #6,"Anonymous sender!" if (an) and (d=1) print #6,"Sent anonymously from "a4$ if an=0 print #6," (#"un")" print #6,"Date Mailed -%>";:gosub date1 if an=0 print #6,i$:else print #6,"Witheld" if not gg goto wr.ltr1 print #6," Also To -%>"; gf=0 wr.ltr2 position #2,80,gf:input #2,y,d4$ if y=0 position #2,80,x:print #6,chr$(8,2)". ":goto wr.ltr1 if y<>d print #6,d4$", "; gf=gf+1:goto wr.ltr2 wr.ltr1 print #6,"" copy #s,#6:print #msg(d),chr$(4);chr$(0); msg(d)=msg(d)+1:update:return ; *** sub - routines *** editor print \"Enter message now, "edit(3)" col, 4k bytes max "; print ".s = save|.h = help|'done' to edit msg." cl=clock(2):clock(2)=0:edit(1):clock(2)=cl:return msg.upd open #1,"b:data3":position #1,80,5:print #1,mn:close return ; show a disk file show.file setint(1):print \s$\:open #1,f$:if mark(1) close #1:return showfl2 copy (20) #1 if eof(1) or key(1) setint(""):close #1:return if not flag(35) goto showfl2 print "Press [RETURN] ";:get i$:if i$=chr$(13) print " "; print chr$(8,16);chr$(32,16);chr$(8,16); if i$=" " setint(""):close #1:return setint(1):goto showfl2 lower.case if len(i$)=1 ab$=i$:return ab$=left$(i$,1):for wy=2 to len(i$):wx=asc(mid$(i$,wy,1)) if wx=32 ab$=ab$+" "+mid$(i$,wy+1,1):wy=wy+1:next:return if (wx<65) or (wx>96) ab$=ab$+chr$(wx):next:return ab$=ab$+chr$(wx+32):next:return up.xmdm print \"Ready to receive" f$="l:msg":use "b:protocol.up",255,0,f$ edit(0):copy f$,#8:kill f$:edit(1):goto j3 date1 q=val(left$(date$,2)):q1=val(mid$(date$,4,2)):q2=val(right$(date$,2)) m$="000031059090120151181212243273304334":if q>1 q3=val(mid$(m$,q*3-2,3)) q1=q1+q3:m$="46012456":q1=q1+val(mid$(m$,8-(94-q2),1)):q1=q1 mod 7 m$="BobMonTueWedThuFriSat":if q1>1 td$=mid$(m$,q1*3-2,3):else td$="Sun" ml$="085534469788":q3=0:for q4=1 to q-1:q3=q3+val(mid$(ml$,q4,1):next mt$="FebruaryMarchAprilMayJuneJulyAugustSeptemberOctoberNovemberDecember" if q>1 m$=mid$(mt$,q3+1,val(mid$(ml$,q4+1,1))):else m$="January" min$=mid$(time$,4,2):if len(time$)>8 tm$=time$:goto date2 if val(left$(time$,2))<12 tm$=left$(time$,2)+":"+min$+"AM":goto date2 q4=val(left$(time$,2)):tm$=str$(12-(24-q4))+":"+min$+"PM" date2 i$=td$+", "+m$+" "+mid$(date$,4,2)+" "+tm$ return get.key ww=0:wx=0 get.key1 gf=clock(2) if (gf<>0) and (clock(1)>gf) print \\"[ Time Limit Exceeded ]":pop:goto link.term gf=peek(-16384):if (gf=129) or (gf=150) get i$:print chr$(8);:return gf=key(0):if (gf>96) and (gf<123) gf=gf-32 if (gf>31) or (gf=13) or (gf=14) i$=chr$(gf):return ww=ww+1:if flag(33)=0 goto get.key2 wx=wx+1:if wx>16 wx=1 print mid$("!/-\!/-\!\-/!\-/",wx,1);chr$(8); get.key2 if ww=2000 print chr$(7,2); if ww=4000 pop:goto link.term if (not info(0)) and (not info(5)) and (eu<>1) pop:goto link.term goto get.key1