Esempio n. 1
0
        public void LoadExtension(Type t)
        {
            if (!t.IsSubclassOf(typeof(ServerExtensionBase)))
            {
                throw new Exception("Not a valid extension!");
            }

            ServerExtensionBase ext = null;

            ext.Initialize();
            _extensions.Add(ext);
        }
Esempio n. 2
0
        public ExtensionManager(Server server)
        {
            _server = server;
            var baseExtensions = new ServerExtensionBase[]
            {
                new Included.BanHammer(server),
                new Included.ExtensionLoader(server)
            };

            foreach (var ext in baseExtensions)
            {
                _extensions.Add(ext);
                ext.Initialize();
            }
        }