Example #1
0
        public void SendAlert(string message)
        {
            //Get required interfaces
            IAsyncMessagePostService  messagePost = m_registry.RequestModuleInterface <IAsyncMessagePostService>();
            ICapsService              capsService = m_registry.RequestModuleInterface <ICapsService>();
            List <IClientCapsService> clients     = capsService.GetClientsCapsServices();

            //Go through all clients, and send the message asyncly to all agents that are root
            foreach (IRegionClientCapsService regionClient in from client in clients from regionClient in client.GetCapsServices() where regionClient.RootAgent select regionClient)
            {
                MainConsole.Instance.Debug("[GridWideMessageModule]: Informed " + regionClient.ClientCaps.AccountInfo.Name);
                //Send the message to the client
                messagePost.Post(regionClient.RegionHandle,
                                 BuildRequest("GridWideMessage", message, regionClient.AgentID.ToString()));
            }
            MainConsole.Instance.Info("[GridWideMessageModule]: Sent alert, will be delievered across the grid in the next 3 minutes.");
        }
Example #2
0
        public void SendAlert(string message)
        {
            //Get required interfaces
            List <IClientCapsService> clients = m_capsService.GetClientsCapsServices();

            //Go through all clients, and send the message async to all agents that are root
            foreach (
                IRegionClientCapsService regionClient in
                from client in clients
                from regionClient in client.GetCapsServices()
                where regionClient.RootAgent
                select regionClient)
            {
                MainConsole.Instance.Debug("[GridWideMessageModule]: Informed " + regionClient.ClientCaps.AccountInfo.Name);
                //Send the message to the client
                m_messagePost.Post(regionClient.Region.ServerURI,
                                   BuildRequest("GridWideMessage", message, regionClient.AgentID.ToString()));
            }
            MainConsole.Instance.Info("[GridWideMessageModule]: Sent alert, will be delivered across the grid shortly.");
        }
        public void SendAlert(string message)
        {
            //Get required interfaces
            IAsyncMessagePostService  messagePost = m_registry.RequestModuleInterface <IAsyncMessagePostService> ();
            ICapsService              capsService = m_registry.RequestModuleInterface <ICapsService> ();
            List <IClientCapsService> clients     = capsService.GetClientsCapsServices();

            //Go through all clients, and send the message asyncly to all agents that are root
            foreach (IClientCapsService client in clients)
            {
                foreach (IRegionClientCapsService regionClient in client.GetCapsServices())
                {
                    if (regionClient.RootAgent)
                    {
                        //Send the message to the client
                        messagePost.Post(regionClient.RegionHandle, BuildRequest("GridWideMessage", message, regionClient.AgentID.ToString()));
                    }
                }
            }
        }