예제 #1
0
        public bool Check()
        {
            bool didAnything = false;

            foreach (IWorldComm comms in m_modules)
            {
                if (comms.HasMessages())
                {
                    while (comms.HasMessages())
                    {
                        ListenerInfo lInfo = (ListenerInfo)comms.GetNextMessage();

                        //Deliver data to prim's listen handler
                        object[] resobj = new object[]
                        {
                            new LSL_Types.LSLInteger(lInfo.GetChannel()),
                            new LSL_Types.LSLString(lInfo.GetName()),
                            new LSL_Types.LSLString(lInfo.GetID().ToString()),
                            new LSL_Types.LSLString(lInfo.GetMessage())
                        };

                        m_ScriptEngine.PostScriptEvent(
                            lInfo.GetItemID(), lInfo.GetHostID(), new EventParams(
                                "listen", resobj,
                                new DetectParams[0]), EventPriority.Suspended);
                    }
                    didAnything = true;
                }
            }
            return(didAnything);
        }
예제 #2
0
        public void CheckListeners()
        {
            if (m_CmdManager.m_ScriptEngine.World == null)
            {
                return;
            }

            if (m_commsPlugin != null)
            {
                while (m_commsPlugin.HasMessages())
                {
                    ListenerInfo lInfo = (ListenerInfo)m_commsPlugin.GetNextMessage();

                    //Deliver data to prim's listen handler
                    object[] resobj = new object[]
                    {
                        new LSL_Types.LSLInteger(lInfo.GetChannel()),
                        new LSL_Types.LSLString(lInfo.GetName()),
                        new LSL_Types.LSLString(lInfo.GetID().ToString()),
                        new LSL_Types.LSLString(lInfo.GetMessage())
                    };

                    foreach (IScriptEngine e in m_CmdManager.ScriptEngines)
                    {
                        e.PostScriptEvent(
                            lInfo.GetItemID(), new EventParams(
                                "listen", resobj,
                                new DetectParams[0]));
                    }
                }
            }
        }
예제 #3
0
        public void Check()
        {
            foreach (IWorldComm comms in m_modules)
            {
                if (comms.HasMessages())
                {
                    while (comms.HasMessages())
                    {
                        ListenerInfo lInfo = (ListenerInfo)comms.GetNextMessage();

                        //Deliver data to prim's listen handler
                        object[] resobj = new object[]
                        {
                            new LSL_Types.LSLInteger(lInfo.GetChannel()),
                            new LSL_Types.LSLString(lInfo.GetName()),
                            new LSL_Types.LSLString(lInfo.GetID().ToString()),
                            new LSL_Types.LSLString(lInfo.GetMessage())
                        };

                        m_ScriptEngine.PostScriptEvent(
                            lInfo.GetItemID(), lInfo.GetHostID(), new EventParams(
                                "listen", resobj,
                                new DetectParams[0]));
                    }
                }
            }
        }