home *** CD-ROM | disk | FTP | other *** search
/ Jason Aller Floppy Collection / 189.img / TCS120S.ZIP / TCS.PAS < prev    next >
Pascal/Delphi Source File  |  1989-04-06  |  6KB  |  189 lines

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