/// <summary>
        /// Initializes Plugin (Loads) and Checks for Out of Date Plugins.
        /// </summary>
        public static void LoadPlugins()
        {
            lock (_plugins)
            {
                LoadPluginsInternal();

                foreach (var kv in _plugins)
                {
                    var plugin = kv.Value;
                    if (plugin.TDSMBuild != Globals.Build)
                    {
                        Tools.WriteLine("[WARNING] Plugin build incorrect: " + plugin.Name);
                    }
                }
            }

            var ctx = new HookContext
            {
            };

            var args = new HookArgs.PluginsLoaded
            {
            };

            HookPoints.PluginsLoaded.Invoke(ref ctx, ref args);
        }
        /// <summary>
        /// Initializes Plugin (Loads) and Checks for Out of Date Plugins.
        /// </summary>
        public static void LoadPlugins()
        {
            lock (plugins)
            {
                LoadPluginsInternal();

                foreach (var kv in plugins)
                {
                    var plugin = kv.Value;
                    if (plugin.TDSMBuild != Statics.BUILD)
                    {
                        ProgramLog.Error.Log("[WARNING] Plugin build incorrect: " + plugin.Name);
                    }
                }
            }

            var ctx = new HookContext
            {
            };

            var args = new HookArgs.PluginsLoaded
            {
            };

            HookPoints.PluginsLoaded.Invoke(ref ctx, ref args);
        }
Пример #3
0
 void OnPluginsLoaded(ref HookContext ctx, ref HookArgs.PluginsLoaded args)
 {
     UsingPermissions = IsRunningPermissions();
     if (UsingPermissions)
     {
         Log("Using Permissions.");
     }
     else
     {
         Log("No Permissions Found\nUsing Internal User System");
     }
 }
        void OnPluginsLoaded(ref HookContext ctx, ref HookArgs.PluginsLoaded args)
        {
            Permissions.LoadPerms(permissionsYML);

            if (!Server.UsingLoginSystem)
            {
                Login.InitSystem();
            }

            if (Login.IsRestrictRunning())
            {
                ProgramLog.Plugin.Log("Your Server is now protected!");
            }
            else
            {
                ProgramLog.Plugin.Log("Your Server is vulnerable, Get an Authentication system!");
            }
        }
        void OnPluginsLoaded(ref HookContext ctx, ref HookArgs.PluginsLoaded args)
        {
            if (Properties.AllowRestrictAutoDownload)
            {
                var authSystem = new Auth();
                if (!Server.UsingLoginSystem)
                {
                    authSystem.InitSystem(Languages);
                }

                if (authSystem.IsRestrictRunning())
                {
                    ProgramLog.Plugin.Log(Languages.Protected);
                }
                else
                {
                    ProgramLog.Plugin.Log(Languages.GetAuth);
                }
            }
            else
            {
                ProgramLog.Plugin.Log(Languages.GetAuth);
            }
        }