Beispiel #1
0
        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            if (m_UserManagement == null)
            {
                m_UserManagement  = scene.RequestModuleInterface <IUserManagement>();
                m_OfflineIM       = scene.RequestModuleInterface <IOfflineIMService>();
                m_Messaging       = scene.RequestModuleInterface <IMessageTransferModule>();
                m_ForeignImporter = new ForeignImporter(m_UserManagement);

                if (m_ServiceLocation.Equals("local"))
                {
                    m_LocalGroupsConnector = new GroupsServiceLocalConnectorModule(m_Config, m_UserManagement);
                    // Also, if local, create the endpoint for the HGGroupsService
                    new HGGroupsServiceRobustConnector(m_Config, MainServer.Instance, string.Empty,
                                                       scene.RequestModuleInterface <IOfflineIMService>(), scene.RequestModuleInterface <IUserAccountService>());
                }
                else
                {
                    m_LocalGroupsConnector = new GroupsServiceRemoteConnectorModule(m_Config, m_UserManagement);
                }

                m_CacheWrapper = new RemoteConnectorCacheWrapper(m_UserManagement);
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (!enabled)
            {
                return;
            }

            if (m_TransferModule == null)
            {
                OfflineMessagesConnector = Aurora.DataManager.DataManager.RequestPlugin <IOfflineMessagesConnector>();
                m_TransferModule         = scene.RequestModuleInterface <IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    scene.EventManager.OnNewClient     -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;

                    enabled = false;
                    m_SceneList.Clear();

                    m_log.Error("[OFFLINE MESSAGING] No message transfer module is enabled. Diabling offline messages");
                    return;
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
Beispiel #3
0
        private OSDMap syncRecievedService_OnMessageReceived(OSDMap message)
        {
            string method = message["Method"];

            if (method == "SendInstantMessages")
            {
                List <GridInstantMessage> messages =
                    ((OSDArray)message["Messages"]).ConvertAll <GridInstantMessage>((o) =>
                {
                    GridInstantMessage im =
                        new GridInstantMessage();
                    im.FromOSD((OSDMap)o);
                    return(im);
                });
                ISceneManager manager = m_registry.RequestModuleInterface <ISceneManager>();
                if (manager != null)
                {
                    IMessageTransferModule messageTransfer =
                        manager.Scene.RequestModuleInterface <IMessageTransferModule>();
                    if (messageTransfer != null)
                    {
                        foreach (GridInstantMessage im in messages)
                        {
                            messageTransfer.SendInstantMessage(im);
                        }
                    }
                }
            }
            return(null);
        }
Beispiel #4
0
        public void RegionLoaded(IScene scene)
        {
            if (!enabled)
            {
                return;
            }

            if (m_TransferModule == null)
            {
                OfflineMessagesConnector = Framework.Utilities.DataManager.RequestPlugin <IOfflineMessagesConnector>();
                m_TransferModule         = scene.RequestModuleInterface <IMessageTransferModule>();
                if (m_TransferModule == null || OfflineMessagesConnector == null)
                {
                    scene.EventManager.OnNewClient     -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;

                    enabled = false;
                    m_Scene = null;

                    MainConsole.Instance.Error(
                        "[OFFLINE MESSAGING] No message transfer module or OfflineMessagesConnector is enabled. Diabling offline messages");
                    return;
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
Beispiel #5
0
        private void RelayInventoryOfferIM(Scene scene, ScenePresence user, GridInstantMessage im)
        {
            if (user != null) // Local (root agent or child agent)
            {
//                m_log.WarnFormat("[INVENTORY_OFFER]: Relaying IM {0} locally to {1}", im.dialog, im.toAgentID);
                user.ControllingClient.SendInstantMessage(im);
            }
            else
            {
//                m_log.WarnFormat("[INVENTORY_OFFER]: Relaying IM {0} remotely to {1}", im.dialog, im.toAgentID);
                if (m_TransferModule == null)
                {
                    m_TransferModule = scene.RequestModuleInterface <IMessageTransferModule>();
                }

                if (m_TransferModule != null)
                {
                    m_TransferModule.SendInstantMessage(im, delegate(bool success) { });
                }
                else
                {
                    m_log.ErrorFormat("[INVENTORY_OFFER]: Could not relay IM {0} remotely to {1}", im.dialog, im.toAgentID);
                }
            }
        }
        public void Initialise(Scene scene, IConfigSource config)
        {
            if (config.Configs["Messaging"] != null)
            {
                // Allow disabling this module in config
                //
                if (config.Configs["Messaging"].GetString(
                        "InventoryTransferModule", "InventoryTransferModule") !=
                        "InventoryTransferModule")
                    return;
            }

            if (!m_Scenelist.Contains(scene))
            {
                if (m_Scenelist.Count == 0)
                {
                    m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
                    if (m_TransferModule == null)
                        m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
                }

                m_Scenelist.Add(scene);

                scene.RegisterModuleInterface<IInventoryTransferModule>(this);

                scene.EventManager.OnNewClient += OnNewClient;
                scene.EventManager.OnClientClosed += ClientLoggedOut;
                scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            }
        }
Beispiel #7
0
        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            if (m_TransferModule == null)
            {
                m_TransferModule =
                    scene.RequestModuleInterface <IMessageTransferModule>();

                if (m_TransferModule == null)
                {
                    m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
                                "lures will not work!");

                    m_Enabled = false;
                    m_scenes.Clear();
                    scene.EventManager.OnNewClient              -= OnNewClient;
                    scene.EventManager.OnClosingClient          -= OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -=
                        OnGridInstantMessage;
                }
            }
        }
Beispiel #8
0
        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;
			
            if (m_TransferModule == null)
            {
                m_TransferModule =
                    scene.RequestModuleInterface<IMessageTransferModule>();

                if (m_TransferModule == null)
                {
                    m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
                    "lures will not work!");

                    m_Enabled = false;
                    m_scenes.Clear();
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -=
                            OnGridInstantMessage;
                }
            }

        }
Beispiel #9
0
        public virtual void RegionLoaded(Scene scene)
        {
            if (!m_enabled)
            {
                return;
            }

            if (m_useMuteListModule)
            {
                MuteListConnector = Aurora.DataManager.DataManager.RequestPlugin <IMuteListConnector>();
            }

            if (m_TransferModule == null)
            {
                m_TransferModule =
                    scene.RequestModuleInterface <IMessageTransferModule>();

                if (m_TransferModule == null)
                {
                    m_log.Error("[CONFERANCE MESSAGE]: No message transfer module, IM will not work!");

                    m_scenes.Clear();
                    m_enabled = false;
                }
            }
        }
Beispiel #10
0
        /// <summary>
        /// Kicks or freezes User specified from the simulator. This logs them off of the grid
        /// </summary>
        /// <param name="godID">The person doing the kicking</param>
        /// <param name="agentID">the person that is being kicked</param>
        /// <param name="kickflags">Tells what to do to the user</param>
        /// <param name="reason">The message to send to the user after it's been turned into a field</param>
        public void KickUser(UUID godID, UUID agentID, uint kickflags, byte[] reason)
        {
            // assuming automatic god rights on this for fast griefing reaction
            // this is also needed for kick via message
            if (!m_scene.Permissions.IsGod(godID))
            {
                return;
            }

            int godlevel = 200;
            // update level so higher gods can kick lower ones
            ScenePresence god = m_scene.GetScenePresence(godID);

            if (god != null && god.GodController.GodLevel > godlevel)
            {
                godlevel = god.GodController.GodLevel;
            }

            if (agentID == ALL_AGENTS)
            {
                m_scene.ForEachRootScenePresence(delegate(ScenePresence p)
                {
                    if (p.UUID != godID && godlevel > p.GodController.GodLevel)
                    {
                        doKickmodes(godID, p, kickflags, reason);
                    }
                });
                return;
            }

            ScenePresence sp = m_scene.GetScenePresence(agentID);

            if (sp == null || sp.IsChildAgent)
            {
                IMessageTransferModule transferModule =
                    m_scene.RequestModuleInterface <IMessageTransferModule>();
                if (transferModule != null)
                {
                    m_log.DebugFormat("[GODS]: Sending nonlocal kill for agent {0}", agentID);
                    transferModule.SendInstantMessage(new GridInstantMessage(
                                                          m_scene, godID, "God", agentID, (byte)250, false,
                                                          Utils.BytesToString(reason), UUID.Zero, true,
                                                          new Vector3(), new byte[] { (byte)kickflags }, true),
                                                      delegate(bool success) {});
                }
                return;
            }

            if (godlevel <= sp.GodController.GodLevel) // no god wars
            {
                return;
            }

            if (sp.UUID == godID)
            {
                return;
            }

            doKickmodes(godID, sp, kickflags, reason);
        }
Beispiel #11
0
        public void Initialise(Scene scene, IConfigSource config)
        {
            if (config.Configs["Messaging"] != null)
            {
                // Allow disabling this module in config
                //
                if (config.Configs["Messaging"].GetString(
                        "InventoryTransferModule", "InventoryTransferModule") !=
                    "InventoryTransferModule")
                {
                    return;
                }
            }

            if (!m_Scenelist.Contains(scene))
            {
                if (m_Scenelist.Count == 0)
                {
                    m_TransferModule = scene.RequestModuleInterface <IMessageTransferModule>();
                    if (m_TransferModule == null)
                    {
                        m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
                    }
                }

                m_Scenelist.Add(scene);

                scene.RegisterModuleInterface <IInventoryTransferModule>(this);

                scene.EventManager.OnNewClient              += OnNewClient;
                scene.EventManager.OnClientClosed           += ClientLoggedOut;
                scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            }
        }
Beispiel #12
0
        public void PostInitialise()
        {
            m_TransferModule =
                m_scenes[0].RequestModuleInterface<IMessageTransferModule>();

            if (m_TransferModule == null)
                m_log.Error("[INSTANT MESSAGE]: No message transfer module, "+
                "lures will not work!");
        }
 public void PostInitialise()
 {
     if (m_Scenelist.Count > 0)
     {
         m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
         if (m_TransferModule == null)
             m_log.Error("[INVENTORY TRANSFER] No Message transfer module found, transfers will be local only");
     }
 }
Beispiel #14
0
        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;
            m_TransferModule = m_scenes[0].RequestModuleInterface<IMessageTransferModule>();

            if (m_TransferModule == null)
                m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
                            "lures will not work!");
        }
Beispiel #15
0
        public void SendInstantMessage(GridInstantMessage im)
        {
            IMessageTransferModule m_TransferModule =
                m_object.Scene.RequestModuleInterface <IMessageTransferModule>();

            if (m_TransferModule != null)
            {
                m_TransferModule.SendInstantMessage(im);
            }
        }
Beispiel #16
0
        public void PostInitialise()
        {
            m_TransferModule =
                m_scenes[0].RequestModuleInterface <IMessageTransferModule>();

            if (m_TransferModule == null)
            {
                m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
                            "lures will not work!");
            }
        }
Beispiel #17
0
        public void RegionLoaded(IScene scene)
        {
            if (!m_Enabled)
            {
                return;
            }
            m_TransferModule = m_scene.RequestModuleInterface <IMessageTransferModule> ();

            if (m_TransferModule == null)
            {
                MainConsole.Instance.Error("[INSTANT MESSAGE]: No message transfer module, lures will not work!");
            }
        }
Beispiel #18
0
        public void SendInstantMessage(GridInstantMessage im)
        {
            IMessageTransferModule msgTransferModule = m_scene.RequestModuleInterface <IMessageTransferModule>();

            if (msgTransferModule != null)
            {
                msgTransferModule.SendInstantMessage(im, delegate(bool success) { if (!success)
                                                                                  {
                                                                                      m_log.Warn("SendInstantMessage unsuccessful");
                                                                                  }
                                                     });
            }
        }
Beispiel #19
0
        private void SendIM(UUID agentId, Vector3 pos, UUID fromID, string fromName, string message)
        {
            if (_scenes.Count < 1)
            {
                return;     // not ready to send the IM
            }
            Scene scene = _scenes[0];

            if (m_TransferModule == null)    // ready to send IM?
            {
                m_TransferModule = scene.RequestModuleInterface <IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    return;     // not ready to send the IM
                }
            }

            GridInstantMessage msg = new GridInstantMessage();

            msg.fromAgentID   = fromID.Guid;
            msg.toAgentID     = agentId.Guid;
            msg.imSessionID   = fromID.Guid;                     // put all of these is the same IM "session" from the fromID
            msg.timestamp     = (uint)Util.UnixTimeSinceEpoch(); // timestamp;
            msg.fromAgentName = fromName;
            // Cap the message length at 1024.
            if (message != null && message.Length > 1024)
            {
                msg.message = message.Substring(0, 1024);
            }
            else
            {
                msg.message = message;
            }
            msg.dialog         = (byte)InstantMessageDialog.MessageFromAgent;
            msg.fromGroup      = false;                          // fromGroup;
            msg.offline        = (byte)1;                        //yes, store for fetching missed IMs on login
            msg.ParentEstateID = 0;                              //ParentEstateID;
            msg.Position       = pos;
            msg.RegionID       = scene.RegionInfo.RegionID.Guid; //RegionID.Guid;
            // binaryBucket is the SL URL without the prefix, e.g. "Region/x/y/z"
            string url = EncodeURL(false, scene.RegionInfo.RegionName, msg.Position.X, msg.Position.Y, msg.Position.Z);

            byte[] bucket = Utils.StringToBytes(url);
            msg.binaryBucket = new byte[bucket.Length];// binaryBucket;
            bucket.CopyTo(msg.binaryBucket, 0);

            if (m_TransferModule != null)
            {
                m_TransferModule.SendInstantMessage(msg, delegate(bool success) { });
            }
        }
Beispiel #20
0
        public void GridKickUser(UUID agentID, string reason)
        {
            int godlevel = 240; // grid god default

            ScenePresence sp = m_scene.GetScenePresence(agentID);

            if (sp == null || sp.IsChildAgent)
            {
                IMessageTransferModule transferModule =
                    m_scene.RequestModuleInterface <IMessageTransferModule>();
                if (transferModule != null)
                {
                    m_log.DebugFormat("[GODS]: Sending nonlocal kill for agent {0}", agentID);
                    transferModule.SendInstantMessage(new GridInstantMessage(
                                                          m_scene, Constants.servicesGodAgentID, "GRID", agentID, (byte)250, false,
                                                          reason, UUID.Zero, true,
                                                          new Vector3(), new byte[] { 0 }, true),
                                                      delegate(bool success) { });
                }
                return;
            }

            if (sp.IsDeleted)
            {
                return;
            }

            if (godlevel <= sp.GodController.GodLevel) // no god wars
            {
                if (m_dialogModule != null)
                {
                    m_dialogModule.SendAlertToUser(sp.UUID, "GRID kick detected and ignored, kick reason: " + reason);
                }
                return;
            }

            if (sp.IsNPC)
            {
                INPCModule npcmodule = sp.Scene.RequestModuleInterface <INPCModule>();
                if (npcmodule != null)
                {
                    npcmodule.DeleteNPC(sp.UUID, sp.Scene);
                    return;
                }
            }
            sp.ControllingClient.Kick(reason);
            sp.Scene.CloseAgent(sp.UUID, true);
        }
        public void RegionLoaded(Scene scene)
        {
            if (!m_groupMessagingEnabled)
            {
                return;
            }

            if (m_log.IsDebugEnabled)
            {
                m_log.DebugFormat("[GroupsMessagingModule]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

            m_groupData = scene.RequestModuleInterface <IGroupsServicesConnector>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                m_log.Error("[GroupsMessagingModule]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                RemoveRegion(scene);
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface <IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                m_log.Error("[GroupsMessagingModule]: Could not get MessageTransferModule");
                RemoveRegion(scene);
                return;
            }

            m_UserManagement = scene.RequestModuleInterface <IUserManagement>();

            // No groups module, no groups messaging
            if (m_UserManagement == null)
            {
                m_log.Error("[GroupsMessagingModule]: Could not get IUserManagement, GroupsMessagingModule is now disabled.");
                RemoveRegion(scene);
                return;
            }


            if (m_presenceService == null)
            {
                m_presenceService = scene.PresenceService;
            }
        }
Beispiel #22
0
        public void RegionLoaded(Scene scene)
        {
            if (m_TransferModule == null)
            {
                m_TransferModule = m_Scenelist[0].RequestModuleInterface <IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    m_log.Error("[INVENTORY TRANSFER]: No Message transfer module found, transfers will be local only");
                    m_Enabled = false;

//                    m_Scenelist.Clear();
//                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
                }
            }
        }
        public void RegionLoaded (IScene scene)
        {
            if (m_TransferModule == null) {
                m_TransferModule = m_Scenelist [0].RequestModuleInterface<IMessageTransferModule> ();
                if (m_TransferModule == null) {
                    MainConsole.Instance.Error (
                        "[Inventory transfer]: No Message transfer module found, transfers will be local only");
                    m_Enabled = false;

                    m_Scenelist.Clear ();
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
                }
            }
        }
Beispiel #24
0
        public void PostInitialize()
        {
            if (!m_enabled)
            {
                return;
            }

            m_TransferModule =
                m_scenes[0].RequestModuleInterface <IMessageTransferModule>();

            if (m_TransferModule == null)
            {
                m_log.Error("[INSTANT MESSAGE]: No message transfer module, " +
                            "IM will not work!");
            }
        }
        public void Close()
        {
            if (!m_groupMessagingEnabled)
            {
                return;
            }

            if (m_debugEnabled)
            {
                m_log.Debug("[Groups.Messaging]: Shutting down GroupsMessagingModule module.");
            }

            m_sceneList.Clear();

            m_groupData         = null;
            m_msgTransferModule = null;
        }
        public void RegionLoaded(Scene scene)
        {
            if (!m_groupMessagingEnabled)
            {
                return;
            }

            if (m_debugEnabled)
            {
                m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);
            }

            m_groupData = scene.RequestModuleInterface <IGroupsServicesConnector>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                m_log.Error("[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface <IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                m_log.Error("[GROUPS-MESSAGING]: Could not get MessageTransferModule");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            if (m_presenceService == null)
            {
                m_presenceService = scene.PresenceService;
            }

            m_sceneList.Add(scene);

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin            += OnClientLogin;
        }
Beispiel #27
0
        public bool GiveItem(UUID from, UUID to, UUID container, string itemname, Scene scene)
        {
            List <UUID> list = new List <UUID>();

            m_TransferModule = scene.RequestModuleInterface <IMessageTransferModule>();
            SceneObjectPart   box           = scene.GetSceneObjectPart(container);
            TaskInventoryItem inventoryItem = box.Inventory.GetInventoryItem(itemname);

            ScenePresence presence = scene.GetScenePresence(from);

            if (inventoryItem != null && inventoryItem.Type == 6)
            {
                list.Add(inventoryItem.ItemID);
            }

            UUID uUID = MoveInventory(scene, to, itemname, box, list);

            if (this.m_TransferModule != null)
            {
                byte[] copyIDBytes  = uUID.GetBytes();
                byte[] binaryBucket = new byte[1 + copyIDBytes.Length];
                binaryBucket[0] = (byte)AssetType.Folder;
                Array.Copy(copyIDBytes, 0, binaryBucket, 1, copyIDBytes.Length);
                Vector3 absolutePosition = box.AbsolutePosition;

                GridInstantMessage im
                    = new GridInstantMessage(
                          scene,
                          from,
                          presence.Firstname + " " + presence.Lastname,
                          to,
                          (byte)InstantMessageDialog.InventoryOffered,
                          false,
                          inventoryItem.Name,
                          uUID,
                          false,
                          absolutePosition,
                          binaryBucket,
                          true);

                m_TransferModule.SendInstantMessage(im, delegate(bool success) {
                });
            }
            return(true);
        }
        public void RegionLoaded(IScene scene)
        {
            if (m_TransferModule == null)
            {
                m_TransferModule = m_Scene.RequestModuleInterface <IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    MainConsole.Instance.Error(
                        "[INVENTORY TRANSFER]: No Message transfer module found, transfers will be local only");
                    m_Enabled = false;

                    m_Scene = null;
                    scene.EventManager.OnNewClient              -= OnNewClient;
                    scene.EventManager.OnClosingClient          -= OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
                }
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;

            if (m_TransferModule == null)
            {
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    scene.EventManager.OnNewClient -= OnNewClient;

                    m_SceneList.Clear();

                    m_log.Error("[OfflineIM.V2]: No message transfer module is enabled. Disabling offline messages");
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
        public void RegionLoaded (IScene scene)
        {
            if (!m_enabled)
                return;

            if (m_TransferModule == null) {
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule> ();

                if (m_TransferModule == null) {
                    MainConsole.Instance.Error ("[Instant message]: No message transfer module, IM will not work!");
                    scene.EventManager.OnNewClient -= EventManager_OnNewClient;
                    scene.EventManager.OnClosingClient -= EventManager_OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;

                    m_Scene = null;
                    m_enabled = false;
                }
            }
        }
Beispiel #31
0
        protected void OfferInventory(string itemName)
        {
            SceneObjectPart   sop  = ButtonMap[m_playerId].Part;
            TaskInventoryItem item = sop.Inventory.GetInventoryItems(itemName)[0];

            // destination is an avatar
            InventoryItemBase agentItem
                = sop.ParentGroup.Scene.MoveTaskInventoryItem(m_playerId, UUID.Zero, sop, item.ItemID);

            byte[] bucket = new byte[17];
            bucket[0] = (byte)agentItem.InvType;
            byte[] objBytes = agentItem.ID.GetBytes();
            Array.Copy(objBytes, 0, bucket, 1, 16);

            GridInstantMessage msg
                = new GridInstantMessage(
                      sop.ParentGroup.Scene,
                      sop.UUID,
                      sop.Name,
                      m_playerId,
                      (byte)InstantMessageDialog.InventoryOffered,
                      false,
                      item.Name + "\n" + sop.Name + " is located at " +
                      sop.ParentGroup.Scene.RegionInfo.RegionName + " " +
                      sop.AbsolutePosition.ToString(),
                      agentItem.ID,
                      true,
                      sop.AbsolutePosition,
                      bucket,
                      true);

            m_log.InfoFormat("[WATER WARS]: IMSessionId on sending inventory offer [{0}]", agentItem.ID);

            IMessageTransferModule module = sop.ParentGroup.Scene.RequestModuleInterface <IMessageTransferModule>();

            if (module != null)
            {
                IClientAPI client = sop.ParentGroup.Scene.GetScenePresence(m_playerId).ControllingClient;
                client.OnInstantMessage += OnInstantMessage;
                module.SendInstantMessage(msg, delegate(bool success) {});
            }
        }
        private OSDMap syncRecievedService_OnMessageReceived(OSDMap message)
        {
            string method = message["Method"];

            if (method == "SendInstantMessages")
            {
                List <GridInstantMessage> messages =
                    ((OSDArray)message["Messages"]).ConvertAll <GridInstantMessage>((o) =>
                {
                    GridInstantMessage im =
                        new GridInstantMessage();
                    im.FromOSD((OSDMap)o);
                    return(im);
                });
                ISceneManager manager = m_registry.RequestModuleInterface <ISceneManager>();
                if (manager != null)
                {
                    foreach (GridInstantMessage im in messages)
                    {
                        Framework.PresenceInfo.IScenePresence UserPresence;

                        foreach (IScene scene in manager.Scenes)
                        {
                            UserPresence = scene.GetScenePresence(im.ToAgentID);

                            //AR: Do not fire for child agents or group messages are sent for every region
                            if (UserPresence != null && UserPresence.IsChildAgent == false)
                            {
                                IMessageTransferModule messageTransfer = scene.RequestModuleInterface <IMessageTransferModule>();
                                if (messageTransfer != null)
                                {
                                    messageTransfer.SendInstantMessage(im);
                                }
                            }
                        }
                    }
                }
            }
            return(null);
        }
Beispiel #33
0
        public void RegionLoaded(IScene scene)
        {
            if (!m_groupMessagingEnabled)
            {
                return;
            }

            m_groupData    = scene.RequestModuleInterface <IGroupsServicesConnector>();
            m_groupsModule = scene.RequestModuleInterface <IGroupsModule>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                MainConsole.Instance.Error(
                    "[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface <IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                MainConsole.Instance.Error("[GROUPS-MESSAGING]: Could not get MessageTransferModule");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }


            m_sceneList.Add(scene);

            scene.EventManager.OnNewClient              += OnNewClient;
            scene.EventManager.OnClosingClient          += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin            += OnClientLogin;
            scene.EventManager.OnChatSessionRequest     += OnChatSessionRequest;
        }
        public void RegionLoaded (IScene scene)
        {
            if (!m_enabled)
                return;

            if (m_TransferModule == null) {
                OfflineMessagesConnector = Framework.Utilities.DataManager.RequestPlugin<IOfflineMessagesConnector> ();
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule> ();
                if (m_TransferModule == null || OfflineMessagesConnector == null) {
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;

                    m_enabled = false;
                    m_Scene = null;

                    MainConsole.Instance.Error (
                        "[OFFLINE MESSAGING] No message transfer module or OfflineMessagesConnector is enabled. Disabling offline messages");
                    return;
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
        private void OnOfferCallingCard(IClientAPI client, UUID destID, UUID transactionID)
        {
            ScenePresence sp = GetClientPresence(client.AgentId);

            if (sp != null)
            {
                // If we're in god mode, we reverse the meaning. Offer
                // calling card becomes "Take a calling card" for that
                // person, no matter if they agree or not.
                if (sp.GodLevel >= 200)
                {
                    CreateCallingCard(client.AgentId, destID, UUID.Zero, true);
                    return;
                }
            }

            IClientAPI dest = FindClientObject(destID);

            if (dest != null)
            {
                DoCallingCardOffer(dest, client.AgentId);
                return;
            }

            IMessageTransferModule transferModule =
                m_Scenes[0].RequestModuleInterface <IMessageTransferModule>();

            if (transferModule != null)
            {
                transferModule.SendInstantMessage(new GridInstantMessage(
                                                      client.Scene, client.AgentId,
                                                      client.FirstName + " " + client.LastName,
                                                      destID, (byte)211, false,
                                                      String.Empty,
                                                      transactionID, false, new Vector3(), new byte[0], true),
                                                  delegate(bool success) { });
            }
        }
        public void Close()
        {
            if (!m_groupMessagingEnabled)
            {
                return;
            }

            if (m_debugEnabled)
            {
                m_log.Debug("[GROUPS-MESSAGING]: Shutting down XmlRpcGroupsMessaging module.");
            }

            foreach (Scene scene in m_sceneList)
            {
                scene.EventManager.OnNewClient -= OnNewClient;
                scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
            }

            m_sceneList.Clear();

            m_groupsModule      = null;
            m_msgTransferModule = null;
        }
Beispiel #37
0
        public void RegionLoaded(IScene scene)
        {
            if (!m_enabled)
            {
                return;
            }

            if (m_TransferModule == null)
            {
                m_TransferModule = scene.RequestModuleInterface <IMessageTransferModule> ();

                if (m_TransferModule == null)
                {
                    MainConsole.Instance.Error("[Instant message]: No message transfer module, IM will not work!");
                    scene.EventManager.OnNewClient              -= EventManager_OnNewClient;
                    scene.EventManager.OnClosingClient          -= EventManager_OnClosingClient;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;

                    m_Scene   = null;
                    m_enabled = false;
                }
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;

            if (m_TransferModule == null)
            {
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    scene.EventManager.OnNewClient -= OnNewClient;

                    m_SceneList.Clear();

                    m_log.Error("[OfflineIM.V2]: No message transfer module is enabled. Disabling offline messages");
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
Beispiel #39
0
        protected int EMAIL_PAUSE_TIME = 20;  // documented delay value for smtp.

        public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, TaskInventoryItem item)
        {
            m_ScriptEngine = ScriptEngine;
            m_host = host;
            m_item = item;

            LoadLimits();  // read script limits from config.

            m_TransferModule =
                    m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
            m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();

            AsyncCommands = new AsyncCommandManager(ScriptEngine);
        }
        public void RegionLoaded(IScene scene)
        {
            if (!m_groupMessagingEnabled)
                return;

            m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();
            m_groupsModule = scene.RequestModuleInterface<IGroupsModule>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                MainConsole.Instance.Error(
                    "[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                MainConsole.Instance.Error("[GROUPS-MESSAGING]: Could not get MessageTransferModule");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }


            m_sceneList.Add(scene);

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnClosingClient += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += OnClientLogin;
            scene.EventManager.OnChatSessionRequest += OnChatSessionRequest;
        }
        public void Close()
        {
            if (!m_groupMessagingEnabled)
                return;

            if (m_debugEnabled) m_log.Debug("[Groups.Messaging]: Shutting down GroupsMessagingModule module.");

            m_sceneList.Clear();

            m_groupData = null;
            m_msgTransferModule = null;
        }
        public void RegionLoaded(Scene scene)
        {
            if (!m_groupMessagingEnabled)
                return;

            if (m_debugEnabled) m_log.DebugFormat("[Groups.Messaging]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                m_log.Error("[Groups.Messaging]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                RemoveRegion(scene); 
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                m_log.Error("[Groups.Messaging]: Could not get MessageTransferModule");
                RemoveRegion(scene);
                return;
            }

            if (m_presenceService == null)
                m_presenceService = scene.PresenceService;

        }
        public void Close()
        {
            if (!m_groupMessagingEnabled)
                return;

            if (m_debugEnabled) m_log.Debug("[GROUPS-MESSAGING]: Shutting down GroupsMessagingModule module.");

            foreach (Scene scene in m_sceneList)
            {
                scene.EventManager.OnNewClient -= OnNewClient;
                scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
            }

            m_sceneList.Clear();

            m_groupData = null;
            m_msgTransferModule = null;
        }
Beispiel #44
0
        public virtual void RegionLoaded(IScene scene)
        {
            if (!m_enabled) return;

            if (m_useMuteListModule)
                MuteListConnector = DataManager.DataManager.RequestPlugin<IMuteListConnector>();

            if (m_TransferModule == null)
            {
                m_TransferModule =
                    scene.RequestModuleInterface<IMessageTransferModule>();

                if (m_TransferModule == null)
                {
                    MainConsole.Instance.Error("[CONFERANCE MESSAGE]: No message transfer module, IM will not work!");

                    m_scenes.Clear();
                    m_enabled = false;
                }
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (!m_groupsEnabled)
                return;

            if (m_debugEnabled) m_log.DebugFormat("[Groups]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnMakeRootAgent += OnMakeRoot;
            scene.EventManager.OnMakeChildAgent += OnMakeChild;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            // The InstantMessageModule itself doesn't do this, 
            // so lets see if things explode if we don't do it
            // scene.EventManager.OnClientClosed += OnClientClosed;

            if (m_groupData == null)
            {
                m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();

                // No Groups Service Connector, then nothing works...
                if (m_groupData == null)
                {
                    m_groupsEnabled = false;
                    m_log.Error("[Groups]: Could not get IGroupsServicesConnector");
                    RemoveRegion(scene);
                    return;
                }
            }

            if (m_msgTransferModule == null)
            {
                m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

                // No message transfer module, no notices, group invites, rejects, ejects, etc
                if (m_msgTransferModule == null)
                {
                    m_log.Warn("[Groups]: Could not get MessageTransferModule");
                }
            }

            if (m_UserManagement == null)
            {
                m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
                if (m_UserManagement == null)
                    m_log.Warn("[Groups]: Could not get UserManagementModule");
            }

            lock (m_sceneList)
            {
                m_sceneList.Add(scene);
            }


        }
        public new void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
        {
            m_ScriptEngine = ScriptEngine;
            m_host = host;
            m_localID = localID;
            m_itemID = itemID;

            m_ScriptDelayFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
            m_ScriptDistanceFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f);
            m_MinTimerInterval =
                m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f);
            m_automaticLinkPermission =
                m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false);

            m_TransferModule =
                    m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
            AsyncCommands = new AsyncCommandManager(ScriptEngine);

            OpenSim.Region.Framework.Interfaces.IRegionModule module = World.Modules["RexObjectsModule"];
            if (module != null && module is ModrexObjects)
            {
                m_rexObjects = (ModrexObjects)module;
            }
        }
Beispiel #47
0
        public void RegionLoaded(Scene scene)
        {
            if (!m_groupsEnabled)
                return;

            if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            if (m_groupData == null)
            {
                m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();

                // No Groups Service Connector, then nothing works...
                if (m_groupData == null)
                {
                    m_groupsEnabled = false;
                    m_log.Error("[GROUPS]: Could not get IGroupsServicesConnector");
                    Close();
                    return;
                }

                m_groupsMessagingModule = scene.RequestModuleInterface<IGroupsMessagingModule>();
            }

            if (m_msgTransferModule == null)
            {
                m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

                // No message transfer module, no notices, group invites, rejects, ejects, etc
                if (m_msgTransferModule == null)
                {
                    m_groupsEnabled = false;
                    m_log.Error("[GROUPS]: Could not get MessageTransferModule");
                    Close();
                    return;
                }
            }

            lock (m_sceneList)
            {
                m_sceneList.Add(scene);
            }

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnClosingClient += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += EventManager_OnClientLogin;
            scene.EventManager.OnRegisterCaps += new EventManager.RegisterCapsEvent(EventManager_OnRegisterCaps);
            // The InstantMessageModule itself doesn't do this, 
            // so lets see if things explode if we don't do it
            // scene.EventManager.OnClientClosed += OnClientClosed;

        }
        public void RegionLoaded (IScene scene)
        {
            if (!m_Enabled)
                return;
            m_TransferModule = m_scene.RequestModuleInterface<IMessageTransferModule> ();

            if (m_TransferModule == null)
                MainConsole.Instance.Error ("[INSTANT MESSAGE]: No message transfer module, lures will not work!");
        }
        public void RegionLoaded(IScene scene)
        {
            if (!m_groupsEnabled)
                return;

            if (m_debugEnabled)
                MainConsole.Instance.DebugFormat("[GROUPS]: {0} called", MethodBase.GetCurrentMethod().Name);

            m_groupData = WhiteCore.Framework.Utilities.DataManager.RequestPlugin<IGroupsServiceConnector>();

            // No Groups Service Connector, then nothing works...
            if (m_groupData == null)
            {
                m_groupsEnabled = false;
                MainConsole.Instance.Error("[GROUPS]: Could not get IGroupsServicesConnector");
                Close();
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
            m_imService = scene.RequestModuleInterface<IInstantMessagingService>();

            // No message transfer module, no notices, group invites, rejects, ejects, etc
            if (m_msgTransferModule == null)
            {
                m_groupsEnabled = false;
                MainConsole.Instance.Error("[GROUPS]: Could not get MessageTransferModule");
                Close();
                return;
            }

            m_scene = scene;

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
            scene.EventManager.OnClosingClient += OnClosingClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += EventManager_OnClientLogin;
            scene.EventManager.OnRegisterCaps += OnRegisterCaps;
            scene.EventManager.OnCachedUserInfo += UpdateCachedData;
            // The InstantMessageModule itself doesn't do this,
            // so lets see if things explode if we don't do it
            // scene.EventManager.OnClientClosed += OnClientClosed;
        }
 public void PostInitialise()
 {
     if (m_scenes.Count > 0)
     {
         m_TransferModule = m_initialScene.RequestModuleInterface<IMessageTransferModule>();
         m_gridServices = m_initialScene.CommsManager.GridService;
     }
     if (m_TransferModule == null)
         m_log.Error("[FRIENDS]: Unable to find a message transfer module, friendship offers will not work");
 }
        public void RegionLoaded (IScene scene)
        {
            if (!enabled)
                return;

            if (m_TransferModule == null)
            {
                OfflineMessagesConnector = Aurora.DataManager.DataManager.RequestPlugin<IOfflineMessagesConnector>();
                m_TransferModule = scene.RequestModuleInterface<IMessageTransferModule>();
                if (m_TransferModule == null || OfflineMessagesConnector == null)
                {
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;

                    enabled = false;
                    m_SceneList.Clear();

                    m_log.Error("[OFFLINE MESSAGING] No message transfer module or OfflineMessagesConnector is enabled. Diabling offline messages");
                    return;
                }
                m_TransferModule.OnUndeliveredMessage += UndeliveredMessage;
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (m_TransferModule == null)
            {
                m_TransferModule = m_Scenelist[0].RequestModuleInterface<IMessageTransferModule>();
                if (m_TransferModule == null)
                {
                    m_log.Error("[INVENTORY TRANSFER]: No Message transfer module found, transfers will be local only");
                    m_Enabled = false;

                    m_Scenelist.Clear();
                    scene.EventManager.OnNewClient -= OnNewClient;
                    scene.EventManager.OnClosingClient -= OnClosingClient;
                    scene.EventManager.OnClientClosed -= ClientLoggedOut;
                    scene.EventManager.OnIncomingInstantMessage -= OnGridInstantMessage;
                }
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (!m_Enabled)
                return;

            if (m_UserManagement == null)
            {
                m_UserManagement = scene.RequestModuleInterface<IUserManagement>();
                m_OfflineIM = scene.RequestModuleInterface<IOfflineIMService>();
                m_Messaging = scene.RequestModuleInterface<IMessageTransferModule>();
                m_ForeignImporter = new ForeignImporter(m_UserManagement);

                if (m_ServiceLocation.Equals("local"))
                {
                    m_LocalGroupsConnector = new GroupsServiceLocalConnectorModule(m_Config, m_UserManagement);
                    // Also, if local, create the endpoint for the HGGroupsService
                    new HGGroupsServiceRobustConnector(m_Config, MainServer.Instance, string.Empty, 
                        scene.RequestModuleInterface<IOfflineIMService>(), scene.RequestModuleInterface<IUserAccountService>());

                }
                else
                    m_LocalGroupsConnector = new GroupsServiceRemoteConnectorModule(m_Config, m_UserManagement);

                m_CacheWrapper = new RemoteConnectorCacheWrapper(m_UserManagement);
            }

        }
        public void RegionLoaded(Scene scene)
        {
            if (!m_groupMessagingEnabled)
                return;

            if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();

            // No groups module, no groups messaging
            if (m_groupData == null)
            {
                m_log.Error("[GROUPS-MESSAGING]: Could not get IGroupsServicesConnector, GroupsMessagingModule is now disabled.");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

            // No message transfer module, no groups messaging
            if (m_msgTransferModule == null)
            {
                m_log.Error("[GROUPS-MESSAGING]: Could not get MessageTransferModule");
                Close();
                m_groupMessagingEnabled = false;
                return;
            }

            if (m_presenceService == null)
                m_presenceService = scene.PresenceService;

            m_sceneList.Add(scene);

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientLogin += OnClientLogin;
        }
Beispiel #55
0
        public void Initialize(IScriptModulePlugin ScriptEngine, ISceneChildEntity host, uint localID, UUID itemID,
                               ScriptProtectionModule module)
        {
            m_ScriptEngine = ScriptEngine;
            m_host = host;
            m_localID = localID;
            m_itemID = itemID;
            ScriptProtection = module;

            m_ScriptDelayFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
            m_ScriptDistanceFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f);
            m_MinTimerInterval =
                m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f);
            m_automaticLinkPermission =
                m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false);
            m_allowOpenSimParams =
                m_ScriptEngine.Config.GetBoolean("AllowOpenSimParamsInLLFunctions", false);
            m_notecardLineReadCharsMax =
                m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255);
            if (m_notecardLineReadCharsMax > 65535)
                m_notecardLineReadCharsMax = 65535;

            m_TransferModule =
                World.RequestModuleInterface<IMessageTransferModule>();
            m_UrlModule = World.RequestModuleInterface<IUrlModule>();
            m_comms = World.RequestModuleInterface<IWorldComm>();

            m_sleepMsOnEmail = EMAIL_PAUSE_TIME * 1000;
        }
Beispiel #56
0
        public void RegionLoaded(Scene scene)
        {
            if (!m_groupsEnabled)
                return;

            if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name);

            if (m_groupData == null)
            {
                m_groupData = scene.RequestModuleInterface<IGroupsServicesConnector>();

                // No Groups Service Connector, then nothing works...
                if (m_groupData == null)
                {
                    m_groupsEnabled = false;
                    m_log.Error("[GROUPS]: Could not get IGroupsServicesConnector");
                    Close();
                    return;
                }
            }

            if (m_msgTransferModule == null)
            {
                m_msgTransferModule = scene.RequestModuleInterface<IMessageTransferModule>();

                // No message transfer module, no notices, group invites, rejects, ejects, etc
                if (m_msgTransferModule == null)
                {
                    m_groupsEnabled = false;
                    m_log.Warn("[GROUPS]: Could not get IMessageTransferModule");
                }
            }

            if (m_groupsMessagingModule == null)
            {
                m_groupsMessagingModule = scene.RequestModuleInterface<IGroupsMessagingModule>();

                // No message transfer module, no notices, group invites, rejects, ejects, etc
                if (m_groupsMessagingModule == null)
                    m_log.Warn("[GROUPS]: Could not get IGroupsMessagingModule");
            }

            lock (m_sceneList)
            {
                m_sceneList.Add(scene);
            }

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnMakeRootAgent += OnMakeRoot;
            scene.EventManager.OnMakeChildAgent += OnMakeChild;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
            scene.EventManager.OnClientClosed += OnClientClosed;

        }
Beispiel #57
0
        public void Initialize(IScriptEngine ScriptEngine, SceneObjectPart host, uint localID, UUID itemID)
        {
            m_ScriptEngine = ScriptEngine;
            m_host = host;
            m_localID = localID;
            m_itemID = itemID;

            m_ScriptDelayFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
            m_ScriptDistanceFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f);
            m_MinTimerInterval =
                m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f);
            m_automaticLinkPermission =
                m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false);
            m_notecardLineReadCharsMax =
                m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255);
            if (m_notecardLineReadCharsMax > 65535)
                m_notecardLineReadCharsMax = 65535;

            m_TransferModule =
                    m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
            m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
            if (m_UrlModule != null)
            {
                m_ScriptEngine.OnScriptRemoved += m_UrlModule.ScriptRemoved;
                m_ScriptEngine.OnObjectRemoved += m_UrlModule.ObjectRemoved;
            }

            AsyncCommands = new AsyncCommandManager(ScriptEngine);
        }
Beispiel #58
0
        public void Initialize(
            IScriptEngine scriptEngine, SceneObjectPart host, TaskInventoryItem item, WaitHandle coopSleepHandle)
        {
            m_ScriptEngine = scriptEngine;
            m_host = host;
            m_item = item;
            m_coopSleepHandle = coopSleepHandle;

            LoadConfig();

            m_TransferModule =
                    m_ScriptEngine.World.RequestModuleInterface<IMessageTransferModule>();
            m_UrlModule = m_ScriptEngine.World.RequestModuleInterface<IUrlModule>();
            m_SoundModule = m_ScriptEngine.World.RequestModuleInterface<ISoundModule>();

            AsyncCommands = new AsyncCommandManager(m_ScriptEngine);
        }
Beispiel #59
0
        public void Initialize(IScriptModulePlugin ScriptEngine, SceneObjectPart host, uint localID, UUID itemID, ScriptProtectionModule module)
        {
            m_ScriptEngine = ScriptEngine;
            m_host = host;
            m_localID = localID;
            m_itemID = itemID;
            ScriptProtection = module;

            m_ScriptDelayFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDelayFactor", 1.0f);
            m_ScriptDistanceFactor =
                m_ScriptEngine.Config.GetFloat("ScriptDistanceLimitFactor", 1.0f);
            m_MinTimerInterval =
                m_ScriptEngine.Config.GetFloat("MinTimerInterval", 0.5f);
            m_automaticLinkPermission =
                m_ScriptEngine.Config.GetBoolean("AutomaticLinkPermission", false);
            m_notecardLineReadCharsMax =
                m_ScriptEngine.Config.GetInt("NotecardLineReadCharsMax", 255);
            if (m_notecardLineReadCharsMax > 65535)
                m_notecardLineReadCharsMax = 65535;

            m_TransferModule =
                    World.RequestModuleInterface<IMessageTransferModule>();
            m_UrlModule = World.RequestModuleInterface<IUrlModule>();
            m_comms = World.RequestModuleInterface<IWorldComm>();
        }