mirror of
https://github.com/tgstation/tgstation-server.git
synced 2026-08-27 23:17:20 +01:00
Massive sanity reorganization of project structure
Overall: - Removed all 'TG' prefixes on classes and enums Service: - TGStationServer => ServerInstance - TGServerService => Service - Moved all ServerInstance partial classes to a subfolder - Moved ChatProvider classes, delegate, and interface to a namespace - Moved EventID and ChatMessageType to their own .cs files - Moved SanitizeTopicString to Program - ServerService.cs => Service.cs - Fixed ProjectInstaller being in it's own namespace instead of TGServerService Interface: - Moved ExitCode enum to Command class - Moved all components to a namespace - Moved all component enums to Enumerations.cs - DDInteropCallHolder => DreamDaemonBridge - Move PullRequestInfo and DreamDaemonBridge to their own .cs files - Changes the type of ChannelFactory cache from Dictionary<Type, ChannelFactory> to IDictionary<Type, ChannelFactory>
This commit is contained in:
@@ -2,13 +2,14 @@
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using TGServiceInterface;
|
||||
using TGServiceInterface.Components;
|
||||
|
||||
namespace TGCommandLine
|
||||
{
|
||||
|
||||
class Program
|
||||
{
|
||||
static ExitCode RunCommandLine(IList<string> argsAsList)
|
||||
static Command.ExitCode RunCommandLine(IList<string> argsAsList)
|
||||
{
|
||||
//first lookup the connection string
|
||||
bool badConnectionString = false;
|
||||
@@ -58,7 +59,7 @@ namespace TGCommandLine
|
||||
if (badConnectionString)
|
||||
{
|
||||
Console.WriteLine("Remote connection usage: <-c/--connect> username:password@address:port");
|
||||
return ExitCode.BadCommand;
|
||||
return Command.ExitCode.BadCommand;
|
||||
}
|
||||
|
||||
var res = Server.VerifyConnection();
|
||||
@@ -66,13 +67,13 @@ namespace TGCommandLine
|
||||
{
|
||||
Console.WriteLine("Unable to connect to service: " + res);
|
||||
Console.WriteLine("Remote connection usage: <-c/--connect> username:password@address:port");
|
||||
return ExitCode.ConnectionError;
|
||||
return Command.ExitCode.ConnectionError;
|
||||
}
|
||||
|
||||
if (!Server.Authenticate())
|
||||
{
|
||||
Console.WriteLine("Authentication error: Username/password/windows identity is not authorized!");
|
||||
return ExitCode.ConnectionError;
|
||||
return Command.ExitCode.ConnectionError;
|
||||
}
|
||||
|
||||
if (!SentVMMWarning && Server.VersionMismatch(out string error))
|
||||
@@ -88,7 +89,7 @@ namespace TGCommandLine
|
||||
catch (Exception e)
|
||||
{
|
||||
Console.WriteLine("Error: " + e.ToString());
|
||||
return ExitCode.ConnectionError;
|
||||
return Command.ExitCode.ConnectionError;
|
||||
};
|
||||
}
|
||||
public static string ReadLineSecure()
|
||||
@@ -208,11 +209,11 @@ namespace TGCommandLine
|
||||
break;
|
||||
case "quit":
|
||||
case "exit":
|
||||
return (int)ExitCode.Normal;
|
||||
return (int)Command.ExitCode.Normal;
|
||||
#if DEBUG
|
||||
case "debug-upgrade":
|
||||
Server.GetComponent<ITGSService>().PrepareForUpdate();
|
||||
return (int)ExitCode.Normal;
|
||||
return (int)Command.ExitCode.Normal;
|
||||
#endif
|
||||
default:
|
||||
//linq voodoo to get quoted strings
|
||||
|
||||
Reference in New Issue
Block a user