Пример #1
0
        public void RequestGodlikePowers(
            UUID agentID, UUID sessionID, UUID token, bool godLike, IClientAPI controllingClient)
        {
            ScenePresence sp = m_scene.GetScenePresence(agentID);

            if (sp != null)
            {
                if (godLike == false)
                {
                    sp.GrantGodlikePowers(agentID, sessionID, token, godLike);
                    return;
                }

                // First check that this is the sim owner
                if (m_scene.Permissions.IsGod(agentID))
                {
                    // Next we check for spoofing.....
                    UUID testSessionID = sp.ControllingClient.SessionId;
                    if (sessionID == testSessionID)
                    {
                        if (sessionID == controllingClient.SessionId)
                        {
                            //m_log.Info("godlike: " + godLike.ToString());
                            sp.GrantGodlikePowers(agentID, testSessionID, token, godLike);
                        }
                    }
                }
                else
                {
                    if (DialogModule != null)
                    {
                        DialogModule.SendAlertToUser(agentID, "Request for god powers denied");
                    }
                }
            }
        }
Пример #2
0
        public void RequestGodlikePowers(
            UUID agentID, UUID sessionID, UUID token, bool godLike)
        {
            ScenePresence sp = m_scene.GetScenePresence(agentID);

            if (sp == null || sp.IsDeleted || sp.IsNPC)
            {
                return;
            }

            if (sessionID != sp.ControllingClient.SessionId)
            {
                return;
            }

            sp.GrantGodlikePowers(token, godLike);

            if (godLike && !sp.IsViewerUIGod && m_dialogModule != null)
            {
                m_dialogModule.SendAlertToUser(agentID, "Request for god powers denied");
            }
        }