1
0
Fork 0
mirror of https://github.com/sbrl/Nibriboard.git synced 2018-01-10 21:33:49 +00:00
Nibriboard/Nibriboard/Program.cs

53 lines
1.4 KiB
C#

using System;
using System.Reflection;
using System.Threading.Tasks;
using SBRL.Utilities;
namespace Nibriboard
{
class MainClass
{
public static void Main(string[] args)
{
string packedRippleSpaceFile = "./default.ripplespace.zip";
for(int i = 0; i < args.Length; i++)
{
switch(args[i])
{
case "-h":
case "--help":
Console.WriteLine("Nibriboard Server");
Console.WriteLine("By Starbeamrainbowlabs");
Console.WriteLine();
Console.WriteLine("Usage:");
Console.WriteLine(" ./Nibriboard.exe [options]");
Console.WriteLine();
Console.WriteLine("Options:");
Console.WriteLine(" -h --help Shows this message");
Console.WriteLine(" -f --file [filepath] Specify the path to the packed ripplespace file to load. Defaults to '{0}'.", packedRippleSpaceFile);
Console.WriteLine();
return;
case "-f":
case "--file":
packedRippleSpaceFile = args[++i];
break;
}
}
Log.WriteLine("[core] Starting Nibriboard.");
Log.WriteLine("[core] Detected embedded files: ");
EmbeddedFiles.WriteResourceList();
Log.WriteLine("[core] Loading ripple space from \"{0}\".", packedRippleSpaceFile);
NibriboardServer server = new NibriboardServer(packedRippleSpaceFile);
Task.WaitAll(
server.Start(),
server.StartCommandListener()
);
}
}
}