00001 declare all integer*4 00002 option base 1 00004 def LEFT$(A$,I)=A$(1:I) 00005 declare integer*4 AC0,AC1,AC2,LASTR,R 00006 declare integer*2 JP 00010 margin 0 00020 dim COMMAND$*258,BUFFER$*258,L$*32000,LB$*32000,TXT$*122,N$*200,JOIN$*3200,NC$*800,FILENAME$*258,AR$*256,TJOIN$*3200,CAP$*80,C$*256,TEMP$*1000,STV$*3200 00025 dim FK$(75)*100,FK2$(75),RM$(100) 00026 mat FK$=nul$ 00027 let CAP$="" 00028 mat FK2$=nul$ 00030 let USRF$=":SDD:UDD:250.BLAZE:USERS.HDG" 00032 let MSGF$=":SDD:UDD:250.BLAZE:MSGHDR.HDG" 00033 let TXTF$=":SDD:UDD:250.BLAZE:MSGTXT.HDG" 00035 let HDGHELP$=":SDD:UDD:250.BLAZE:HDG.HELP" 00040 let HDGACL$="PER.STONEY,OWARE 280.STONEY,OWARE +,WR" 00050 let REVEALCODES=0 00100 let VER$="v3.8" 00105 let PROMPT$="HDG> " 00107 who into A$ 00109 let PRV=0 00111 let PRG$=A$(31:len(A$)-1) 00113 let PID=val(A$(5:8)) 00115 let A$=ltrm$(A$(8:len(A$))) 00117 let I=pos(A$,":") 00119 let UN$=A$(1:I-1) 00121 let JOIN$="" 00123 map integer*4 BYTE_PTR(2); integer*2 ARG_NUM,CONTROL_WRD 00125 let AC0,AC1=0 00127 let CONTROL_WRD=1 00129 let COMMAND$=rpt$(" ",256) 00131 let BYTE_PTR(2)=addr(COMMAND$) 00133 let AC2=addr(CONTROL_WRD) 00135 let I=sys("GTMES",AC0,AC1,AC2) 00137 let COMMAND$=rtrm$(COMMAND$) 00140 let RM$(1)="Main Lobby;Public Meeting Place" 00141 let RM$(3)="Switchboard;Casual Communication" 00142 let RM$(2)="Front Desk;Question and Answer Forum for the Hotel" 00143 let RM$(4)="Computer Room;Mainframe Headquarters" 00145 let RM$(6)="The Bar;Social Place" 00147 let RM$(10)="Confrence Room A;Room for meetings" 00148 let RM$(11)="Confrence Room B;Room for meetings" 00149 let RM$(12)="Confrence Room C;Room for meetings" 00150 let RM$(69)="Meat Market;Meet New People" 00151 let RM$(86)="Planet Earth;Conversation Between Nations" 00152 let RM$(100)="Last Resort;If All Else Fails - Hide Here" 00155 let RM$(80)="Honeymoon Suite;Secret Hide-A-Way" 00156 let RM$(81)="Presidential Suite;For the self-appointed VIP" 00157 let RM$(50)="Pool Party;Skimpy Bathing Suits Welcome" 00158 let RM$(51)="Casino;Take A Gamble" 00160 let RM$(90)="Anonymous Room;No telling who's talking" 00161 let RM$(91)="PickUp Palace;No telling who's talking" 00170 let RM$(40)="Prince's Palace;Lots Of Soft Pillows" 00171 let RM$(41)="Swamp;Democrats and M*A*S*H Fans" 00172 let RM$(42)="Ronnie's Revenge;Republican Wishing Well" 00300 print chr$(18);chr$(15);chr$(2);chr$(29);chr$(21);chr$(30);"FFHDG (c)Copyright 1988, 1989 by CompLink";tab(70);date$;" ";time$;chr$(10) 00301 let MU$="" 00302 let MUPET,MUPID=0 00310 print VER$;tab(7); 00311 if UN$(1:4)="FAC." then print "-- developed under contract --" else print "(c)Copyright 1988, 1989 Wizard Workshop and Company" 00320 print chr$(10);"* Welcome to the Hotel Data General *";chr$(10);"- You can log out anytime you like, but you can never leave. -" 00321 enable handler RESM, resume at 00326 00322 characteristics "ON","8BT","OFF","ST" 00323 linput wait 1, bytes 5, noecho, prompt chr$(30)&chr$(27)&chr$(0):MU$ 00326 if MU$(1:1)<>chr$(6) or MU$(5:5)<>chr$(6) then 00350 00327 let MUPET=ord(MU$(2:2)) 00328 let MUPID=ord(MU$(3:3))*256+ord(MU$(4:4)) 00329 if MUPET>0 then print chr$(140);chr$(2);chr$(30);chr$(128);chr$(7);"* Thank You For Using Mupet! Membership Has Its Privileges *";chr$(129);chr$(140);chr$(0);chr$(0) 00330 if MUPET>0 then let PROMPT$=chr$(128)&chr$(15)&"HDG>"&chr$(129)&" " 00332 if MUPET>0 and MUPET<65 then print chr$(128);chr$(141);"You are using an old version of Mupet! Upgrade to Version 2.2";chr$(129) 00350 if MUPET=0 then characteristics "OFF","8BT","ON","ST" 00351 if pos(COMMAND$,"NOA")>0 then 00400 00352 if MUPET>1 then print chr$(150); 00353 print chr$(10);chr$(10) 00355 if MUPET>0 then type ":SDD:UDD:280.STONEY:HDG.ANNOUNCE.MUPET" else type ":SDD:UDD:280.STONEY:HDG.ANNOUNCE" 00356 if MUPET>0 then print chr$(128);chr$(80); 00357 if MUPET>1 then print chr$(151) 00360 linput prompt "-press a key-", bytes 1, noecho, wait 60:C$ 00361 print chr$(13);chr$(11); 00362 if MUPET>0 then print chr$(129);chr$(142);chr$(8);chr$(0);chr$(140);chr$(0);chr$(0); 00400 enable handler RESM, resume at 00600 00401 print chr$(13);chr$(11); 00410 close 00411 rem STAT%(1:1)= "T"opic "M"essage " "deleted 00413 rem STAT%(3:3)= " "unread "R"ead by owner 00420 open #1:USRF$ direct, internal, outin, begin, shared,fixed 250 00430 map JOINFILE%*60;MACROFILE%*60;PRV%*5;UN%*15;LL%*17;RN%*30;HD%*16;CS%*4; integer*2 XPID,RM,CC,CI(5),MYQUOTE,MYREMINDER,CURTOP,CURMSG 00440 enable handler RESM, resume at 00570 00441 let MAIL=-1 00450 open #3:TXTF$ direct, internal, outin, shared,fixed 128 00455 map TXT%*122; integer*4 LNK 00456 open #2:MSGF$ direct, internal, outin, shared,fixed 158 00457 map SBJ%*80;STAT%*5; integer*4 MTO,MFR,MNUM,NMSG,PMSG,NTOP,PTOP,MTXT,TINV,TBOU;MSD%*18;PSWD%*6 00500 let USER=0 00501 let LL$=date$&" "&time$ 00502 enable handler RESM, resume at 00630 00505 let USER=USER+1 00510 input #1 eof 00630, record USER data 00430 00515 if rtrm$(UN%)=UN$ then 00700 00520 goto 00505 00570 enable handler RESM, resume at 00590 00572 create MSGF$ replace 00575 create TXTF$ replace 00576 acl TXTF$,HDGACL$ 00577 acl MSGF$,HDGACL$ 00580 print "%HDG-Information, Creating message files" 00581 enable handler RESM, resume at 00583 00582 close #2 00583 enable handler RESM, resume at 00450 00584 close #3 00585 goto 00450 00590 print "%HDG-Information, Unable to access messages. No message facility available." 00592 let MAIL=0 00596 goto 00500 00600 enable handler RESM, resume at 00620 00610 create USRF$ replace 00611 acl USRF$,HDGACL$ 00612 print "%HDG-Information, Created new user database on ";date$;" ";time$ 00613 let PRV=-1 00615 goto 00410 00620 print "Sorry, it would appear this service is not available right now." 00625 goto 09999 00630 print chr$(10);"Welcome to the Hotel Data General. Please check in.";chr$(10);chr$(10);"Please use your real name or you will no longer be allowed to use HDG.";chr$(10) 00631 enable handler RESM, resume at 09999 00632 let I,CURTOP,CURMSG=0 00633 linput eof 09999, prompt "(Use Upper and Lower Case)"&chr$(10)&"First and Last Name: ":RN$ 00634 let RN$=ltrm$(rtrm$(RN$)) 00635 if RN$="" then 00636 if I=-1 then 09999 00637 let I=-1 00639 print "Before you may use the facilities we must have you as a logged guest." 00640 goto 00633 00641 end if 00642 if len(RN$)>len(RN%) then 00643 print "Your registered name was too long for our books. Please try again." 00644 goto 00633 00645 end if 00648 enable handler RESM, resume at 00691 00650 let UN%=UN$ 00652 let XPID=PID 00654 let LL%=LL$ 00656 let CC,RM,CI(1),CI(2),CI(3),CI(4),CI(5),MYQUOTE,MYREMINDER=0 00658 let RN%=RN$ 00660 let CS%,HD%,MACROFILE%="" 00662 let JOINFILE%="HDG.OLDMSG" 00676 if PRV then let PRV%="M I" else let PRV%=" I" 00678 print "Thank you. Please enjoy your stay.";chr$(10) 00679 output #1 record USER data 00430 00680 if PRV then print "%HDG-Information, You are now the Hotel Manager.";chr$(10) 00690 goto 00700 00691 print "%HDG-Internal Error, File field lengths do not match map data types" 00692 goto 09999 00700 characteristics "On","Fkt","Off","Nrm" 00701 let RN$=rtrm$(RN%) 00702 print "[";UN$;"] ";RN$ 00703 if XPID<>0 and XPID<>PID and pos(COMMAND$,"BOUNCE")=0 then 00704 print "%HDG-Fatal, Management reports that you never checked out of the hotel.";chr$(10);" Another process under your username may be in the hotel.";chr$(10);" Use HDG BOUNCER to call the bouncer and kick him out." 00705 goto 09999 00706 end if 00707 if PRV%(1:1)="S" then 00708 print chr$(7);"You have been suspended from using the Hotel. Please see the hotel manager.";chr$(10);"Note that unauthorized use of this facility will result in an acedemic";chr$(10);"integrity violation." 00709 goto 09910 00710 end if 00711 let ALIAS$=rtrm$(ltrm$(HD%)) 00715 let NC$="" 00740 let XPID=PID 00741 if MUPET>0 then print chr$(128);chr$(14); 00742 let LL$=date$&" "&time$ 00744 print "Last Checked Out: ";LL%;" Check In Time: ";LL$ 00745 if MUPET>0 then print chr$(129);chr$(140);chr$(0);chr$(0); 00746 let LL%=LL$ 00748 let PRV%(5:5)="I" 00750 output #1 record USER data 00430 00752 let FILENAME$=rtrm$(MACROFILE%) 00754 if FILENAME$<>"" then gosub 02450 00755 gosub 09600 00790 if MYREMINDER>0 then gosub 05300 00791 if MYREMINDER=0 and MYQUOTE<>0 then gosub 05530 00800 if CURMSG>0 then 06720 else 01000 00810 if CO$<>"" then 00821 00811 if fkey=14 and FK$(14)="" then 02010 00812 if fkey=6 and FK$(6)="" then 02100 00813 if fkey=18 and FK$(18)="" then 02120 00814 if fkey=8 and FK$(8)="" then 09900 00815 if fkey=28 and FK$(28)="" then 00816 let REVEALCODES=-1*(REVEALCODES+1) 00817 if REVEALCODES<>0 then print chr$(10);"Function Key Codes Will Now Be Displayed." else print chr$(10);"Illgeal function keys will now report and error." 00818 goto 01000 00819 end if 00820 if fkey=4 and FK$(4)="" then 02145 00821 if fkey=2 and FK$(2)="" then 00822 if CO$<>"" then print chr$(10);"Command Ignored." 00823 goto 01000 00824 end if 00830 if CO$="" and fkey=41 and FK$(41)="" then 00831 linput eof 09910, prompt "Macro Playback"&chr$(10)&"Press The Function Key - ", noecho:N$; 00832 if fkey=0 then 00833 print "No Function Key Pressed." 00834 goto 01000 00835 end if 00836 print chr$(10);PROMPT$; 00837 goto 00860 00840 end if 00854 if fkey=40 and FK$(40)="" then 00900 00860 if CO$="" and FK$(fkey)<>"" then 00861 print FK$(fkey) 00862 let CO$=FK$(fkey) 00863 goto 01027 00865 end if 00870 if CO$<>"" then 00871 print chr$(10);"%HDG-Warning, That function key may not be used on a line with text." 00872 goto 00882 00873 end if 00880 if REVEALCODES<>0 then print "Function Key #";fkey;"has no meaning." else print "Undefined Function Key." 00882 print rpt$(chr$(1),31); 00890 goto 01000 00900 if CO$<>"" then print 00901 print "Macro Define" 00902 if ltrm$(rtrm$(CO$))="" then 00905 print "Enter The Text For The Macro" 00907 linput eof 09910, prompt "Define Macro Text: ":CO$; 00908 end if 00909 let CO$=ltrm$(rtrm$(CO$)) 00910 if CO$="" then print "No Text To Define" else if len(CO$)>100 then print "Macro Length Too Long" 00911 if CO$="" or len(CO$)>100 then 01000 00912 characteristics "On","Fkt" 00915 linput eof 09910, prompt chr$(10)&"Press The Function Key - ", noecho:N$; 00916 if fkey=0 then 00917 print "No Function Key Pressed.";rpt$(chr$(1),31); 00918 goto 01000 00919 end if 00920 let FK$(fkey)=CO$ 00921 if CO$<>"" then print "Function Key Macro Has Been Defined." else print "Function Key Has Been Cleared." 00922 goto 01000 00990 handler RESM 00991 resume 00992 end handler 00995 if MUPET>0 then print chr$(128);chr$(9); 00996 print chr$(12);"HDG ";VER$ 00997 if MUPET>0 then print chr$(129); 01000 enable handler RESM, resume at 01000 01001 print 01002 input #1 eof 09910, record USER data 00430 01003 if XPID<>PID or PRV%(1:1)="S" then 01004 print "%HDG-Information, Hotel management forces you to leave." 01005 if PRV%(1:1)="S" then 09910 else 09999 01006 end if 01007 if len(NC$)>0 then 01008 let CO$=NC$ 01009 goto 01027 01010 end if 01020 if PRV%(1:1)="M" then let MANAGER=-1 else let MANAGER=0 01021 if PRV%(2:2)="M" then 04500 01022 margin 0 01023 linput eof 09910, prompt PROMPT$:CO$; 01024 if fkey<>0 then 00810 01025 if term$=chr$(12) and ltrm$(rtrm$(CO$))="" then 00995 01026 print 01027 let C$=uprc$(ltrm$(rtrm$(CO$))) 01028 let I=pos(C$,";") 01029 if I>0 then 01030 let NC$=C$(I+1:len(C$)) 01031 let C$=C$(1:I-1) 01032 else 01033 let NC$="" 01034 end if 01035 let I=pos(C$," ") 01051 if I=0 then let I=len(C$)+1 01052 let AR$=ltrm$(C$(I+1:len(C$))) 01053 let C$=rtrm$(C$(1:I-1)) 01054 let C=len(C$) 01055 if C$="" then 01000 01056 if C$="M" and AR$="" then 06700 ! MAIN TOPICS 01057 if C$="L" and LEFT$("OWNERS",len(AR$))=AR$ then 06400 ! LIST TOPICS 01058 if C$="E" and AR$="" then 07000 01059 if C>0 and LEFT$("READ",C)=C$ and C<5 then 08300 01060 if C>0 and LEFT$("NEXT",C)=C$ and C<5 then 08350 01061 if C>0 and LEFT$("AGAIN",C)=C$ and C<6 then 08300 01062 if C>2 and LEFT$("MAIN",C)=C$ and C<5 then 06700 01063 if C>1 and LEFT$("SELECTIONS",C)=C$ and C<11 then 06720 01064 if C>1 and LEFT$("POSITIONS",C)=C$ and C<10 then 06720 01065 if C>1 and LEFT$("PRIOR",C)=C$ and C<6 then 06751 01066 if C>0 and LEFT$("PREVIOUS",C)=C$ and C<9 then 06751 01067 if C>1 and LEFT$("DATE",C)=C$ and C<5 then 02020 01068 if C>2 and LEFT$("DELETE",C)=C$ and C<7 then 02921 01069 if C>0 and LEFT$("WHO",C)=C$ and C<4 then 06300 01070 if C>0 and LEFT$("HELP",C)=C$ then 02147 01071 if C$="?" then 02147 01072 if C$="CLS" then 00995 01073 if C$="STOP" and UN$="PER.STONEY" then stop 01074 if C>1 and LEFT$("EXIT",C)=C$ and C<5 then 09910 01075 if C>1 and LEFT$("LAST",C)=C$ and C<5 then 02800 01076 if C>0 and LEFT$("BYE",C)=C$ and C<4 then 09910 01077 if C>0 and LEFT$("QUOTES",C)=C$ and C<7 then if (C=6 or C=1) and AR$="" then 06200 else 05550 ! default Q command 01078 if C>0 and LEFT$("MACROS",C)=C$ and C<7 then 02200 01079 if C>0 and LEFT$("SEARCH",C)=C$ and C<7 then 04200 01080 if C>2 and LEFT$("FILESTATUS",C)=C$ and C<11 then 02110 01081 if C>0 and LEFT$("NEW",C)=C$ and C<4 then 04000 01082 if C>1 and LEFT$("CREATE",C)=C$ and C<7 then 04000 01083 if C>0 and LEFT$("ADDITION",C)=C$ and C<9 then 04000 01084 if C>3 and LEFT$("REMINDERS",C)=C$ and C<9 then 05380 01085 if C>3 and LEFT$("REMOVE",C)=C$ and C<7 then 04100 01086 if C$="CLI" then 02130 01087 if C>0 and LEFT$("SHELL",C)=C$ and C<6 then 02130 01088 if C>1 and LEFT$("ENTER",C)=C$ and C<6 then 07000 01089 if C>1 and LEFT$("ERASE",C)=C$ and C<6 then 04100 01090 if C>2 and LEFT$("DISPOSE",C)=C$ and C<8 then 02921 01091 if C>2 and LEFT$("CLEAR",C)=C$ and C<6 then 04100 01092 if C>0 and LEFT$("GUESTS",C)=C$ and C<7 then 05700 01093 if C>0 and LEFT$("LIST",C)=C$ and C<5 then 04300 01094 if C>2 and LEFT$("LOGOFF",C)=C$ and C<7 then 09910 01095 if C>2 and LEFT$("LOGOUT",C)=C$ and C<7 then 09910 01096 if C>1 and LEFT$("PROFILES",C)=C$ and C<9 then 06100 01097 if C>0 and LEFT$("TOPICS",C)=C$ and C<7 then 06400 01098 if C>0 and LEFT$("TIME",C)=C$ and C<5 then 02050 01099 if C>2 and LEFT$("QUIT",C)=C$ and C<5 then 09910 01100 if C>0 and LEFT$("JOIN",C)=C$ and C<5 then 08000 01101 if C>0 and LEFT$("FAST",C)=C$ and C<5 then 04580 01102 if C>0 and LEFT$("QUICK",C)=C$ and C<6 then 04580 01103 if C$="DEBUG" and UN$="PER.STONEY" then 01104 print "JOINED: ";JOIN$;chr$(10);"CURTOP: ";CURTOP;" CURMSG: ";CURMSG;chr$(10) 01105 print "SBJ%: ";rtrm$(SBJ%);chr$(10);"Status: ";STAT% 01106 print "MTO:";MTO;" MFR:";MFR;" Message #";MNUM 01107 print "NMSG:";NMSG;" PMSG:";PMSG;" NTOP:";NTOP;" PTOP:";PTOP 01108 print "MTXT: ";MTXT;" TINV: ";TINV;" TBOU: ";TBOU;" PSWD%: ";PSWD% 01109 if MTXT>0 then input #3 record MTXT data 00455 01110 print "LNK: ";LNK 01111 print rtrm$(TXT%);tab(1,24) 01112 goto 01000 01113 end if 01114 if C$="REPAIR" and UN$="PER.STONEY" then 01115 for I=1 to 165 01116 input #2 record I data 00457 01117 if STAT%(1:1)="T" then print STAT%(1:1);I;")";NTOP;PTOP;" ";SBJ% 01118 next I 01119 end if 01120 if C$="WP" then 04610 01122 if C$="SE" or C$="SED" then 04600 01210 if C>0 and LEFT$("FIRST",C)=C$ and C<6 then let C$="0" 01211 if C>1 and LEFT$("MUPET",C)=C$ and C<6 then 01212 if MUPET=0 then print "You are not using Mupet at this time. Please see the Hotel Manager if you wish";chr$(10);"to obtain a personalized copy." 01213 if MUPET=1 then print "You are using an early version of Mupet. You could increase performance and";chr$(10);"gain more functions and flexability if you upgraded to Version 2.2" 01214 if MUPET=2 then print chr$(150);"You are using Mupet v2.0. Please upgrade to v2.2";chr$(10);chr$(128);chr$(1);"Version 2.2 offers many extra options!";chr$(129);chr$(10);chr$(151) 01215 if MUPET=64 then print "You are using Mupet v2.1. Please upgrade to version 2.2!";chr$(10);"The new version offers a back scrolling features which is helpful for long";chr$(10);"messages." 01216 if MUPET=65 then print "You are using Mupet v2.2 - The Latest and Greatest!";chr$(10);"Take Advantage Of These New Options By Pressing ALT-M" 01218 goto 01000 01219 end if 01220 if C>2 and LEFT$("PASSWORD",C)=C$ and C<9 then 07300 01221 if C>1 and LEFT$("PAUSE",C)=C$ and C<6 then 01222 linput prompt chr$(28)&"Press Any Key To Continue"&chr$(29), noecho, bytes 1, eof 09910:C$ 01223 print chr$(13);chr$(11); 01224 goto 01000 01225 end if 01230 if C>2 and LEFT$("MANAGER",C)=C$ and C<8 then 01600 01231 if C>1 and LEFT$("QPRINT",C)=C$ and C<7 then 04081 01232 if C>1 and LEFT$("PRINT",C)=C$ and C<6 then 04081 01240 if C>1 and LEFT$("SCAN",C)=C$ and C<5 then 01241 if REVEALCODES<>0 then print JOIN$ 01242 gosub 09200 01243 goto 01000 01244 end if 01245 if C>0 and LEFT$("ABANDON",C)=C$ and C<8 then 01800 01246 if C>0 and LEFT$("UNJOIN",C)=C$ and C<7 then 01800 01247 if C>1 and LEFT$("TYPE",C)=C$ and C<5 then 04250 01250 if C>1 and LEFT$("CAPTURE",C)=C$ and C<8 then 04150 01260 if C>1 and LEFT$("LOBBY",C)=C$ and C<6 then 08400 01500 if C$="DT" and UN$="PER.STONEY" then 01502 input prompt "MTXT to dispose: ":STARTMESSAGE 01504 gosub 03900 01506 print "Done..." 01508 end if 01510 enable handler RESM, resume at 01524 01512 let C=val(C$) 01514 if C<>int(abs(C)) or C>9999 then 01515 if MUPET>0 then print chr$(128);chr$(4); 01516 print "%HDG-Error, Illegal message number specified." 01517 if MUPET>0 then print chr$(129); 01518 goto 01000 01520 end if 01522 goto 02850 01524 if MUPET>0 then print chr$(128);chr$(12); 01525 print "%HDG-Error, Illegal Command or Abbreviation Not Unique" 01526 if MUPET>0 then print chr$(129); 01527 goto 01000 01600 gosub 06000 ! get params turn Manager On or Off 01601 input #1 record USER data 00430 01603 if PRV%(1:1)<>"M" and PRV%(1:1)<>"m" then 01605 print "You are not the hotel manager." 01607 goto 01000 01608 end if 01610 if C>1 and LEFT$("ON",C)=C$ and C<3 then let PRV%(1:1)="M" 01612 if C>1 and LEFT$("ENABLED",C)=C$ and C<8 then let PRV%(1:1)="M" 01620 if C>1 and LEFT$("OFF",C)=C$ and C<4 then let PRV%(1:1)="m" 01622 if C>1 and LEFT$("DISABLED",C)=C$ and C<9 then let PRV%(1:1)="m" 01630 print "Manager Status "; 01631 if PRV%(1:1)="M" then print "Enabled" else print "Disabled" 01632 output #1 record USER data 00430 01635 goto 01000 01700 if MFR=USER then print "Invoking topic owner privileges." !del topic 01702 if MANAGER and MFR<>USER then print "Invoking Hotel Manager privileges." 01704 if MFR=USER or MANAGER<>0 then 01710 01705 print "You are not the owner of ";rtrm$(SBJ%) 01706 goto 01000 01710 if NMSG>0 or PMSG>0 then print "Topic must be empty before it can be deleted." 01712 if NMSG>0 or PMSG>0 then 01000 01720 if CURTOP=1 then print "The first topic may not be deleted." 01725 if CURTOP=1 then 01000 01730 let PT=PTOP 01732 let NT=NTOP 01740 let STARTMESSAGE=MTXT 01742 gosub 03900 01750 if PT>0 then 01752 input #2 record PT data 00457 01754 let NTOP=NT 01756 output #2 record PT data 00457 01758 end if 01760 if NT>0 then 01762 input #2 record NT data 00457 01764 let PTOP=PT 01765 output #2 record NT data 00457 01768 end if 01770 input #2 record CURTOP data 00457 01772 let STAT%="" 01774 output #2 record CURTOP data 00457 01775 let CURTOP,CURMSG=0 01778 print "Positioned at main topic list. Use List Topics for listing." 01790 goto 01000 01800 let UJ=-1 ! unjoin 01802 goto 08001 02010 print "Date" 02020 print date$ 02030 goto 01000 02040 print "Time" 02050 print time$ 02060 goto 01000 02100 print "Files" 02110 if MUPET>0 then print chr$(128);chr$(14); 02111 filestatus 02112 if MUPET>0 then print chr$(129); 02114 goto 01000 02120 print "CLI" 02130 if AR$="" then cli else cli AR$ 02132 if AR$="" then print "You can type BYE anytime ya like, but you can never leave..." 02140 goto 01000 02145 print "HELP" 02147 enable handler RESM, resume at 02170 02149 if MUPET>1 then print chr$(150); 02150 if MUPET>0 then print chr$(12); 02151 type HDGHELP$ 02152 if MUPET>1 then print chr$(151); 02163 goto 01000 02170 if MUPET>1 then print chr$(151); 02171 print "Help is unavailable for HDG at the moment." 02188 goto 01000 02200 gosub 06000 02225 let CO$="" 02230 if C>0 and LEFT$("DEFINE",C)=C$ and C<7 then 00902 02235 if C>0 and LEFT$("CLEAR",C)=C$ and C<6 then 02360 02240 if C>0 and LEFT$("ERASE",C)=C$ and C<6 then 02360 02245 if C>0 and LEFT$("RESET",C)=C$ and C<6 then 02360 02247 if C>0 and LEFT$("LOAD",C)=C$ and C<5 then 02400 02250 if C>1 and LEFT$("SET",C)=C$ and C<4 then 00902 02251 if C>1 and LEFT$("SAVE",C)=C$ and C<5 then 02300 02255 if C>0 and LEFT$("HELP",C)=C$ and C<5 then 02275 02260 if C$="?" then 02275 02265 print "%HDG-Warning, Macro Command Not Recognized";chr$(10);"%HDG-Information, Type MACRO HELP for assistance." 02270 goto 01000 02275 print "MACRO HELP - This List MACRO SAVE - Save Function Keys" 02280 print "MACRO DEFINE - Create A Macro MACRO LOAD - Load Function Keys" 02285 print "MACRO CLEAR - Erase A Macro" 02290 goto 01000 02300 if AR$="" then linput eof 09910, prompt "Enter the filename to save macros into: ":FILENAME$ else let FILENAME$=AR$ 02301 let FILENAME$=ltrm$(rtrm$(FILENAME$)) 02302 if FILENAME$="" then 01000 02310 enable handler RESM, resume at 02312 02311 create FILENAME$ replace 02312 enable handler RESM, resume at 02350 02313 open #7:FILENAME$ output, display, sequential, begin, stream 02314 let J=0 02315 disable handler 02317 margin #7:0 02320 for I=1 to 75 02322 if FK$(I)<>"" then 02323 output #7:str$(I)&", "&FK$(I) 02324 let J=J+1 02325 end if 02326 next I 02327 close #7 02331 if J>0 then print J;"Function Key Macros Saved In ";FILENAME$ else print "No function keys were defined." 02332 if J=0 and FILENAME$<>"" then delete FILENAME$ 02333 input #1 record USER data 00430 02334 let MACROFILE%=FILENAME$ 02335 output #1 record USER data 00430 02336 goto 01000 02350 print "%HDG-Error, Unable to access file ";FILENAME$ 02352 goto 01000 02360 let C=len(AR$) 02361 if C>0 and LEFT$("ALL",C)=AR$ and C<4 then 02362 mat FK$=nul$ 02363 print "All Function Keys Have been Cleared." 02364 goto 01000 02365 end if 02366 goto 00915 02400 if AR$="" then linput eof 09910, prompt "Enter filename with macros to restore: ":FILENAME$ else let FILENAME$=AR$ 02402 let FILENAME$=ltrm$(rtrm$(FILENAME$)) 02403 if FILENAME$="" then 01000 02405 if FILENAME$="" then 02406 print "%HDG-Error, File could not be found." 02407 goto 01000 02408 end if 02409 gosub 02450 02410 goto 01000 02450 enable handler RESM, resume at 02467 02451 let J=0 02452 open #7:FILENAME$ input, stream, sequential, display 02453 enable handler RESM, resume at 02776 02454 linput #7 eof 02464:BUFFER$ 02455 let I=pos(BUFFER$,",") 02456 if I=0 then 02776 02457 let K=val(BUFFER$(1:I-1)) 02458 if K<1 or K>75 or K<>int(abs(K)) then 02776 02459 let BUFFER$=ltrm$(rtrm$(BUFFER$(I+1:len(BUFFER$)))) 02460 if BUFFER$="" then 02776 02461 let FK$(K)=BUFFER$ 02462 let J=J+1 02463 goto 02454 02464 if J=0 then print "No Function Key Definations Were Stored." else print str$(J);" Function Key(s) Restored" 02465 close #7 02466 return 02467 print "%HDG-Error, Unable to access ";FILENAME$ 02468 input #1 record USER data 00430 02469 let MACROFILE%="" 02470 output #1 record USER data 00430 02775 return 02776 print "%HDG-Warning, Improper Function Key Defination In File" 02777 goto 02454 02800 if MAIL=0 then print "%HDG-Warning, Message services are not available." ! goto last 02801 if MAIL=0 then 01000 02802 if CURMSG<1 then print "No topics are selected; use LIST TOPICS and JOIN" 02803 if CURMSG<1 then 01000 02804 let LMR=pos(JOIN$,"*"&str$(CURTOP)&"*")+3 02805 if JOIN$(LMR:LMR)="[" then 02820 02810 enable handler RESM, resume at 01000 02811 input #2 record CURMSG data 00457 02812 if NMSG=0 then 02813 print "Last message selected." 02814 output #1 record USER data 00430 02815 goto 06720 02816 end if 02817 let CURMSG=NMSG 02818 goto 02811 02820 let V=val(JOIN$(LMR+1:pos(JOIN$,"]",LMR)-1)) 02822 input #2 record CURMSG data 00457 02823 do while NMSG>0 and MNUM<=V 02824 input #2 record NMSG data 00457 02825 loop 02826 print "Last message read in topic selected." 02827 let CURMSG=PMSG 02828 output #1 record USER data 00430 02829 goto 06720 02850 enable handler RESM, resume at 01000 02851 if MAIL=0 then print "Mail messages are not available right now." 02852 if MAIL=0 then 01000 02853 if CURMSG<1 then print "No messages are selected; use LIST TOPICS and JOIN" 02854 if CURMSG<1 then 01000 02860 input #2 record CURMSG data 00457 02862 if PMSG>0 then 02863 let CURMSG=PMSG 02864 goto 02860 02865 end if 02867 enable handler RESM, resume at 02910 02870 input #2 record CURMSG data 00457 02875 if MNUM=C then 02876 output #1 record USER data 00430 02877 goto 08300 02880 end if 02890 let CURMSG=NMSG 02900 if CURMSG>0 and MNUM0 and LEFT$("PASSWORD",C)=C$ and C<9 then 02926 if CURTOP<1 then print "You must be in the topic." 02927 if CURTOP<1 then 01000 02928 input #2 record CURTOP data 00457 02929 if MFR<>USER and MANAGER=0 then print "You do not have access to the topic." 02930 if MFR<>USER and MANAGER=0 then 01000 02931 if MANAGER then print "%HDG-Information, Invoking Manager Privileges." 02932 let PSWD%="" 02933 output #2 record CURTOP data 00457 02934 print rtrm$(SBJ%);" -- Password Cleared" 02935 goto 01000 02936 end if 02937 if C$<>"" then print "DELETE can only be used for deleting messages or topic passwords." 02938 if C$<>"" then 01000 02940 if CURMSG<1 then print "Not positioned on a letter." 02941 if CURMSG<1 then 01000 02942 input #2 record CURMSG data 00457 02945 if STAT%(1:1)="T" then 01700 02956 if MFR=USER or MTO=USER then 02970 02957 input #2 record CURTOP data 00457 02958 if MFR=USER then 02965 02959 if PRV%(1:1)="M" then 02962 02960 print "You do not access to that letter, therefore you may not delete it." 02961 goto 01000 02962 print "Invoking manager privileges..." 02963 goto 02970 02965 print "Invoking topic owner privileges..." 02970 input #2 record CURMSG data 00457 02971 if NTOP>0 then print "There is a topic under this message, can not delete." 02972 if PTOP>0 then print "There is a topic above this message, can not delete." 02973 if NTOP>0 or PTOP>0 then 01000 02974 let NM=NMSG 02976 let NT=NTOP 02977 let PM=PMSG 02978 let PT=PTOP 02980 if NM>0 then input #2 record NM data 00457 02981 if NM>0 then let PMSG=PM 02982 if NM>0 then output #2 record NM data 00457 02983 if PM>0 then input #2 record PM data 00457 02984 if PM>0 then let NMSG=NM 02985 if PM>0 then output #2 record PM data 00457 02986 input #2 record CURMSG data 00457 02987 let STARTMESSAGE=MTXT 02988 gosub 03900 02989 let MTXT=0 02990 let STAT%="" 02991 let NMSG=NM 02992 let NTOP=NT 02993 let PMSG=PM 02994 let PTOP=PT 02995 output #2 record CURMSG data 00457 02996 print "Message has been deleted." 02997 goto 06751 03000 enable handler RESM, resume at 03050 ! Write Free Record Out In R 03010 input #3 eof 03050, record R data 00455 03020 if LNK=0 then 03050 03030 let R=R+1 03040 goto 03010 03050 let LNK=-1 03055 let TXT%=TXT$ 03060 output #3 record R data 00455 03070 return 03100 gosub 03000 ! write Text out in link pattern 03101 disable handler 03102 if STARTMESSAGE=0 then 03103 let STARTMESSAGE=R ! record where message starts 03104 else 03105 input #3 record LASTR data 00455 03106 let LNK=R 03107 output #3 record LASTR data 00455 03108 end if 03109 let LASTR=R 03110 return 03111 if fkey=2 then print chr$(10);"Line Ignored." 03112 if fkey=10 then 03113 let TRBL=1 03114 let TRBL=pos(LB$,chr$(10),TRBL+1) 03115 if pos(LB$,chr$(10),TRBL+1)>TRBL then 03114 03116 if TRBL=0 then let LB$="" else let LB$=LB$(1:TRBL-1) 03117 print chr$(28);chr$(10);"Attempted to delete last line entered. Use Ctrl-F3 to check position.";chr$(29);chr$(10) 03118 end if 03122 if fkey=61 then print chr$(10);"- Aborting Message -" 03123 if fkey=16 then print "%HDG-Information, Due to messages lost by accidental depression of Shift-F7";chr$(10);" instead of F7, the abort message key is now CTRL-SHFT-F15" 03124 if fkey=61 then 03900 03126 if fkey=4 then print chr$(10);"F3 - Help F7, F10 - Save Ctrl-Shift-F15 Abort Message Shft-F1 - Del Ln" 03127 if fkey=4 then print "Shift-F10 Retrieve File In To Message F5 - List Files" 03128 if fkey=4 then print "F1 - Cancel Line Shift-F6 Center Line Control-F3 - Show Text So Far";chr$(10);chr$(10);rpt$(chr$(1),31); 03130 if fkey=15 then 03132 if len(ltrm$(rtrm$(L$)))>79 then print chr$(10);"Can't center a line that long!";chr$(10);rpt$(chr$(1),31); 03134 if len(ltrm$(rtrm$(L$)))>79 then 03225 03136 let L$=rtrm$(ltrm$(L$)) 03137 let L$=rpt$(" ",int((80-len(L$))/2))&L$ 03138 print chr$(13);chr$(11);L$ 03139 goto 03240 03140 end if 03141 if fkey=20 then 03142 print chr$(18);chr$(15);chr$(2);chr$(29);chr$(12);chr$(20);"Message Preview";chr$(21) 03143 let TEMP=R 03144 let L$=LB$ 03147 gosub 03800 03148 let R=TEMP 03149 print L$;rpt$(chr$(1),31); 03150 let LB$=L$ 03151 goto 03225 03153 end if 03154 if fkey=6 then filestatus 03155 if fkey=6 then 03225 03198 if fkey<>10 and fkey<>16 and fkey<>2 and fkey<>4 then print chr$(10);"Unknown Function. Press F3 for Help. Ctrl-F3 Preview Message. F7 to save.";chr$(10);rpt$(chr$(1),31); 03199 goto 03225 03200 let STARTMESSAGE=0 ! ** Put Text Into The Message File / Return Start ** 03210 let R=1 ! starting record of search for empty space 03220 let LASTR=0 ! Last Record Inquired 03221 let L$,LB$="" 03225 enable handler RESM, resume at 03600 03226 disable handler 03230 linput eof 03500, prompt "":L$; 03231 let L$=rtrm$(L$) 03232 if pos(L$,chr$(26))>0 then print "%HDG-Illegal characters in line." 03233 if pos(L$,chr$(26))>0 then 03225 03235 if fkey<>0 and fkey<>8 and fkey<>38 and fkey<>39 then 03111 03239 print 03240 let LB$=LB$&L$ ! concat stuff 03241 if fkey=8 or fkey=38 then 03300 03252 let LB$=LB$&chr$(10) 03260 gosub 03700 ! write text in buffer out 03261 if fkey=39 then 03271 03270 goto 03225 03271 linput prompt "Enter File To Retrieve In To Message: ":FILENAME$; ! RETRIEVE 03272 let FILENAME$=uprc$(rtrm$(ltrm$(FILENAME$))) 03273 print chr$(13);chr$(11); 03274 if FILENAME$="" then 03230 03275 enable handler RESM, resume at 03286 03276 open #7:FILENAME$ input, stream, sequential, display 03277 enable handler RESM, resume at 03288 03278 linput #7 eof 03283:L$ 03279 print L$ 03280 let LB$=LB$&L$&chr$(10) 03281 gosub 03700 03282 goto 03278 03283 close #7 03284 print chr$(28);chr$(10);"Text Imported From ";FILENAME$;" Use Control-F3 to view full message.";chr$(29);chr$(10) 03285 goto 03225 03286 print "%HDG-Error, Unable to open file ";FILENAME$ 03287 goto 03225 03288 print "%HDG-Error, Error while processing ";FILENAME$ 03289 goto 03283 03300 gosub 03700 03320 if len(LB$)>0 then 03330 let LB$=LB$&chr$(26) 03340 gosub 03700 03350 if len(LB$)>0 then 03360 let TXT$=LB$(1:122) 03361 let LB$=LB$(123:len(LB$)) 03370 gosub 03100 03380 end if 03390 end if 03400 return 03500 gosub 03900 03501 print "%HDG-Fatal, CONTROL-D pressed. Message aborted." 03510 goto 09910 03600 print "%HDG-Error, Line too long" 03610 goto 03230 03700 if len(LB$)<122 then return 03710 let TXT$=LB$(1:122) 03720 let LB$=LB$(123:len(LB$)) 03730 gosub 03100 03740 goto 03700 03800 enable handler RESM, resume at 03890 ! list the message 03805 let R=STARTMESSAGE 03810 input #3 eof 03890, record R data 00455 03811 if LNK=0 then return 03820 let I=pos(TXT%,chr$(26)) 03830 if I=0 then let I=len(TXT%)+1 03840 let LB$=TXT%(1:I-1) 03842 print LB$; 03843 if len(CAP$)>0 then output #10:LB$; 03845 if LNK<=R then 03890 03846 let R=LNK 03850 goto 03810 03890 return 03900 enable handler RESM, resume at 03990 ! dispose of a text message 03905 if STARTMESSAGE<1 then 03990 03910 input #3 eof 03990, record STARTMESSAGE data 00455 03911 let I=LNK 03920 let LNK=0 03930 output #3 record STARTMESSAGE data 00455 03940 let STARTMESSAGE=I 03950 goto 03905 03990 let STARTMESSAGE=0 03992 return 04000 gosub 06000 ! rember NEW command 04010 if C>0 and LEFT$("REMINDERS",C)=C$ and C<10 then 05200 04011 if C>0 and LEFT$("HELP",C)=C$ and C<5 then 04070 04012 if C$="?" then 04070 04013 if C>0 and LEFT$("TOPICS",C)=C$ and C<7 then 06472 04015 if C>0 and LEFT$("QUOTES",C)=C$ and C<7 then 05500 04017 if C>0 and LEFT$("SUBTOPICS",C)=C$ and C<10 then 06472 04018 if C>0 and LEFT$("SUB-TOPICS",C)=C$ and C<10 then 06472 04050 print "%HDG-Error, Unknown argument to NEW command. Type NEW HELP for assistance." 04060 goto 01000 04070 print "NEW REMINDER - "; 04071 if MYREMINDER=0 then print "Create a reminder for yourself" else print "Change your reminder." 04075 print "NEW QUOTE - "; 04076 if MYQUOTE=0 then print "Create a public quote for who inquire about you" else print "Change your personalized quote" 04077 print "NEW TOPIC - Create a new topic or subtopic" 04080 goto 01000 04081 gosub 06000 ! PRINT command 04082 enable handler RESM, resume at 01000 04083 if C$<>"" then 04084 print "Submitting ";C$;" for printing." 04085 cli "QPRINT "&C$ 04086 goto 01000 04087 end if 04088 if len(CAP$)=0 then print "No capture file present and no filename specified.";chr$(10);"Use CAPTURE [filename] or PRINT [filename]." 04089 if len(CAP$)=0 then 01000 04090 close #10 04091 print "Printing capture file... Capture file will be deleted after printing." 04092 cli "QPRINT/DEL "&CAP$ 04093 let CAP$="" 04094 print "Messages are no longer being captured." 04095 goto 01000 04100 gosub 06000 ! remember ERASE COMMAND 04110 if C>0 and LEFT$("REMINDERS",C)=C$ and C<10 then 05390 04115 if C>0 and LEFT$("QUOTES",C)=C$ and C<7 then 05600 04120 if C>0 and LEFT$("HELP",C)=C$ and C<5 then 04130 04122 if C$="?" then 04130 04125 print "%HDG-Error, Unknown argument to ERASE command. Type ERASE HELP for assistance." 04127 goto 01000 04130 print "ERASE REMINDERS - Remove your logon reminder" 04131 print "ERASE QUOTES - Remove your personal quote" 04140 goto 01000 04150 gosub 06000 ! capture 04151 if C$<>"" and CAP$<>"" then 04152 print "Capture file ";CAP$;" is already recording...";chr$(10);"Use CAPTURE to turn off." 04153 goto 01000 04154 end if 04161 if C$<>"" then 04170 04162 enable handler RESM, resume at 01000 04163 if len(CAP$)>0 then print "Closing capture file ";CAP$ else print "No capture file designated. Use CAPTURE [filename] to save messages." 04164 if len(CAP$)>0 then close #10 04165 let CAP$="" 04166 goto 01000 04170 enable handler RESM, resume at 04172 04171 create C$ 04172 enable handler RESM, resume at 04180 04173 open #10:C$ output, sequential, stream, display, end 04174 let CAP$=C$ 04175 print C$;" is now capturing messages. Use CAPTURE to turn off." 04176 margin #10:0 04177 goto 01000 04180 print "Unable to capture to ";C$ 04182 goto 01000 04200 gosub 06000 ! remember SEARCH 04210 if C>0 and LEFT$("QUOTES",C)=C$ and C<7 then 06200 04220 if C>0 and LEFT$("HELP",C)=C$ and C<5 then 04230 04225 print "%HDG-Error, Unknown search item. Use SEARCH HELP for assistance." 04226 goto 01000 04230 print "SEARCH QUOTES - Scan for users who have quotes available" 04240 goto 01000 04250 gosub 06000 ! do the TYPE command 04251 if C$="" then print "No filename specified." 04252 if C$="" then 01000 04253 enable handler RESM, resume at 04260 04255 type C$ 04257 goto 01000 04260 print "Unable to type ";C$ 04262 goto 01000 04300 gosub 06000 ! remember LIST 04310 if C>0 and LEFT$("FILESTATUS",C)=C$ and C<11 then 04350 04311 if C>0 and LEFT$("QUOTES",C)=C$ and C<7 then 06200 04312 if C>0 and LEFT$("GUESTS",C)=C$ and C<7 then 05700 04313 if C>0 and LEFT$("USERS",C)=C$ and C<6 then 06300 04314 if C>0 and LEFT$("TOPICS",C)=C$ and C<7 then 06400 04315 if C>0 and LEFT$("SUBTOPICS",C)=C$ and C<10 then 06400 04316 if C>0 and LEFT$("SUB-TOPICS",C)=C$ and C<110 then 06400 04320 if C>0 and LEFT$("HELP",C)=C$ and C<5 then 04340 04322 if C$="?" then 04340 04325 print "%HDG-Error, Unknown argument to LIST command. Type LIST HELP for assistance." 04330 goto 01000 04340 print "LIST FILES -- Show files in current directory" 04341 print "LIST QUOTES -- List Users Who Have Quotes" 04342 print "LIST GUESTS -- Lists of Hotel Data General Guests" 04343 print "LIST USERS -- List of Current Users On the Data General" 04344 print "LIST TOPICS -- List of Topics Available" 04345 goto 01000 04350 filestatus 04355 goto 01000 04400 let UN=0 ! find UN for N$ *USERNAME SEARCH* 04402 let UN=UN+1 04404 input #1 eof 04420, record UN data 00430 04406 if rtrm$(UN%)=uprc$(N$) then 04490 04410 goto 04402 04420 let UN=0 04422 let UN=UN+1 04423 input #1 eof 04430, record UN data 00430 04424 if LEFT$(UN%,len(N$))=N$ then 04490 04426 goto 04422 04430 let UN=0 04431 let UN=UN+1 04432 input #1 eof 04440, record UN data 00430 04433 if LEFT$(uprc$(RN%),len(N$))=N$ then 04490 04434 goto 04431 04440 let UN=0 04441 let UN=UN+1 04442 input #1 eof 04450, record UN data 00430 04443 if pos(uprc$(RN%)," "&N$)>0 then 04490 04444 goto 04441 04450 let UN=0 04490 if UN>0 then 04491 input #1 record UN data 00430 04492 if rtrm$(UN%)="" then let UN=0 04493 end if 04495 return 04500 print chr$(10);chr$(18);chr$(15);chr$(2);chr$(29);chr$(21); 04501 let AR$="" 04505 if CURMSG>0 then input #2 record CURMSG data 00457 else let NMSG,PMSG,PTOP,NTOP=0 04510 margin 80 04512 if NMSG>0 then print "(N)ext, l(A)st, "; 04514 if PMSG>0 or PTOP>0 then print "(P)revious, "; 04516 if NTOP>0 or CURMSG=0 then print "(L)ist Topics, (J)oin, "; 04518 if CURMSG>0 then print "(E)nter Message, "; 04519 print "Create New (T)opic, "; 04520 if CURMSG>0 then print "(R)ead Again, "; 04522 print "(C)urrent Message, "; 04523 print "(M)ain Topic List, (Q)uit: "; 04529 margin 0 04530 linput prompt "", bytes 1, noecho:C$ 04535 let C$=uprc$(ltrm$(rtrm$(C$))) 04540 print C$;chr$(10);chr$(10) 04542 if C$="N" then 08350 04544 if C$="P" then 06751 04546 if C$="L" then 06400 04548 if C$="J" then 08000 04550 if C$="M" then 06700 04551 if C$="T" then 06472 04552 if C$="A" then 02800 04553 if C$="R" then 08300 04555 if C$="C" then 06720 04556 if C$="Q" then 04558 input #1 record USER data 00430 04559 let PRV%(2:2)=" " 04560 output #1 record USER data 00430 04561 goto 01000 04562 end if 04564 if C$="E" then 07000 04570 print "Unknown option. Use Q to return to command line." 04572 goto 04500 04580 input #1 record USER data 00430 ! enter menu mode 04581 let PRV%(2:2)="M" 04582 output #1 record USER data 00430 04583 print "Fast message system now in effect.";chr$(10) 04585 goto 06720 04600 cli "X SED "&AR$ 04604 goto 01000 04610 cli "WP "&AR$ 04615 goto 01000 05200 if MAIL=0 then ! reminder service 05205 print "Sorry, the reminder service can not be provided while messages can not";chr$(10);"be processed." 05206 goto 01000 05207 end if 05210 if MYREMINDER>0 then 05212 let STARTMESSAGE=MYREMINDER 05214 gosub 03900 05216 end if 05220 print chr$(10);chr$(20);"Enter Your New Reminder";chr$(21);chr$(10) 05230 gosub 03200 05240 let MYREMINDER=STARTMESSAGE 05241 output #1 record USER data 00430 05245 print "Reminders will be displayed when you walk in the hotel." 05250 goto 01000 05300 if MYREMINDER=0 then ! display a reminder 05310 print "You have no reminders. Use NEW REMINDER to make one." 05312 return 05320 end if 05330 if MAIL=0 then 05332 print "Your reminder can not be retrieved while messages can't be processed." 05334 goto 01000 05340 end if 05350 let STARTMESSAGE=MYREMINDER 05351 print chr$(10);chr$(20);"Reminder";chr$(21);chr$(10) 05360 gosub 03800 05370 goto 01000 05380 gosub 05300 05382 goto 01000 05390 if MYREMINDER=0 then ! erase reminder 05391 print "You have no reminder to erase. Create one with NEW REMINDER." 05392 goto 01000 05393 end if 05394 if MAIL=0 then 05395 print "Reminders can't be erased when message services are down." 05396 goto 01000 05397 end if 05398 let STARTMESSAGE=MYREMINDER 05399 gosub 03900 05400 let MYREMINDER=0 05401 output #1 record USER data 00430 05402 print "Your reminder has been erased." 05405 goto 01000 05500 if MAIL=0 then ! create QUOTE 05501 print "Quotes can not be created when message services are unavailable." 05502 goto 01000 05503 end if 05504 if MYQUOTE>0 then 05505 let STARTMESSAGE=MYQUOTE 05506 gosub 03900 05507 end if 05510 print chr$(10);chr$(20);"Enter Your Public Quote And Personal Background";chr$(21);chr$(10) 05512 gosub 03200 05515 let MYQUOTE=STARTMESSAGE 05517 output #1 record USER data 00430 05520 if MYQUOTE>0 then print "Your quote is now available to the public." else print "You will have no quote posted for your account." 05522 goto 01000 05530 if MYQUOTE=0 then 05531 print "No quote available for ";rtrm$(RN%);"." 05532 return 05533 end if 05535 if MAIL=0 then 05536 print "Can't access quote profiles when messages are down." 05537 return 05538 end if 05539 print chr$(10);chr$(20);"Personal Quote for ";rtrm$(RN%);chr$(21);chr$(10) 05540 let STARTMESSAGE=MYQUOTE 05542 gosub 03800 05544 return 05550 gosub 06000 ! get the person's name for the quote 05552 input #1 record USER data 00430 05554 if C$="" then 05555 gosub 05530 05556 goto 01000 05557 end if 05560 let I=0 05561 enable handler RESM, resume at 05590 05562 let I=I+1 05563 input #1 eof 05590, record I data 00430 05565 if LEFT$(rtrm$(UN%),C)=C$ then 05580 05570 goto 05562 05580 input #1 record I data 00430 05582 gosub 05530 05584 goto 05592 05590 print "No such username could be found in the hotel sign-in book." 05592 input #1 record USER data 00430 05594 goto 01000 05600 input #1 record USER data 00430 05602 if MYQUOTE=0 then 05603 print "No quote exists to erase." 05604 goto 01000 05605 end if 05606 if MAIL=0 then 05607 print "Quotes can not be removed while messages can't be accessed." 05608 goto 01000 05609 end if 05610 let STARTMESSAGE=MYQUOTE 05611 gosub 03900 05612 let MYQUOTE=0 05613 output #1 record USER data 00430 05614 print "Personal quote removed." 05616 goto 01000 05700 print chr$(10);chr$(20);"Other Guests In The Hotel Data General";chr$(21) 05701 let I=0 05702 enable handler RESM, resume at 05770 05703 margin 80 05705 let I=I+1 05706 input #1 eof 05770, record I data 00430 05707 if rtrm$(UN%)<>"" then 05710 if PRV%(5:5)="I" then print chr$(29); else print chr$(28); 05712 print rtrm$(UN%);", "; 05713 end if 05720 goto 05705 05770 margin 0 05772 print chr$(25);chr$(25);chr$(11);chr$(29) 05780 input #1 record USER data 00430 05790 goto 01000 05800 if MANAGER=0 then print "%HDG-Error, You are not the hotel manager." 05801 if MANAGER=0 then 06191 05802 linput prompt "Modify User (Y/N): ", eof 09910, bytes 1:C$ ! profile modify record I 05803 if uprc$(C$)="Y" then 05805 05804 goto 06191 ! restore record 05805 print chr$(10);chr$(10);"A) Real Name: ";rtrm$(RN%) 05806 print "B) Macro File: ";rtrm$(MACROFILE%) 05807 print "C) Joined File: ";rtrm$(JOINFILE%) 05808 print "D) Status: "; 05809 if PRV%(1:1)="M" then print "Manager" else if PRV%(1:1)="m" then print "Dormant Manager" else if PRV%(1:1)="S" then print "Suspended" else print "Normal User" 05817 enable handler RESM, resume at 05892 05818 print "S)ave Q)uit";chr$(10) 05820 linput prompt "Modify> ", eof 09910, bytes 1:C$ 05822 print 05824 if uprc$(C$)="Q" then 06191 05826 if uprc$(C$)="S" then 05828 output #1 record TUSER data 00430 05830 print "Changes Saved." 05832 goto 06191 05834 end if 05836 if uprc$(C$)="A" then 05838 linput prompt "Real Name: ", eof 05892:RN% 05840 goto 05805 05842 end if 05844 if uprc$(C$)="B" then 05845 linput prompt "Macro File: ", eof 05892:MACROFILE% 05846 goto 05805 05847 end if 05848 if uprc$(C$)="C" then 05849 linput prompt "Joined File: ", eof 05892:JOINFILE% 05850 goto 05805 05851 end if 05852 if uprc$(C$)="D" then 05853 print "M - Manger m - Dormant Manager spc - Normal User S - Suspended" 05854 linput prompt "New Status: ", eof 05892, bytes 1:C$ 05855 if C$="M" or C$="m" then let PRV%(1:1)=C$ 05856 if C$="S" or C$="s" then let PRV%(1:1)="S" 05857 if pos("SsMm",C$)=0 then let PRV%(1:1)=" " 05858 goto 05805 05859 end if 05890 print "Illegal Command. Select from menu." 05891 goto 05805 05892 print "%HDG-Error, Error in entry. Possible line too long." 05893 goto 05805 05900 if pos(JOIN$,"*"&str$(CURTOP)&"*")>0 then return ! save joined topic 05902 if JOIN$(len(JOIN$):len(JOIN$))<>"*" then let STV$=JOIN$&"*" else let STV$=JOIN$ 05905 let JOIN$=STV$&str$(CURTOP)&"*[0]*" 05906 let JP=pos(JOIN$,"*"&str$(CURTOP)&"*") 05910 return 05920 if MNUM<1 then return ! update highest read number 05921 let JP=pos(JOIN$,"*"&str$(CURTOP)&"*") 05922 if JP<1 then gosub 05900 05923 let JP=JP+len(str$(CURTOP))+2 05926 if JOIN$(JP:JP)<>"[" then 05927 let STV$=JOIN$(1:JP-1) 05929 let JOIN$=STV$&"["&str$(MNUM)&"]*"&JOIN$(JP:len(JOIN$)) 05932 return 05933 end if 05934 let JP2=pos(JOIN$,"]",JP) 05935 if val(JOIN$(JP+1:JP2-1))>MNUM then return 05938 let TEMP$=JOIN$(JP2:len(JOIN$)) 05939 let STV$=JOIN$(1:JP)&str$(MNUM) 05940 let JOIN$=STV$&TEMP$ 05945 return 06000 let I=pos(AR$," ") ! move next AR$ into C$ 06005 if I=0 then let I=len(AR$)+1 06010 let C$=rtrm$(AR$(1:I-1)) 06015 let AR$=ltrm$(AR$(I+1:len(AR$))) 06020 let C=len(C$) 06025 return 06100 gosub 06000 ! profile 06101 if C$="" then 06114 06102 enable handler RESM, resume at 06110 06103 let I=0 06104 let I=I+1 06105 input #1 eof 06110, record I data 00430 06107 if LEFT$(rtrm$(UN%),C)=C$ then 06114 06108 goto 06104 06110 print "No user name could be found in the hotel log book." 06112 goto 06191 06114 print chr$(10);chr$(20);"Profile for ";rtrm$(UN%);" -- ";rtrm$(RN%);chr$(21) 06116 disable handler 06118 let TUSER=I 06120 if PRV%(5:5)="I" then print "Checked In At ";LL% else print "Checked Out At ";LL% 06122 if CURTOP=0 then print "Positioned at the MAIN list of topics." 06123 if CURTOP=0 then 06170 06125 input #2 record CURTOP data 00457 06126 if STAT%(1:1)<>"T" then print "The topic the user was in has been deleted." 06127 if STAT%(1:1)<>"T" then 06170 06130 let TEMP$="["&rtrm$(SBJ%)&"]" 06132 if CURTOP=CURMSG then 06150 06134 if CURMSG=0 then 06170 06135 input #2 record CURMSG data 00457 06136 let TEMP$=TEMP$&" Message #"&str$(MNUM) 06137 let TEMP$=TEMP$&chr$(10)&rtrm$(SBJ%) 06150 print TEMP$ 06170 if MANAGER then 06171 print "Status: "; 06172 if PRV%(1:1)="M" then print "Manager" else if PRV%(1:1)="m" then print "Dormant Manager" else if PRV%(1:1)="S" then print "Suspended" else print "Normal User" 06173 print "Macro File: "; 06174 if rtrm$(MACROFILE%)="" then print "No macro file defined." else print rtrm$(MACROFILE%) 06175 print "Joined Topic File: "; 06176 if rtrm$(JOINFILE%)="" then print "No join file exists." else print rtrm$(JOINFILE%) 06177 print "This is user #";TUSER 06180 end if 06181 gosub 06000 ! get next command? 06182 if C>0 and LEFT$("MODIFY",C)=C$ and C<7 then 05800 06190 if MYQUOTE>0 then gosub 05530 06191 input #1 record USER data 00430 06192 goto 01000 06200 if MAIL=0 then ! Search Quotes 06202 print "Unable to search when message service is out of order." 06204 goto 01000 06206 end if 06208 print chr$(10);chr$(20);"List Of Users Who Have Quotes";chr$(21);" -- Use QUOTE [username] To View" 06210 enable handler RESM, resume at 06250 06215 let I=0 06220 let I=I+1 06225 input #1 eof 06250, record I data 00430 06230 if MYQUOTE>0 then print UN%;" -- ";rtrm$(RN%) 06235 goto 06220 06250 goto 01000 06300 enable handler RESM, resume at 06350 ! Who 06302 let I=0 06305 print chr$(20);"System User List As Of ";date$;" ";time$;chr$(21) 06310 let TMP=0 06315 who I into LB$ 06320 if pos(LB$,"CON")>0 and LB$(9:14)<>"OP:CON" then 06321 let J=pos(LB$,":",9) 06322 let K=pos(LB$,":",J+1) 06323 let TMP=-1 06324 let LB$=LB$(1:J-1)&rpt$(" ",26-J)&rtrm$(LB$(J+1:K-1)) 06325 runtime I into L$ 06326 let K=I 06327 print LB$;rpt$(" ",32-len(LB$));L$(8:16);" "; 06328 let J=K 06329 tree J into LB$ 06330 let LB$=ltrm$(rtrm$(LB$(27:len(LB$)-1))) 06331 let K=pos(LB$," ") 06333 if K>0 then let LB$=LB$(1:K-1) 06334 let K=val(LB$) 06335 if K>0 then 06328 06337 who J into LB$ 06340 let LB$=rtrm$(LB$(31:len(LB$)-1)) 06341 let K=pos(LB$,":") 06342 if K>0 then 06343 let LB$=LB$(K+1:len(LB$)) 06344 goto 06341 06345 end if 06346 print LB$(1:len(LB$)-3); 06349 end if 06350 let I=I+1 06351 if TMP then print 06360 if I>256 then 01000 06370 goto 06310 06400 if MAIL=0 then ! LIST TOPICS 06401 print "Topics can not be listed with out message services available." 06402 goto 01000 06403 end if 06404 gosub 06000 06405 if C>0 and LEFT$("OWNERS",C)=C$ and C<7 then let LO=-1 else let LO=0 06410 input #1 record USER data 00430 06415 let J=0 06416 enable handler RESM, resume at 06468 06417 if CURMSG<1 then 06418 print chr$(20);"Main Topic Selections";chr$(21);chr$(10) 06419 let I=1 06420 else 06421 let I=CURMSG 06422 input #2 eof 06468, record I data 00457 06423 if PTOP=0 then 06430 06424 let I=PTOP 06425 goto 06422 06430 if NTOP=0 then 06431 input #1 record USER data 00430 06432 input #2 record CURTOP data 00457 06433 print "No topics under ";rtrm$(SBJ%); 06434 input #2 record CURMSG data 00457 06435 if MNUM>0 then print " message ";str$(MNUM);"."; 06436 print 06437 goto 01000 06438 end if 06439 print chr$(20);"Sub-Topic Selections";chr$(21);chr$(10) 06440 end if 06441 input #2 eof 06468, record I data 00457 06442 if STAT%(1:1)=" " then 06468 06443 if STAT%(1:1)="T" then if pos(JOIN$,"*"&str$(I)&"*")>0 then print chr$(29);" "; else print chr$(28);" "; 06444 if LO=0 then 06445 if STAT%(1:1)="T" then print uprc$(rtrm$(SBJ%));chr$(29) 06446 else 06447 input #1 record MFR data 00430 06448 if STAT%(1:1)="T" then print uprc$(SBJ%(1:44));chr$(29);rtrm$(RN%) 06449 end if 06465 let I=NTOP 06466 if STAT%(1:1)="T" then let J=J+1 06467 if NTOP=0 then 06468 else 06441 06468 print chr$(29);J;"topic(s) avialable." 06469 goto 01000 06470 print "%HDG-Error, Too many characters in topic name." 06471 goto 01000 06472 if MAIL=0 then ! ADD TOPIC 06473 print "Topics can not be added when messages can not be created." 06474 goto 01000 06475 end if 06476 let MSD$=date$&" "&time$ 06477 enable handler RESM, resume at 06470 06478 let TOPIC$=AR$ 06479 if AR$<>"" then print "Create Topic ";AR$ 06480 if AR$<>"" then 06482 06481 linput eof 09910, prompt "Enter Topic Name In 40 Characters Or Less"&chr$(10)&chr$(20)&rpt$("_",40)&chr$(21)&chr$(13):TOPIC$ 06482 let TOPIC$=uprc$(ltrm$(rtrm$(TOPIC$))) 06483 if TOPIC$="" then 01000 06484 if len(TOPIC$)>40 then 06485 print "The topic name is too long. Please try again." 06486 goto 06481 06487 end if 06488 for I=1 to 31 06489 if pos(TOPIC$,chr$(I))>0 then 06490 print "Illegal character in topic name." 06491 goto 01000 06492 end if 06493 next I 06494 disable handler 06495 let I=0 06496 let I=I+1 06501 input #2 eof 06542, record I data 00457 06502 if pos(rtrm$(SBJ%),TOPIC$)=1 and STAT%(1:1)="T" then 06503 print "A topic with a similar name exists already. If you wish to create a topic";chr$(10);"please select a name that won't conflict with existing topics." 06505 goto 01000 06506 end if 06510 goto 06496 06542 print chr$(10);chr$(20);"Enter The Description Text Of The Topic";chr$(21);chr$(10) 06543 gosub 03200 06544 if STARTMESSAGE<1 then 06545 print "Topics without description can not be created." 06546 goto 01000 06547 end if 06548 input #1 record USER data 00430 06553 let I=CURMSG 06561 if I>0 then 06580 06562 enable handler RESM, resume at 06575 06563 input #2 eof 06575, record 1 data 00457 06565 if NTOP>0 then 06566 let I=NTOP 06567 else 06568 let I=1 06569 goto 06600 06570 end if 06571 goto 06580 06575 let I=0 06576 let J=1 06578 goto 06620 06580 enable handler RESM, resume at 06590 06581 input #2 eof 06590, record I data 00457 06582 if NTOP=0 then 06600 06583 let I=NTOP 06585 goto 06581 06590 print "%HDG-Error, Message Clerk Lost Track -- ID# ";I 06591 let CURTOP=0 06592 print "No topics are selected." 06593 gosub 03900 06594 goto 01000 06600 let J=0 06602 enable handler RESM, resume at 06620 06603 let J=J+1 06605 input #2 eof 06620, record J data 00457 06610 if STAT%(1:1)=" " then 06620 06615 goto 06603 06620 disable handler ! enable handler RESM, resume at 00691 06630 input #1 record USER data 00430 06631 let SBJ%=TOPIC$ 06632 let STAT%="T " 06633 let MSD%=MSD$ 06634 let MNUM,TBOU,TINV=0 ! it is a topic 06636 let NMSG,PMSG,NTOP,MTO=0 06640 let PTOP=I 06642 let MTXT=STARTMESSAGE 06644 let MFR=USER 06645 let PSWD%="" 06650 output #2 record J data 00457 06651 if I=0 then 06655 06652 input #2 record I data 00457 06653 let NTOP=J 06654 output #2 record I data 00457 06655 print "Topic ";TOPIC$;" has been created." 06656 let AR$=TOPIC$ 06657 goto 08000 06700 input #1 record USER data 00430 ! return to main menu 06702 let CURMSG,CURTOP=0 06704 print "Top of list. Use LIST TOPICS for a list of the main topics." 06706 output #1 record USER data 00430 06710 goto 01000 06720 input #1 record USER data 00430 ! show selection 06721 print chr$(10);chr$(20);"Current Message / Topic Selected";chr$(21) 06722 if CURMSG<1 then print "No topic selected. Use LIST TOPICS and JOIN to explore." 06723 if CURMSG<1 then 01000 06724 input #2 record CURTOP data 00457 06725 if STAT%(1:1)=" " then 06726 print "The topic you were last at has been deleted." 06727 let CURTOP,CURMSG=0 06728 output #1 record USER data 00430 06730 goto 01000 06731 end if 06732 print "Topic: ";SBJ%(1:45); 06733 if CURMSG=CURTOP then 01000 06734 input #2 record CURMSG data 00457 06735 if STAT%(1:1)=" " then 06736 print "The message you were last at has been deleted." 06737 let CURMSG=CURTOP 06738 output #1 record USER data 00430 06739 goto 01000 06740 end if 06745 print "Message:";MNUM 06746 margin 80 06747 print "Subject: "; 06748 print rtrm$(SBJ%) 06749 margin 0 06750 goto 01000 06751 if MAIL=0 then print "Unable to access message system." ! prior message / topic 06752 if MAIL=0 then 01000 06753 input #1 record USER data 00430 06754 if CURMSG<1 then print "No topic selected." 06755 if CURMSG<1 then 01000 06756 input #2 record CURMSG data 00457 06757 if STAT%(1:1)="M" or STAT%(1:1)=" " then let CURMSG=PMSG 06758 if STAT%(1:1)="T" then 06759 let CURMSG,CURTOP=PTOP 06760 input #2 record PTOP data 00457 06761 if PTOP>0 then 06759 06762 if STAT%(1:1)="M" then 06763 let CURTOP=PMSG 06764 if CURTOP>0 then input #2 record CURTOP data 00457 else let PMSG=0 06765 if PMSG>0 then 06763 06766 output #1 record USER data 00430 06767 end if 06768 end if 06769 print "Prior position selection. Use READ to examine." 06770 output #1 record USER data 00430 06771 goto 06720 06842 if C>0 and LEFT$("OPENING",C)=C$ and C<8 then 08900 06910 print chr$(10);"%HDG-Error, Line too long." 06915 goto 01000 06920 print "%HDG-Error, Messages under the current topic were altered while" 06921 print " you entered your text. Message lost and no topic selected." 06922 input #1 record USER data 00430 06923 let CURMSG,CURTOP=0 06924 output #1 record USER data 00430 06925 gosub 03900 06926 goto 01000 07000 if MAIL=0 then print "Messages can not be added when text functions are out of service." ! *ENTER A TEXT MESSAGE* 07001 if MAIL=0 then 01000 07002 input #1 record USER data 00430 07003 if CURMSG<1 then print "You must select a topic before you may enter a letter." 07004 if CURMSG<1 then 01000 07005 enable handler RESM, resume at 06910 07006 let UN=0 07007 let MSD$=date$&" "&time$ 07008 if AR$<>"" then let N$=AR$ 07009 if AR$<>"" then 07011 07010 linput eof 09910, prompt "To (NEWLINE=public message): ":N$; 07011 let N$=uprc$(rtrm$(ltrm$(N$))) 07012 if N$="" then print "Public Message" 07013 if N$="" then 07050 07020 gosub 04400 07022 if UN=0 then print chr$(10);"No person by that username is in the hotel books." 07023 if UN=0 then 01000 07024 input #1 record UN data 00430 07025 print chr$(13);"To (NEWLINE=public message): ";chr$(30);"FF";rtrm$(UN%);" -- ";rtrm$(RN%) 07027 input #1 record UN data 00430 07050 enable handler RESM, resume at 06910 07055 linput eof 09910, prompt "Subject: ":N$ 07056 let N$=rtrm$(N$) 07057 if len(N$)>80 then 06910 07058 if len(N$)=0 then print "A message must have a subject matter." 07059 if len(N$)=0 then 01000 07060 print chr$(28);chr$(20);"Enter Text Of Message Below -- Press F7 to Send Ctrl-Shft-F15 Abort F3=HELP";chr$(21);chr$(29) 07065 gosub 03200 07066 if STARTMESSAGE=0 then print "Message aborted due to no text in message." 07067 if STARTMESSAGE=0 then 01000 07100 input #1 record USER data 00430 07110 let I=CURMSG 07120 if I<1 then 07121 print "No topic was selected - message was not saved." 07122 gosub 03900 07123 goto 01000 07124 end if 07130 enable handler RESM, resume at 06920 07140 input #2 eof 06920, record I data 00457 07144 if NMSG>0 then 07145 let I=NMSG 07146 goto 07140 07147 end if 07150 let J=0 07155 enable handler RESM, resume at 07180 07160 let J=J+1 07162 input #2 eof 07180, record J data 00457 07165 if STAT%(1:1)=" " then 07180 07170 goto 07160 07180 let SBJ%=N$ 07182 let STAT%(1:1)="M" 07184 let NTOP,PTOP,NMSG,TINV,TBOU=0 07185 let PSWD%="" 07186 let PMSG=I 07187 let MTO=UN 07188 let MFR=USER 07189 let MSD%=MSD$ 07190 let MTXT=STARTMESSAGE 07192 output #2 record J data 00457 07194 input #2 record I data 00457 07196 let NMSG=J 07197 output #2 record I data 00457 07198 let I=MNUM 07200 input #2 record J data 00457 07210 let MNUM=I+1 07220 output #2 record J data 00457 07250 print "Message entered." 07260 goto 01000 07300 if MAIL=0 then 07301 print "%HDG-Error, Mail services are not operational yet." 07302 goto 01000 07303 end if 07304 if CURTOP<1 then 07305 print "You must JOIN a topic first. Use MAIN; LIST TOPICS." 07306 goto 01000 07307 end if 07310 input #2 record CURTOP data 00457 07312 if MFR=USER then 07350 07314 if MANAGER then print "%HDG-Information, Invoking Manager Privileges." 07316 if MANAGER then 07350 07320 print "Only the topic owner may perform that function." 07321 goto 01000 07350 gosub 06000 ! get possible password 07360 if C$<>"" then 07362 let PSWD%=uprc$(ltrm$(rtrm$(C$(1:6)))) 07365 output #2 record CURTOP data 00457 07367 print rtrm$(SBJ%);" -- Password set to: ";rtrm$(PSWD%) 07369 goto 01000 07370 end if 07371 if rtrm$(PSWD%)<>"" then print rtrm$(SBJ%);" -- Password is: ";rtrm$(PSWD%) else print rtrm$(SBJ%);" -- Has No Password" 07372 print "Use PASSWORD [password] to change. DELETE PASSWORD to clear." 07373 goto 01000 07910 print "%HDG-Error, Messages were changed such that topics could not be traced." 07911 input #1 record USER data 00430 07912 let CURMSG,CURTOP=0 07913 output #1 record USER data 00430 07914 print "For a list of topics use LIST TOPICS, to join use the JOIN command." 07915 goto 01000 08000 let UJ=0 ! JOIN A TOPIC 08001 if MAIL=0 then print "Unable to join a topic if message services are not available." ! JOIN TOPIC 08002 if MAIL=0 then 01000 08004 input #1 record USER data 00430 08006 let I=CURMSG 08008 if I<1 then let I=1 08010 enable handler RESM, resume at 07910 08012 input #2 eof 07910, record I data 00457 08014 if PTOP>0 then 08016 let I=PTOP 08018 goto 08012 08020 end if 08022 enable handler RESM, resume at 06910 08024 if AR$="" then linput eof 09910, prompt "Join Which Topic: ":N$ else let N$=AR$ 08025 disable handler 08026 let N$=uprc$(ltrm$(rtrm$(N$))) 08028 if len(N$)=0 then print "No topic name specified." 08030 if len(N$)>40 then print "Topic name was too long." 08032 if len(N$)=0 or len(N$)>40 then 01000 08034 let J=I 08036 input #2 record J data 00457 08038 if STAT%(1:1)="T" and rtrm$(SBJ%)=N$ then 08052 08039 if NTOP>0 then 08040 let J=NTOP 08041 goto 08036 08042 end if 08043 let J=I 08044 input #2 record J data 00457 08045 if STAT%(1:1)="T" and LEFT$(SBJ%,len(N$))=N$ then 08052 08046 if NTOP>0 then 08047 let J=NTOP 08048 goto 08044 08049 end if 08050 print "That topic could not be found. Use LIST TOPICS." 08051 goto 01000 08052 if UJ<>0 then 08168 08055 input #2 record J data 00457 08056 if MANAGER<>0 or MFR=USER then 08065 08057 if rtrm$(PSWD%)<>"" then 08058 linput prompt "Confidental Topic. Password: ", eof 09910, noecho:PSW$ 08059 if LEFT$(uprc$(ltrm$(rtrm$(PSW$))),6)=uprc$(rtrm$(PSWD%)) then 08065 08060 input #1 record MFR data 00430 08061 print chr$(10);"Topic Access Denied. See ";rtrm$(RN%);" for the password." 08062 input #1 record USER data 00430 08063 goto 06700 ! main topics 08064 end if 08065 print chr$(10);"You have joined ";rtrm$(SBJ%) 08070 let CNT=0 08071 if NMSG<1 then print "No messages available in this topic." 08072 if NMSG<1 then 08092 08073 let SERIES$="" 08074 let A,B,D=0 08075 let I=NMSG 08076 input #2 record I data 00457 08077 let CNT=CNT+1 08078 let B=MNUM 08079 gosub 09100 ! series computation 08080 if NMSG>0 then 08075 08081 print str$(CNT);" message(s) available." 08082 let B=0 08083 gosub 09100 08085 print "Messages #: ";SERIES$ 08092 input #1 record USER data 00430 08093 let CURMSG,CURTOP=J 08094 output #1 record USER data 00430 08095 gosub 05900 ! add topic to list 08160 gosub 08200 08166 goto 01000 08168 print "Topic has been abandoned." 08170 let V=J 08172 gosub 09400 08174 goto 01000 08200 input #1 record USER data 00430 ! display the current message 08201 print 08202 input #2 record CURTOP data 00457 08203 if STAT%(1:1)=" " then print "That message has been deleted." 08204 if STAT%(1:1)=" " then return 08205 if len(CAP$)>0 then print chr$(28);"Message Being Captured to ";CAP$;chr$(10);chr$(29) 08206 disable handler 08209 let L$="["&rtrm$(SBJ%)&"]" 08210 input #2 record CURMSG data 00457 08211 if MNUM>0 then let L$=L$&" Message "&str$(MNUM) 08212 gosub 05920 ! add message to last read 08213 let L$=L$&rpt$(" ",60-len(L$))&rtrm$(MSD%)&chr$(10) 08214 if MTO>0 then 08215 input #1 record MTO data 00430 08216 let L$=L$&"To: "&rtrm$(RN%) 08217 if STAT%(3:3)="R" then let L$=L$&" (message received)" 08222 if MTO=USER then let STAT%(3:3)="R" 08223 if MTO=USER then output #2 record CURMSG data 00457 08225 let L$=L$&chr$(10) 08254 end if 08255 if MFR>0 then 08256 input #1 record MFR data 00430 08257 if STAT%(1:1)="M" then let L$=L$&"From: "&rtrm$(RN%)&chr$(10) else let L$=L$&"Owner: "&rtrm$(RN%)&chr$(10) 08259 else 08260 if MFR<0 then if STAT%(1:1)="M" then let L$=L$&"From: Anonymous Sender"&chr$(10) else let L$=L$&"Owner: Anonymous Owner"&chr$(10) 08261 end if 08270 if STAT%(1:1)<>"T" then let L$=L$&rtrm$(SBJ%)&chr$(10) 08272 print L$;rpt$("-",79) 08274 if len(CAP$)>0 then output #10:rpt$(chr$(10),3)&L$&rpt$("-",79) 08276 let STARTMESSAGE=MTXT 08278 gosub 03800 08280 input #1 record USER data 00430 08282 return 08284 goto 01000 08300 if MAIL=0 then print "Message services are not working right now." 08301 if MAIL=0 then 01000 08302 input #1 record USER data 00430 08303 if CURMSG<1 then 08304 let CURMSG,CURTOP=0 08305 output #1 record USER data 00430 08306 print "No topic has been selected. Use LIST TOPICS and JOIN." 08307 goto 01000 08308 end if 08310 gosub 08200 ! read message 08311 if NTOP>0 then print chr$(28);chr$(10);chr$(10);"More topics may be listed with LIST TOPICS.";chr$(29) 08320 goto 01000 08350 if MAIL=0 then print "Message services are not working right now." 08351 if MAIL=0 then 01000 08352 input #1 record USER data 00430 08357 if CURMSG<1 then 08303 08360 input #2 record CURMSG data 00457 08362 if NMSG<1 then print "No more messages are available." 08363 if NMSG<1 then 01000 08364 let CURMSG=NMSG 08365 output #1 record USER data 00430 08370 goto 08303 08372 let OK,TU=0 ! check alias stuff 08373 let TU=TU+1 08374 if TU=USER then let TU=TU+1 08375 input #1 eof 08380, record TU data 00430 08378 if rtrm$(HD%)=ALIAS$ then let OK=-1 08379 if OK=0 then 08373 08380 return 08381 let OK=0 ! CHECK ALIAS FOR BAD CHARCTERS 08382 for TI=1 to 31 08383 if pos(ALIAS$,chr$(TI))>0 then let OK=-1 08384 next TI 08385 return 08400 disable handler 08401 input #1 record USER data 00430 ! LOBBY 08402 let ALIAS$=rtrm$(ltrm$(HD%)) 08403 let OK=0 08405 if HD%(1:1)=chr$(0) or rtrm$(HD%)="" then 08406 linput eof 09910, prompt "Enter an alias: ":ALIAS$ 08407 if rtrm$(ALIAS$)="" then 01000 08408 gosub 08381 08409 if OK=-1 then print "Illegal Character in Handle. Try Again." 08410 if OK=-1 then 08406 08411 gosub 08372 08412 if OK=-1 then print "Someone else is going by that alias. Choose another." 08413 if OK=-1 then 08406 08414 end if 08415 print chr$(10);chr$(28);chr$(18);chr$(15);chr$(2);chr$(21);"All commands start with a slash. Type /HELP for assistance.";chr$(10);chr$(20);"Use two slashes to start a line with a slash.";chr$(10);chr$(10);chr$(29);chr$(21) 08420 input #1 record USER data 00430 08422 let RM,ROOM=1 08430 let HD%=ltrm$(rtrm$(ALIAS$)) 08431 let RMCTRL,CI(1),CI(2),CI(3),CI(4),CI(5)=0 08435 let CS%="" 08437 let CC=0 08440 output #1 record USER data 00430 08450 print chr$(20);"Welcome to ";LEFT$(RM$(ROOM),pos(RM$(ROOM),";")-1);chr$(21) 08452 if ROOM>9 and ROOM<90 then gosub 08780 08460 let C$="just walked in." 08461 let OK=0 08462 goto 08520 08500 input #1 record USER data 00430 08501 if RM=0 then print chr$(28);"You have been removed from the lobby.";chr$(29) 08502 if RM=0 then 08700 08503 if PRV%(1:1)="S" then print chr$(28);"An HDG bouncer walks into the room with you, grabs you by the neck and throws";chr$(10);"you out of the hotel. He wipes his hands briskly together. He then returns";chr$(10);"to the hotel.";chr$(29) 08504 if PRV%(1:1)="S" then 08700 08505 if OK<-1 then on abs(OK)-1 goto 08753, 08700 08506 if CC<>USER then let RMCTRL=0 08510 linput eof 09910, prompt chr$(29)&chr$(21)&chr$(18)&chr$(15):C$; 08511 if ord(term$)=12 then print chr$(12); 08512 if RMCTRL>0 then 08513 input #1 record RMCTRL data 00430 08514 end if 08515 print 08516 if RMCTRL>0 and RM=ROOM then let RMCS$=CS% else let RMCS$=" " 08517 if C$(1:1)="/" then 08600 08520 let TU=0 08521 enable handler LOBBYERROR, resume at 08525 08525 let TU=TU+1 08527 input #1 eof 08500, record TU data 00430 08528 if PRV%(5:5)<>"I" or RM<>ROOM or XPID<1 then 08525 08530 if ROOM<90 then let MSG$="<"&ALIAS$&"> " else let MSG$="<"&chr$(28)&"Anonymous"&chr$(29)&"> " 08532 send XPID,chr$(13)&chr$(11)&MSG$&C$ 08540 goto 08525 08542 handler LOBBYERROR 08543 if excode=71 or excode=100 then 08550 let XPID,RM,CC,CI(1),CI(2),CI(3),CI(4),CI(5)=0 08551 let CS%="" 08555 output #1 record TU data 00430 08556 print chr$(28);rtrm$(UN%);" is no longer in the lobby.";chr$(29) 08557 else 08558 print chr$(28);"Report LOBBY error #";excode;" to Hotel Manager.";chr$(7);chr$(29) 08559 end if 08560 resume 08561 end handler 08562 print chr$(28);"/HELP - This List /LIST - List Rooms Available" 08563 print "/EXIT - Return to HDG /ROOM - Change to a room" 08564 print "/CONTROL - Control the Room /RELEASE - Release Control of the Room" 08565 print "/TIME - Display Time /DATE - Display Date" 08566 print "/CLS - Clear Screen" 08567 print "/OPEN - Open the room for entry" 08568 print "/CLOSE - Close the room, but allow knocking" 08569 print "/BAR - Bar all admittance" 08570 goto 08500 08600 if C$(1:2)="//" then 08601 let C$=C$(2:len(C$)) 08602 goto 08520 08603 end if 08610 let AR$=C$(2:len(C$)) 08615 gosub 06000 08620 let C$=uprc$(C$) 08621 if C>0 and LEFT$("EXIT",C)=C$ and C<5 then 08660 08622 if C>0 and LEFT$("ROOM",C)=C$ and C<5 then 08720 08623 if C>0 and LEFT$("LIST",C)=C$ and C<5 then 08765 08624 if C>0 and LEFT$("HELP",C)=C$ and C<5 then 08562 08625 if C>0 and LEFT$("ROMM",C)=C$ and C<5 then 08720 08626 if C$="ROOMS" then 08720 08627 if C$="?" then 08562 08630 if C>0 and LEFT$("CONTROL",C)=C$ and C<8 then 08800 08631 if C>1 and LEFT$("TAKE",C)=C$ and C<5 then 08800 08632 if C>0 and LEFT$("GRAB",C)=C$ and C<5 then 08800 08633 if C>1 and LEFT$("RELEASE",C)=C$ and C<8 then 08840 08634 if C>0 and LEFT$("ABANDON",C)=C$ and C<8 then 08840 08635 if C$="CLS" then 08865 08636 if C>2 and LEFT$("CLEAR",C)=C$ and C<6 then 08865 08637 if C>0 and LEFT$("TIME",C)=C$ and C<5 then 08880 08638 if C>0 and LEFT$("DATE",C)=C$ and C<5 then 08885 08640 if C>2 and LEFT$("CLOSE",C)=C$ and C<6 then 08900 08641 if C>0 and LEFT$("BARRED",C)=C$ and C<7 then 08900 08642 if C>0 and LEFT$("OPEN",C)=C$ and C<5 then 08900 08645 enable handler RESM, resume at 08650 08646 let I=val(C$) 08647 if I>0 and I<101 then 08724 08650 print "Illegal command. Use // to start a line with / or /HELP for assistance." 08651 goto 08500 08660 let OK=-3 08662 let C$="has returned to the hotel." 08665 goto 08520 08700 input #1 record USER data 00430 08710 let CS%="" 08711 let RM,CC,CI(1),CI(2),CI(3),CI(4),CI(5)=0 08712 output #1 record USER data 00430 08715 if PRV%(1:1)="S" then 09910 else 01000 08720 gosub 06000 ! room number 08721 if C$="" then 08759 08722 enable handler RESM, resume at 08757 08723 let I=val(C$) 08724 if I<1 or I>100 or len(RM$(I))=0 then 08725 print chr$(28);"That room isn't open to the public yet. See the Hotel Manager if you want to";chr$(10);"reserve it.";chr$(29) 08726 goto 08500 08727 end if 08728 if I=ROOM then print chr$(28);"You are already in that room.";chr$(29) 08729 if I=ROOM then 08500 08730 if I<10 or I>89 then 08750 08731 let OLDROOM=ROOM 08732 let ROOM=I 08733 input #1 record USER data 00430 08734 let OLDCC=CC 08735 gosub 08780 08736 if CC=0 then 08749 08737 input #1 record CC data 00430 08738 let RMCTRL=CC 08742 if CS%(1:1)="C" then print chr$(28);"That room is closed. You may /KNOCK on the door if you like.";chr$(29) else if CS%(1:1)="B" then print chr$(28);"That room is barred shut, knocking won't do any good either.";chr$(29) 08743 if CS%(1:1)<>"C" and CS%(1:1)<>"B" then 08750 08744 input #1 record USER data 00430 08745 let CC=OLDCC 08746 output #1 record USER data 00430 08747 let ROOM=OLDROOM 08748 goto 08500 08749 let ROOM=OLDROOM 08750 if I<90 then let C$="has left to "&LEFT$(RM$(I),pos(RM$(I),";")-1) else let C$="has left to another room." 08751 let OK=-2 08752 goto 08520 08753 input #1 record USER data 00430 08754 let RM,ROOM=I 08755 let OK=0 08756 goto 08435 08757 print chr$(28);"Unknown room number.";chr$(29) 08758 goto 08500 08759 print chr$(28);"Room #";ROOM;" -- ";LEFT$(RM$(ROOM),pos(RM$(ROOM),";")-1);chr$(10);" ";RM$(ROOM)(pos(RM$(ROOM),";")+1:len(RM$(ROOM)));chr$(29) 08760 if RMCTRL>0 then 08761 input #1 record RMCTRL data 00430 08762 print chr$(28);" ";rtrm$(HD%);" has control of the room." 08763 end if 08764 goto 08500 08765 print chr$(28);chr$(20);" #";tab(12);"Name";tab(37);"Description";chr$(21) 08771 for I=1 to 100 08772 if RM$(I)<>"" then print I;tab(10);LEFT$(RM$(I),pos(RM$(I),";")-1);tab(35);RM$(I)(pos(RM$(I),";")+1:len(RM$(I))) 08775 next I 08776 print chr$(29) 08777 goto 08500 08780 let TU=0 ! find room owner 08782 let TU=TU+1 08784 input #1 eof 08799, record TU data 00430 08785 if RM=ROOM and CC=TU then 08786 input #1 record USER data 00430 08787 let CC=TU 08788 output #1 record USER data 00430 08789 return 08790 end if 08791 goto 08782 08799 return 08800 if ROOM>9 and ROOM<90 then 08806 ! take control 08801 print chr$(28);"No one may take control of this room.";chr$(29) 08802 goto 08500 08806 input #1 record USER data 00430 08807 if CC=USER then print chr$(28);"You already have control of the room.";chr$(29) 08808 if CC=USER then 08500 08809 let RMCTRL=CC 08810 if CC>0 then 08811 input #1 record CC data 00430 08812 if RMCTRL<>CC or XPID<1 or RM<>ROOM then 08820 08813 print chr$(28);rtrm$(HD%);" has control of the room.";chr$(29) 08814 if MANAGER<>0 and AR$<>"" then 08820 else 08500 08815 end if 08820 let TU=0 08821 let RMCTRL=USER 08822 let TU=TU+1 08824 input #1 eof 08830, record TU data 00430 08825 if RM=ROOM then 08826 let CC=USER 08827 output #1 record TU data 00430 08828 end if 08829 goto 08822 08830 print chr$(28);"Control of the room is now yours.";chr$(29) 08832 let C$="has taken control of the room." 08834 goto 08520 08840 if RMCTRL<1 then print chr$(28);"No one is in control of the room.";chr$(29) ! release control 08841 if RMCTRL<1 then 08500 08842 if MANAGER<>0 and AR$<>"" then 08850 08843 if RMCTRL=USER then 08850 08845 print chr$(28);"You do not have control of the room, ";rtrm$(HD%);" does.";chr$(29) 08846 goto 08500 08850 let TU,RMCTRL=0 08851 let TU=TU+1 08852 input #1 eof 08860, record TU data 00430 08853 if RM=ROOM then 08854 let CC=0 08855 output #1 record TU data 00430 08856 end if 08857 goto 08851 08860 print chr$(28);"You have released control of the room.";chr$(29) 08861 let C$="has released control of the room." 08862 goto 08520 08865 if USER=RMCTRL then 08870 ! Clear screen 08866 print chr$(28);"You must be in control of the room to clear everyone's screen.";chr$(10);"To clear your own, press ERASE PAGE.";chr$(29) 08867 goto 08500 08870 let C$=chr$(12) 08871 goto 08520 08880 let C$="The Time Is "&time$ 08881 if AR$<>"" then 08520 08883 print chr$(28);C$;chr$(29) 08884 goto 08500 08885 let C$="The Date Is "&date$ 08886 if AR$<>"" then 08520 08887 goto 08883 08900 if RMCTRL=USER then 08904 ! CLOSE ROOM 08901 print chr$(28);"You are not in control of the room.";chr$(29) 08902 goto 08500 08904 input #1 record USER data 00430 08905 print chr$(28); 08906 let CS%(1:1)=C$(1:1) 08907 output #1 record USER data 00430 08908 if C$(1:1)="C" then print "You have shut the door, /KNOCK will get your attention." else if C$(1:1)="B" then print "You have barred the door. Knocking will be ignored." else print "You have opened the door." 08909 if C$(1:1)="C" then let C$="has closed the door." else if C$(1:1)="B" then let C$="has barred the door." else let C$="has opened the door." 08910 goto 08520 09100 if SERIES$="" then let SERIES$=str$(B) ! series computation set SERIES to nul and a and b to 0 09102 if B=A+1 then 09103 let A=B 09104 let D=-1 09105 return 09106 end if 09107 if D<>0 then let SERIES$=SERIES$&"-"&str$(A) 09108 if B=0 then return 09109 let D=0 09110 let A=B 09112 let SERIES$=SERIES$&", "&str$(B) 09114 return 09200 disable handler ! scan messages 09210 let TJOIN$=JOIN$ 09220 if TJOIN$(1:1)="*" then 09221 let TJOIN$=TJOIN$(2:len(TJOIN$)) 09222 goto 09220 09223 end if 09225 if TJOIN$="" then return 09230 let V$,M$="" 09232 if pos("0123456789",TJOIN$(1:1))>0 then 09233 let V$=V$&TJOIN$(1:1) 09234 let TJOIN$=TJOIN$(2:len(TJOIN$)) 09235 goto 09232 09236 end if 09237 if TJOIN$(1:2)="*[" then 09238 let TJOIN$=TJOIN$(3:len(TJOIN$)) 09241 if pos("0123456789",TJOIN$(1:1))>0 then 09242 let M$=M$&TJOIN$(1:1) 09243 let TJOIN$=TJOIN$(2:len(TJOIN$)) 09244 goto 09241 09245 end if 09250 let M=val(M$) 09251 let TJOIN$=TJOIN$(2:len(TJOIN$)) 09252 else 09253 let M=0 09254 end if 09260 let V=val(V$) 09265 input #2 eof 09220, record V data 00457 09266 disable handler 09267 if STAT%(1:1)<>"T" then gosub 09400 ! delete topic from join 09268 if STAT%(1:1)<>"T" then 09220 09270 do while MNUM0 09272 input #2 record NMSG data 00457 09273 loop 09275 let CNT=0 09276 do while NMSG>0 09277 input #2 eof 09220, record NMSG data 00457 09278 let CNT=CNT+1 09279 loop 09281 if CNT>0 then 09282 input #2 record V data 00457 09283 print rtrm$(SBJ%);" has";CNT;"new message(s)." 09284 end if 09285 goto 09220 09400 let I=pos(JOIN$,"*"&str$(V)&"*") ! delete topic V from JOIN 09402 if I<1 then return 09404 let J=len(str$(V))+2 09406 if JOIN$(I+J:I+J)="[" then let J=pos(JOIN$,"]",I+1)+1 else let J=pos(JOIN$,"*",I+1) 09407 let JOIN$=JOIN$(1:I-1)&JOIN$(J:len(JOIN$)) 09408 return 09500 enable handler RESM, resume at 09560 ! SAVE JOIN 09501 if rtrm$(JOIN$)="" or rtrm$(JOIN$)="*" then 09530 09502 create rtrm$(JOINFILE%) replace 09503 open #7:rtrm$(JOINFILE%) display, output, sequential, begin, stream 09505 margin #7:0 09508 output #7:JOIN$ 09510 output #7:"The above information is critical to remembering messages read in HDG." 09512 output #7:"Changing it would result is the loss of which messages you have read." 09520 close #7 09521 return 09530 delete rtrm$(JOINFILE$) 09560 return 09600 enable handler RESM, resume at 09660 ! restore JOIN 09605 if rtrm$(JOINFILE%)<>"" then 09610 open #7:rtrm$(JOINFILE%) display, input, sequential, begin, stream 09620 margin #7:0 09630 linput #7 eof 09660:JOIN$ 09640 close #7 09650 end if 09660 if pos(COMMAND$,"NOS")>0 then return else 09200 09900 print "Bye" 09910 gosub 09500 ! save position 09911 enable handler RESM, resume at 09999 09912 input #1 eof 09999, record USER data 00430 09913 let LL$=date$&" "&time$ 09914 let XPID=0 09915 let LL%=LL$ 09916 let PRV%(5:5)="O" ! checked out 09917 output #1 record USER data 00430 09999 close 10000 if MUPET>0 then print chr$(129);chr$(140);chr$(0);chr$(0); 20000 end