home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 341.img / TCS161S.ZIP / TCS.PAS < prev    next >
Pascal/Delphi Source File  |  1990-07-28  |  6KB  |  189 lines

  1.                                                                                     (*
  2.                  TCS Staff Members
  3.                  ─────────────────
  4.     Renegade Bithead    Kid Devious        Lord Zombie
  5.     Doc Savage            Barimor                    Maniac
  6.     Lord Blix            The Viper
  7.  
  8.  
  9.               TCS BBS Software v1.61
  10.  
  11.  
  12.  
  13. Program TCS;
  14.  
  15. {$R-        Range checking  Off            Don't change               }
  16. {$S-        Stack checking  On             Makes code larger/slower   }
  17. {$I-          I/O checking  Off            Don't change               }
  18. {$D+     Debug information  On             Helps finding bugs         }
  19. {$F+       Force far calls  On             Required for Overlaying    }
  20. {$V-   Var-string checking  Relaxed        Don't change               }
  21. {$B-    Boolean evaluation  Short Cicuit   Don't change               }
  22. {$N-    Numeric processing  Software       Change if you have an 8087 }
  23. {$O+      Overlay checking  On             Don't change               }
  24. {$M 34000,0,0   Stack/heap  64k/none       Don't change               }
  25. {$DEFINE OVERLAY}
  26.  
  27. Uses
  28.   {$IFDEF OVERLAY}
  29.   Initovr,  { Overlay Initialization }
  30.   {$ENDIF}
  31.   Crt,      { Turbo Pascal 5.0 Crt library }
  32.   Dos,      { Turbo Pascal 5.0 Dos library }
  33.   Printer,  { Turbo Pascal 5.0 Printer library }
  34.   {$IFDEF OVERLAY}
  35.   Overlay,  { Turbo Pascal 5.0 Overlay library }
  36.   {$ENDIF}
  37.  
  38.  
  39.   Main,     { Main menu shell }
  40.   Gentypes, { All type and constant declarations }
  41.   Configrt, { Configuration declarations / procedures }
  42.   Modem,    { Modem support }
  43.   Statret,  { System status declarations / procedures }
  44.   Gensubs,  { General subroutines: lowest level }
  45.   Subs1,    { First subroutine library }
  46.   Windows,  { Routines to manage the split screen }
  47.   Subs2,    { Second subroutine library: higher level I/O }
  48.   Textret,  { Message Base routines }
  49.   Mailret,  { E-Mail routines }
  50.   Userret,  { User routines }
  51.   Flags,    { Board access flag routines }
  52.   Mainr1,   { High-level routines, set one }
  53.   Ansiedit, { Full-screen editor }
  54.   Lineedit, { Line editor }
  55.   Chatstuf, { Chat mode routines }
  56.   Mainr2,   { High-level routines, set two }
  57.   Overret1, { High-level routines, set three }
  58.   Subs3,    { Third subroutine library: externals, etc }
  59.  
  60.   About,    {  About this BBS section }
  61.   Bulletin, {        Bulletin section }
  62.   Configur, {   Configuration section }
  63.   Database, {        Database section }
  64.   Doors,    {            Door section }
  65.   Email,    { Electronic mail section }
  66.   Filexfer, {   File Transfer section }
  67.   Voting,   {          Voting section }
  68.   Mycomman, {  User Utilities section }
  69.   Gfiles,   {         G-Files section }
  70.   Viewansi, {  Screen Viewing section }
  71.   Rumors,   {   Random Rumors section }
  72.   Gamble,   {        Gambling section }
  73.   Trivia,   { Uses The Trivia section }
  74.  
  75.   Mainmenu, { Main menu commands }
  76.   Waitcall, { Waiting for calls }
  77.   Getlogin, { Log-in procedure }
  78.   Init;     { Initialization routines }
  79. (*  stack5; *)  { Reports stack usage  -  usually commented out }
  80.  
  81. {$IFDEF OVERLAY}
  82. {$O About}
  83. {$O Bulletin}
  84. {$O Configur}
  85. {$O Database}
  86. {$O Doors}
  87. {$O Email}
  88. {$O Filexfer}
  89. {$O Gfiles}
  90. {$O Viewansi}
  91. {$O Voting}
  92. {$O waitcall}
  93. {$O Getlogin}
  94. {$O Init}
  95. {$O Rumors}
  96. {$O Subs3}
  97. {$O gamble}
  98. {$O Trivia}
  99. {$ENDIF}
  100.  
  101. var gototcsterm:boolean;
  102.     q          :integer;
  103.  
  104. begin
  105.   checkbreak:=false;
  106.   readconfig;
  107.   validconfiguration;
  108.   initboard (true);
  109.   fromdoor:=paramcount>=3;
  110.   repeat
  111.     gototcsterm:=false;
  112.     returnfromdoor;
  113.     if not fromdoor then begin
  114.       gototcsterm:=waitforacall;
  115.       if gototcsterm then else getloginproc
  116.     end;
  117.     if not gototcsterm then begin
  118.       votingbooth (true);
  119.       begin
  120.        repeat
  121.         if fromdoor and (returnto='D') then doorsmenu;
  122.         cursection:=mainsysop;
  123.         randomrumor;
  124.         echoit:=true;
  125.     q:=menu ('Main Menu','MAIN','ABCDEFGHIJKLMNOPQRSTUVWXYZ+-!&$%@=*.');
  126.         writeln;
  127.         case q of
  128.           1:aboutthisbbs;
  129.           2:bbslist;
  130.           3:summonsysop;
  131.           4:datamenu;
  132.           5:emailmenu;
  133.           6:feedback;
  134.           7:offtcs;
  135.           8:mainhelp;
  136.           9:begin
  137.              writeln;
  138.              writestr ('Which Info-Form would you like to fill out [#1-5]? *');
  139.              if (valu(input)>0) or (valu(input)<6) then
  140.               infoform (valu(input)) else
  141.              writeln (^M'Invalid Info-Form Number!'^M);
  142.             end;
  143.           10: if usegambling then begin;
  144.           credits:=0;
  145.           game;
  146.           end;
  147.           11:configure;
  148.           12:listusers;
  149.           13:bulletinmenu;
  150.           14:printnews;
  151.           15:doorsmenu;
  152.           16:gfilesection;
  153.           17:write (^M+'That command not available from this menu.'+^M);
  154.           18:rumormenu;
  155.           19:showsystemstatus;
  156.           20:udsection;
  157.           21:playTrivia;
  158.           22:votingbooth(false);
  159.           23:showlastcallers;
  160.           24:transfername;
  161.           25:allstatus;
  162.           26:setlastcall;
  163.           27:changepwd;
  164.           28:write (^M+'If you want your name changed then leave [F]eedback to the Sysop.'+^M);
  165.           29:requestraise;
  166.           30:showad;
  167.           31:donations;
  168.           32:mainsysopcommands;
  169.           33:setmenutype;
  170.       34:viewansiscreens;
  171.       35:showcredits;
  172.         end
  173.       until hungupon
  174.       end;
  175.       fromdoor:=false;
  176.       if not disconnected then disconnect;
  177.       ensureclosed;
  178.       clrscr;
  179.       if sysnext then begin
  180.         dontanswer;
  181.         halt (4)
  182.       end;
  183.       initboard (false)
  184.     end
  185.   until not gototcsterm;
  186.   dontanswer;
  187.   halt (0)
  188. end.
  189.