public ThreatLevelDefinition(ThreatLevel threatLevel, UserSet userSet, ScriptProtectionModule module)
            {
                m_threatLevel = threatLevel;
                m_userSet = userSet;
                m_scriptProtectionModule = module;
                m_allowGroupPermissions = m_scriptProtectionModule.m_config.GetBoolean(
                    "AllowGroupThreatPermissionCheck", m_allowGroupPermissions);

                string perm = m_scriptProtectionModule.m_config.GetString("Allow_" + m_threatLevel.ToString(), "");
                if (perm != "")
                {
                    string[] ids = perm.Split(',');
                    m_allowedUsers = ids.Select(id =>
                    {
                        UUID uuid;
                        if (UUID.TryParse(id.Trim(), out uuid))
                            return uuid;
                        else
                            return UUID.Zero;
                    }).Where((id) => id != UUID.Zero).ToList();
                }
                perm = m_scriptProtectionModule.m_config.GetString("Allow_All", "");
                if (perm != "")
                {
                    string[] ids = perm.Split(',');
                    m_allowedUsers = ids.Select(id =>
                    {
                        UUID uuid;
                        if (UUID.TryParse(id.Trim(), out uuid))
                            return uuid;
                        else
                            return UUID.Zero;
                    }).Where((id) => id != UUID.Zero).ToList();
                }
            }
Example #2
0
 public void Initialize(IScriptModulePlugin ScriptEngine, ISceneChildEntity host, uint localID, UUID itemID,
     ScriptProtectionModule module)
 {
     m_itemID = itemID;
     m_ScriptEngine = ScriptEngine;
     m_host = host;
     ScriptProtection = module;
 }