Beispiel #1
0
        public override Listener AddChatPassListener(Action <ListenEvent> send)
        {
            var li = new RegionListenerInfo(this, 0, string.Empty, UUID.Zero, string.Empty, GetPassListenerUUID, null, null, send);

            m_ChatPass.Add(li);
            return(li);
        }
Beispiel #2
0
        public override Listener AddRegionListener(int channel, string name, UUID id, string message, Func <UUID> getuuid, Func <UGI> getgroup, Func <UUID> getowner, Action <ListenEvent> send)
        {
            var li = new RegionListenerInfo(this, channel, name, id, message, getuuid, getgroup, getowner, send);

            ChannelInfo ci = m_Channels.GetOrAddIfNotExists(channel, () =>
            {
                var newci = new ChannelInfo(this);
                newci.Listeners.Add(li);
                return(newci);
            });

            /* check whether we had a fresh add of ChannelInfo */
            if (ci.Listeners.Contains(li))
            {
                return(li);
            }
            ci.Listeners.Add(li);
            return(li);
        }