🚧 plugin system, webhook system

This commit is contained in:
2023-04-09 10:52:18 +04:00
parent f2edc94958
commit bfd6c1b54b
60 changed files with 762 additions and 267 deletions
@@ -25,6 +25,11 @@ public enum ServerType
WEBSOCKET,
}
public class WebHook
{
}
[Serializable]
public struct Configuration
{
@@ -36,6 +41,7 @@ public struct Configuration
public int LimitConnections;
public int LimitPlayersPerRoom;
public int LimitRooms;
public Dictionary<string, string> WebHooks;
private static readonly Logger Logger = LogManager.GetCurrentClassLogger();
private static readonly string ServerVersion = "1.1.3-rc";
@@ -45,20 +51,6 @@ public struct Configuration
{"websocket", Server.ServerType.WEBSOCKET}
};
private static void CopyrightInfo()
{
Logger.Info($"Server Version: {ServerVersion}");
Logger.Info($"Machine Name: {Environment.MachineName}");
Logger.Info($"OS: {Environment.OSVersion}");
Logger.Info($"Processors: {Environment.ProcessorCount}");
Logger.Info($"Runtime Version: {Environment.Version}");
Logger.Info("==================================");
Logger.Info("| |");
Logger.Info("| Ragon |");
Logger.Info("| |");
Logger.Info("==================================");
}
public static Configuration Load(string filePath)
{
CopyrightInfo();
@@ -68,5 +60,20 @@ public struct Configuration
return configuration;
}
private static void CopyrightInfo()
{
Logger.Info($"Server Version: {ServerVersion}");
Logger.Info($"Machine Name: {Environment.MachineName}");
Logger.Info($"OS: {Environment.OSVersion}");
Logger.Info($"Processors: {Environment.ProcessorCount}");
Logger.Info($"Runtime Version: {Environment.Version}");
Logger.Info("==================================");
Logger.Info(@" ___ _ ___ ___ _ _ ");
Logger.Info(@" | _ \ /_\ / __|/ _ \| \| |");
Logger.Info(@" | / / _ \ (_ | (_) | .` |");
Logger.Info(@" |_|_\/_/ \_\___|\___/|_|\_|");
Logger.Info("==================================");
}
public static ServerType GetServerType(string type) => _serverTypes[type];
}