private bool TryGetChatHandler(SceneInterface scene, out ChatHandler chat)
 {
     try
     {
         chat = scene.GetService <ChatServiceInterface>() as ChatHandler;
     }
     catch
     {
         chat = null;
     }
     return(chat != null);
 }
 internal RegionListenerInfo(
     ChatHandler handler,
     int channel,
     string name,
     UUID id,
     string message,
     Func <UUID> getuuid,
     Func <UGI> getgroup,
     Func <UUID> getowner,
     Action <ListenEvent> send)
     : base(handler, channel, name, id, message, getuuid, getgroup, GetPositionFunc, getowner, send, false)
 {
 }
Esempio n. 3
0
 internal RegexListenerInfo(
     ChatHandler handler,
     int channel,
     string name,
     UUID id,
     string message,
     Int32 regexBitfield,
     Func <UUID> getuuid,
     Func <UGI> getgroup,
     Func <Vector3> getpos,
     Func <UUID> getowner,
     Action <ListenEvent> send)
 {
     m_RegexBitfield = regexBitfield;
     IsActive        = true;
     m_Handler       = handler;
     Channel         = channel;
     if (!string.IsNullOrEmpty(name))
     {
         if ((m_RegexBitfield & 1) != 0)
         {
             m_Name      = new Regex(name);
             m_NamePlain = name;
         }
         else
         {
             m_NamePlain = name;
         }
     }
     m_ID = id;
     if (!string.IsNullOrEmpty(name))
     {
         if ((m_RegexBitfield & 2) != 0)
         {
             m_Message      = new Regex(message);
             m_MessagePlain = name;
         }
         else
         {
             m_MessagePlain = message;
         }
     }
     GetUUID     = getuuid;
     GetPosition = getpos;
     GetOwner    = getowner;
     GetGroup    = getgroup;
     m_Send      = send;
 }
Esempio n. 4
0
 public ChannelInfo(ChatHandler handler)
 {
     m_Handler = handler;
 }