public void InitSystem(Languages languages)
        {
            if (!IsRestrictRunning())
            {
                ProgramLog.Plugin.Log(languages.NoAuth);

                string restrict = Statics.PluginPath + Path.DirectorySeparatorChar + "RestrictPlugin";
                string dll = restrict + ".dll";

                if (!UpdateManager.performUpdate(RestrictLink, restrict + ".upt", restrict + ".bak", dll, 1, 1, "Restrict"))
                {
                    ProgramLog.Error.Log(languages.RestrictDlFailed);
                    return;
                }

                PluginLoadStatus loadStatus = PluginManager.LoadAndInitPlugin(dll);
                if (loadStatus != PluginLoadStatus.SUCCESS)
                    ProgramLog.Error.Log(
                        "{0}\n{1} {2}", languages.RestrictLoadFail, languages.RestrictLoadResult, loadStatus);
            }
        }
        protected override void Initialized(object state)
        {
            Languages = new Languages();
            Languages.LoadLanguages(this);

            XLog(Languages.Initializing);

            Touch();

            Properties = new XProperties(GetPropertiesPath);
            Properties.Load();
            Properties.pushData();
            Properties.Save(false);

            XmlParser = new Xml(GetPermissionsFile);

            AddCommand("xuser")
                .WithAccessLevel(AccessLevel.OP)
                .WithPermissionNode("xperms.xuser")
                .Calls(Users);

            AddCommand("xuserperms")
                .WithAccessLevel(AccessLevel.OP)
                .WithPermissionNode("xperms.xuserperms")
                .Calls(UserPermissions);

            AddCommand("xgroup")
                .WithAccessLevel(AccessLevel.OP)
                .WithPermissionNode("xperms.xgroup")
                .Calls(Groups);

            AddCommand("xgroupperms")
                .WithAccessLevel(AccessLevel.OP)
                .WithPermissionNode("xperms.xgroupperms")
                .Calls(GroupPermissions);

            AddCommand("xuserattribute")
                .WithAccessLevel(AccessLevel.OP)
                .WithPermissionNode("xperms.xuserattribute")
                .Calls(UserAttributes);

            AddCommand("xgroupattribute")
                .WithAccessLevel(AccessLevel.OP)
                .WithPermissionNode("xperms.xgroupattribute")
                .Calls(GroupAttributes);

            AddCommand("xmanagement")
                .WithAccessLevel(AccessLevel.OP)
                .WithPermissionNode("xperms.xmanagement")
                .Calls(Management);
        }