Unit BBSGlbls;



interface

{***************************************************************************}

{***************************************************************************}

Uses

  Glob;



const

  Version_G = 'Test';

  RegNum_G = 'T91';

  Owner_G = 'Deadliner Cognomen';

  BBS_G = 'WYRM';

  ManagerPassword = 'Jabberwocky';



const

  BaudInit = 2400; {* Highest BAUD available as it will try this first *}

  NumPorts      = 2; {* Max = 2, but really slows it down *}

  BufSize_G    = 1100; {* minimum required for Y-Modem *}

  AreaMaxStack     = 10;

  VarIntegerMaxStack  = 4;

  VarStrMaxStack   = 6;

  VarTextMaxStack  = 3;

  SublimRangeMax   = 20;



type

  AreaType = (Zero,

              WaitConnect,

              WaitConnect_1,

              GetName,

              GetName_1,

              GetName_2,

              GetName_3,

              UserInput,

              Register,

              Register_1,

              Register_2,

              Register_3,

              Register_4,

              PassTime,

              PasswordGood,

              PasswordGood_1,

              Welcome,

              Prompt,

              Prompt_1,

              LogOff,

              LogOff_1,

              Disconnect,

              Disconnect_1,

              Disconnect_2,

              BullNext,

              BullNext_1,

              BullPost,

              BullPost_1,

              BullRead,

              BullRead_1,

              Bulletins,

              BullDel,

              BullDel_1,

              BullEdit,

              BullPrompt,

              BullPrompt_1,

              BullSubMake,

              BullSubMake_1,

              BullSubKill,

              BullSubKill_1,

              BullSubCon,

              BullSubCon_1,

              BullSubCon_2,

              BullSubDown,

              BullSubDown_1,

              BullSubOpen,

              BullSubUp,

              BullSubUp_1,

              BullPickedChild,

              BullPickedChild_1,

              BullPickedParent,

              BullPickedParent_1,

              BullPickedBull,

              BullPickedBull_1,

              BullPickedBull_2,

              CallBack,

              CallBack_1,

              CallBack_2,

              CallBack_3,

              CallBack_4,

              Comment,

              Comment_1,

              EditAppend,

              EditAppend_1,

              EditDelete,

              EditDelete_1,

              EditDelete_2,

              EditInsert,

              EditInsert_1,

              EditInsert_2,

              EditModify,

              EditModify_1,

              EditModify_2,

              EditPrompt,

              EditPrompt_1,

              FileShow,

              FileShow_1,

              HangUp,

              HangUp_1,

              HangUp_2,

              HangUp_3,

              Mail,

              Mail_1,

              MailSend,

              MailSend_1,

              MailSend_2,

              MailRead,

              ModemSetup,

              ModemSetup_1,

              MakePassword,

              MakePassword_1,

              MakePassword_2,

              Pause,

              Pause_1,

              Statistics,

              Statistics_1,

              StatUser,

              StatUser_1,

              StatUsersDel,

              StatUsersDel_1,

              StatUsersShow,

              StatUsersShow_1,

              XFilePrompt,

              XFilePrompt_1,

              XFileDown,

              XFileDown_1,

              XFileDown_2,

              XFileDown_3,

              XFileRem,

              XFileRem_1,

              XFileUp,

              XFileUp_1,

              XFileUp_2,

              XFileUp_3,

              XFileUp_4,

              XFileUp_5,

              XFileView,

              XFileView_1

             );





var

  Area    : array[0..NumPorts, 1..AreaMaxStack] of AreaType;

  AreaTOS : array[0..NumPorts] of integer;

  DelayDone: array[0..NumPorts] of real;

  VarInteger   : array[0..NumPorts, 1..VarIntegerMaxStack] of Integer;

  VarIntegerTOS: array[0..NumPorts] of integer;

  VarStr    : array[0..NumPorts, 1..VarStrMaxStack] of string;

  VarStrTOS : array[0..NumPorts] of integer;

  VarText   : array[0..NumPorts, 1..VarTextMaxStack] of text;

  VarTextTOS: array[0..NumPorts] of integer;

  UserName: array[0..NumPorts] of string;

  UserID  : array[0..NumPorts] of integer;

  Port    : integer;

  SaveX   : array[0..NumPorts] of integer;

  SaveY   : array[0..NumPorts] of integer;

  WinX1,

  WinX2,

  WinY1,

  WinY2: array[0..NumPorts] of integer;



var

  Baud: array[0..NumPorts] of integer;

  IsCallBack: array[0..NumPorts] of boolean;

  LoginOK:  array[0..NumPorts] of boolean;

  SessInStr : array[0..NumPorts] of string;

  PortOutStr: array[0..NumPorts] of string;

{*  InputFrom: array[0..NumPorts, 0..NumPorts] of boolean;

  OutputTo : array[0..NumPorts, 0..NumPorts] of boolean;

*}

  Echo: array[0..NumPorts] of boolean;

  InStrMaxLen: array[0..NumPorts] of byte;

  WordWrap: array[0..NumPorts] of boolean;



{* TIME RELATED *}

const

  ModemDelay   = 1000;

  NewUserTime  = 60*60;

  LogInTime    = 60*2;

  InputTime    = 60*10;

  RegisterTime = 60*1;

  ConnectTime  = 30;

  CallBackTime = 60;

var

  BeepTime: array[0..NumPorts] of real;

  InputDeadLine: array[0..NumPorts] of double;

  ResetDateTime: array[0..NumPorts] of longint;

  DateTimeLogOut: array[0..NumPorts] of longint;

  UserMenu: array[0..NumPorts] of string;

  UserPrivs: array[0..NumPorts] of longint;



  LinesPerPage: array[0..NumPorts] of integer;



  Password1,

  Password2: string; {* Required by DoMakePassword *}



  SublimRange: integer;

  Sublim: array[1..SublimRangeMax] of string;



const

  NewUserMenu = 'ON';



  LineLen = 78;



  TrashDir = 'BBSTrash.BBS';

  UsersDir = 'BBSUsers.BBS';

  StatsDir = 'BBSystem.BBS';



  ConfigFile = 'WyrmBBS.CFG';

  FileListFile = StatsDir + '\' + 'FileList.BBS';

  FileListLines = 7;

  NewUserMailFile = StatsDir + '\NewUserM.BBS';

  StatFile = StatsDir + '\BBSStats.BBS';

  UsersLog = UsersDir + '\UsersLog.BBS';

  ErrorLog = StatsDir + '\ErrorLog.BBS';

  TempFile = TrashDir + '\TempFile.BBS';

  MailBox = 'MailBox.BBS';

  SubliminalFile = StatsDir + '\Sublims.BBS';



  PasswordMinLen = 6;



  {* privileges based on a 32-bit longint *}

  AllPrivs         = -1;

  ChangePrivsPriv  = (MaxLongInt + 1) div 2; {* MSB only I assume *}

  NewUserPrivs     = 1 + 2 + 8;

  BullReadPriv     = 1;

  BullPostPriv     = 2;

  BullKillPriv     = 4;

  BullAllPrivs     = 7;

  BullAreaMakePriv = 8;

  BullAreaKillPriv = 16;

  UserDelPriv      = 32;

  FileDelPriv      = 64;

  BullEditPriv     = 128;

var

  ExitSave: pointer;



implementation

{***************************************************************************}

{***************************************************************************}



{***************************************************************************}

{***************************************************************************}

{***************************************************************************}

begin

end.