/// <summary> /// Server side initialization. /// </summary> private void InitServer() { //Debug = true; _isInitialized = true; // Set this first to block any other calls from UpdateBeforeSimulation(). Logger.Init(); MyAPIGateway.Multiplayer.RegisterMessageHandler(ConnectionHelper.StandardServerId, MessageHandler_Server); Logger.Debug("Registered ProcessMessage_Server"); ServerCfg = new ServerConfig(GetAllChatCommands()); }
/// <summary> /// Server side initialization. /// </summary> private void InitServer() { //Debug = true; _isInitialized = true; // Set this first to block any other calls from UpdateBeforeSimulation(). Logger.Init(); Logger.Debug("Server Logger started"); // TODO: restructure the ChatCommandLogic to encapsulate ChatCommandService on the server side. // Required to check security for user calls on the Server side, and call the UpdateBeforeSimulation...() methods for each command. if (!_commandsRegistered) { foreach (ChatCommand command in GetAllChatCommands()) ChatCommandService.Register(command); _commandsRegistered = true; ChatCommandService.Init(); } AdminNotificator.Init(); ProtectionHandler.Init(); MyAPIGateway.Multiplayer.RegisterMessageHandler(ConnectionHelper.ConnectionId, MessageHandler); Logger.Debug("Registered ProcessMessage"); ConnectionHelper.Server_MessageCache.Clear(); ServerCfg = new ServerConfig(GetAllChatCommands()); }