Code cleanup

This commit is contained in:
mysticbbs 2012-02-22 02:30:43 -05:00
parent 72eec6e35b
commit 2d8602426f
2 changed files with 22 additions and 30 deletions

View File

@ -442,7 +442,7 @@ Begin
While Not Eof(FBaseFile) Do Begin While Not Eof(FBaseFile) Do Begin
Read (FBaseFile, FBase); Read (FBaseFile, FBase);
FBase.Path := Config.SystemPath + 'files' + PathChar + FBase.FileName + PathChar; FBase.Path := Config.SystemPath + 'files' + PathChar + FBase.FileName + PathChar;
Seek (FBaseFile, FilePos(FBaseFile) - 1); Seek (FBaseFile, FilePos(FBaseFile) - 1);
Write (FBaseFile, FBase); Write (FBaseFile, FBase);
@ -473,7 +473,7 @@ Begin
ClearDisplay; ClearDisplay;
CreateDirectories; CreateDirectories;
ExtractFile (14, '|08[|15û|08] |07Installing root files|08...', 'install_data', 'ROOT', Config.SystemPath); ExtractFile (14, '|08[|15û|08] |07Installing root files|08...', 'install_data', 'ROOT', Config.SystemPath);
ExtractFile (15, '|08[|15û|08] |07Installing display files|08...', 'install_data', 'TEXT', Lang.TextPath); ExtractFile (15, '|08[|15û|08] |07Installing display files|08...', 'install_data', 'TEXT', Lang.TextPath);
ExtractFile (16, '|08[|15û|08] |07Installing menu files|08...', 'install_data', 'MENUS', Lang.MenuPath); ExtractFile (16, '|08[|15û|08] |07Installing menu files|08...', 'install_data', 'MENUS', Lang.MenuPath);
ExtractFile (17, '|08[|15û|08] |07Installing script files|08...', 'install_data', 'SCRIPT', Config.ScriptPath); ExtractFile (17, '|08[|15û|08] |07Installing script files|08...', 'install_data', 'SCRIPT', Config.ScriptPath);
@ -564,18 +564,19 @@ Begin
Pos := 1; Pos := 1;
{$IFDEF UNIX} {$IFDEF UNIX}
Config.SystemPath := '/mystic/'; Config.SystemPath := '/mystic/';
{$ELSE} {$ELSE}
Config.SystemPath := 'c:\mystic\'; Config.SystemPath := 'c:\mystic\';
{$ENDIF} {$ENDIF}
Config.DataPath := Config.SystemPath + 'data' + PathChar;
Lang.TextPath := Config.SystemPath + 'text' + PathChar; Config.DataPath := Config.SystemPath + 'data' + PathChar;
Lang.MenuPath := Config.SystemPath + 'menus' + PathChar; Lang.TextPath := Config.SystemPath + 'text' + PathChar;
Config.MsgsPath := Config.SystemPath + 'msgs' + PathChar; Lang.MenuPath := Config.SystemPath + 'menus' + PathChar;
Config.SemaPath := Config.SystemPath + 'semaphore' + PathChar; Config.MsgsPath := Config.SystemPath + 'msgs' + PathChar;
Config.ScriptPath := Config.SystemPath + 'scripts' + PathChar; Config.SemaPath := Config.SystemPath + 'semaphore' + PathChar;
Config.AttachPath := Config.SystemPath + 'attach' + PathChar; Config.ScriptPath := Config.SystemPath + 'scripts' + PathChar;
Config.LogsPath := Config.SystemPath + 'logs' + PathChar; Config.AttachPath := Config.SystemPath + 'attach' + PathChar;
Config.LogsPath := Config.SystemPath + 'logs' + PathChar;
Repeat Repeat
Screen.WriteXY (30, 13, 15, strPadR(Config.SystemPath, 40, ' ')); Screen.WriteXY (30, 13, 15, strPadR(Config.SystemPath, 40, ' '));
@ -590,24 +591,25 @@ Begin
Case Pos of Case Pos of
1 : Begin 1 : Begin
Str := Path(Input(30, 13, 40, 40, Config.SystemPath)); Str := Path(Input(30, 13, 40, 40, Config.SystemPath));
If Str <> Config.SystemPath Then Begin
If Str <> Config.SystemPath Then Begin
Config.DataPath := Change(Config.DataPath); Config.DataPath := Change(Config.DataPath);
Lang.TextPath := Change(Lang.TextPath); Lang.TextPath := Change(Lang.TextPath);
Lang.MenuPath := Change(Lang.MenuPath); Lang.MenuPath := Change(Lang.MenuPath);
Config.MsgsPath := Change(Config.MsgsPath); Config.MsgsPath := Change(Config.MsgsPath);
Config.SemaPath := Change(Config.SemaPath); Config.SemaPath := Change(Config.SemaPath);
Config.ScriptPath := Change(Config.ScriptPath); Config.ScriptPath := Change(Config.ScriptPath);
Config.AttachPath := Change(Config.AttachPath); Config.AttachPath := Change(Config.AttachPath);
Config.LogsPath := Change(Config.LogsPath); Config.LogsPath := Change(Config.LogsPath);
Config.SystemPath := Str; Config.SystemPath := Str;
End; End;
End; End;
2 : Config.DataPath := Path(Input(30, 14, 40, 40, Config.DataPath)); 2 : Config.DataPath := Path(Input(30, 14, 40, 40, Config.DataPath));
3 : Lang.TextPath := Path(Input(30, 15, 40, 40, Lang.TextPath)); 3 : Lang.TextPath := Path(Input(30, 15, 40, 40, Lang.TextPath));
4 : Lang.MenuPath := Path(Input(30, 16, 40, 40, Lang.MenuPath)); 4 : Lang.MenuPath := Path(Input(30, 16, 40, 40, Lang.MenuPath));
5 : Config.MsgsPath := Path(Input(30, 17, 40, 40, Config.MsgsPath)); 5 : Config.MsgsPath := Path(Input(30, 17, 40, 40, Config.MsgsPath));
6 : Config.SemaPath := Path(Input(30, 18, 40, 40, Config.SemaPath)); 6 : Config.SemaPath := Path(Input(30, 18, 40, 40, Config.SemaPath));
7 : Config.ScriptPath := Path(Input(30, 19, 40, 40, Config.ScriptPath)); 7 : Config.ScriptPath := Path(Input(30, 19, 40, 40, Config.ScriptPath));
8 : Config.AttachPath := Path(Input(30, 20, 40, 40, Config.AttachPath)); 8 : Config.AttachPath := Path(Input(30, 20, 40, 40, Config.AttachPath));
9 : Config.LogsPath := Path(Input(30, 21, 40, 40, Config.LogsPath)); 9 : Config.LogsPath := Path(Input(30, 21, 40, 40, Config.LogsPath));

View File

@ -357,7 +357,6 @@ Begin
TelnetServer := TServerManager.Create(bbsConfig, bbsConfig.InetTNPort, bbsConfig.INetTNNodes, NodeData, @CreateTelnet); TelnetServer := TServerManager.Create(bbsConfig, bbsConfig.InetTNPort, bbsConfig.INetTNNodes, NodeData, @CreateTelnet);
TelnetServer.Server.FTelnetServer := True; TelnetServer.Server.FTelnetServer := True;
// TelnetServer.TextPath := bbsConfig.DataPath;
TelnetServer.ClientMaxIPs := bbsConfig.InetTNDupes; TelnetServer.ClientMaxIPs := bbsConfig.InetTNDupes;
Started := True; Started := True;
@ -369,7 +368,6 @@ Begin
SMTPServer.Server.FTelnetServer := False; SMTPServer.Server.FTelnetServer := False;
SMTPServer.ClientMaxIPs := 1; SMTPServer.ClientMaxIPs := 1;
// SMTPServer.TextPath := bbsConfig.DataPath;
Started := True; Started := True;
End; End;
@ -379,7 +377,6 @@ Begin
POP3Server.Server.FTelnetServer := False; POP3Server.Server.FTelnetServer := False;
POP3Server.ClientMaxIPs := bbsConfig.inetPOP3Dupes; POP3Server.ClientMaxIPs := bbsConfig.inetPOP3Dupes;
// POP3Server.TextPath := bbsConfig.DataPath;
Started := True; Started := True;
End; End;
@ -389,7 +386,6 @@ Begin
FTPServer.Server.FTelnetServer := False; FTPServer.Server.FTelnetServer := False;
FTPServer.ClientMaxIPs := bbsConfig.inetFTPDupes; FTPServer.ClientMaxIPs := bbsConfig.inetFTPDupes;
// FTPServer.TextPath := bbsConfig.DataPath;
Started := True; Started := True;
End; End;
@ -416,9 +412,7 @@ Begin
Halt(10); Halt(10);
End; End;
// BarPos := 1; Count := 0;
// TopPage := 1;
Count := 0;
DrawStatusScreen; DrawStatusScreen;
@ -429,10 +423,6 @@ Begin
If Input.KeyWait(1000) Then If Input.KeyWait(1000) Then
Case Input.ReadKey of Case Input.ReadKey of
#00 : Case Input.ReadKey of #00 : Case Input.ReadKey of
// #37 : If (FocusPtr <> NIL) And (FocusPtr.ClientList[BarPos - 1] <> NIL) Then Begin
// TServerClient(FocusPtr.ClientList[BarPos - 1]).Client.Disconnect;
// UpdateConnectionList;
// End;
#72 : If BarPos > TopPage Then Begin #72 : If BarPos > TopPage Then Begin
Dec(BarPos); Dec(BarPos);
UpdateConnectionList; UpdateConnectionList;