예제 #1
0
        public void SendMessageToGroup(GridInstantMessage im, UUID groupID)
        {
            if (m_debugEnabled)
            {
                MainConsole.Instance.DebugFormat("[GROUPS-MESSAGING]: {0} called", MethodBase.GetCurrentMethod().Name);
            }

            // Copy Message

            GridInstantMessage msg = new GridInstantMessage
            {
                imSessionID    = groupID,
                fromAgentName  = im.fromAgentName,
                message        = im.message,
                dialog         = (byte)InstantMessageDialog.SessionSend,
                offline        = 0,
                ParentEstateID = 0,
                Position       = Vector3.Zero,
                RegionID       = UUID.Zero
            };
            ChatSession session = m_groupData.GetSession(im.imSessionID);

            msg.binaryBucket = Utils.StringToBytes(session.Name);
            msg.timestamp    = (uint)Util.UnixTimeSinceEpoch();

            msg.fromAgentID = im.fromAgentID;
            msg.fromGroup   = true;

            Util.FireAndForget(SendInstantMessages, msg);
        }