예제 #1
0
파일: Core.cs 프로젝트: djmuted/Redfox
 public static void Boot()
 {
     LogManager.GetCurrentClassLogger().Info("Booting Redfox server...\r\n\r\n  ██████╗ ███████╗██████╗ ███████╗ ██████╗ ██╗  ██╗\r\n  ██╔══██╗██╔════╝██╔══██╗██╔════╝██╔═══██╗╚██╗██╔╝\r\n  ██████╔╝█████╗  ██║  ██║█████╗  ██║   ██║ ╚███╔╝ \r\n  ██╔══██╗██╔══╝  ██║  ██║██╔══╝  ██║   ██║ ██╔██╗ \r\n  ██║  ██║███████╗██████╔╝██║     ╚██████╔╝██╔╝ ██╗\r\n  ╚═╝  ╚═╝╚══════╝╚═════╝ ╚═╝      ╚═════╝ ╚═╝  ╚═╝\r\n                           ___ ___ _ ___ _____ _ _ \r\n                          (_-</ -_) '_\\ V / -_) '_|\r\n                          /__/\\___|_|  \\_/\\___|_|  \r\n");
     Core.serverConfig = ServerConfig.FromFile("Config/Server.json");
     try
     {
         InitializeExtensions();
     }
     catch (Exception ex) when(!Env.Debugging)
     {
         LogManager.GetCurrentClassLogger().Error("There was an error while initializing extensions: " + ex.ToString());
         CleanUp();
     }
     messageHandler = new MessageHandlerManager();
     UserManager    = new UserManager();
     try
     {
         InitializeZones();
     }
     catch (Exception ex) when(!Env.Debugging)
     {
         LogManager.GetCurrentClassLogger().Error("There was an error while initializing zones: " + ex.ToString());
         CleanUp();
     }
     try
     {
         InitializeNetwork();
     }
     catch (Exception ex) when(!Env.Debugging)
     {
         LogManager.GetCurrentClassLogger().Error("There was an error while initializing network: " + ex.ToString());
         CleanUp();
     }
     LogManager.GetCurrentClassLogger().Info("Redfox server is ready");
 }