Пример #1
0
        private void OnServerInitialized()
        {
            if (serverInitialized)
            {
                return;
            }

            if (Interface.Oxide.CheckConsole() && ServerConsole.Instance != null)
            {
                ServerConsole.Instance.enabled = false;
                UnityEngine.Object.Destroy(ServerConsole.Instance);
                typeof(SingletonComponent <ServerConsole>).GetField("instance", BindingFlags.NonPublic | BindingFlags.Static)?.SetValue(null, null);
            }

            Analytics.Collect();
            RustExtension.ServerConsole();

            if (!Interface.Oxide.Config.Options.Modded)
            {
                Interface.Oxide.LogWarning("The server is currently listed under Community. Please be aware that Facepunch only allows admin tools" +
                                           "(that do not affect gameplay) under the Community section");
            }

            serverInitialized = true;
        }
Пример #2
0
 private object IOnEnableServerConsole(ServerConsole serverConsole)
 {
     if (!Interface.Oxide.CheckConsole(true))
     {
         return(null);
     }
     serverConsole.enabled = false;
     UnityEngine.Object.Destroy(serverConsole);
     typeof(SingletonComponent <ServerConsole>).GetField("instance", BindingFlags.NonPublic | BindingFlags.Static)?.SetValue(null, null);
     RustExtension.EnableConsole();
     return(false);
 }