public bool CanInstantMessage(UUID user, UUID target)
        {
            InstantMessageHandler handler = OnInstantMessage;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                return(list.Cast <InstantMessageHandler>().All(h => h(user, target, m_scene) != false));
            }
            return(true);
        }
Exemplo n.º 2
0
        public bool CanInstantMessage(UUID user, UUID target)
        {
            InstantMessageHandler handler = OnInstantMessage;

            if (handler != null)
            {
                Delegate[] list = handler.GetInvocationList();
                foreach (InstantMessageHandler h in list)
                {
                    if (h(user, target, m_scene) == false)
                    {
                        return(false);
                    }
                }
            }
            return(true);
        }
Exemplo n.º 3
0
 public void ClearRegistry()
 {
     if (handlerRegistry != null)
     {
         foreach (InstantMessageType type in handlerRegistry.Keys)
         {
             InstantMessageHandler messageHandler = handlerRegistry[type];
             if (messageHandler != null)
             {
                 foreach (InstantMessageHandler handler in messageHandler.GetInvocationList())
                 {
                     messageHandler -= handler;
                 }
             }
             handlerRegistry.Remove(type);
         }
     }
 }