public void PostInitialise()
        {
            m_serialisers.Add(new SerialiseTerrain());
            m_serialisers.Add(new SerialiseObjects());

//            LoadCommanderCommands();
        }
        public override void AddRegion(Scene scene)
        {
            if (!m_enabled)
            {
                return;
            }

            MainServer.Instance.AddXmlRPCHandler("concierge_update_welcome", XmlRpcUpdateWelcomeMethod, false);

            m_scenes.Add(scene);

            if (m_regions == null || m_regions.IsMatch(scene.RegionInfo.RegionName))
            {
                m_conciergedScenes.Add(scene);
            }

            // subscribe to NewClient events
            scene.EventManager.OnNewClient += OnNewClient;

            // subscribe to *Chat events
            scene.EventManager.OnChatFromWorld += OnChatFromWorld;
            if (!m_replacingChatModule)
            {
                scene.EventManager.OnChatFromClient += OnChatFromClient;
            }
            scene.EventManager.OnChatBroadcast += OnChatBroadcast;

            // subscribe to agent change events
            scene.EventManager.OnMakeRootAgent  += OnMakeRootAgent;
            scene.EventManager.OnMakeChildAgent += OnMakeChildAgent;
            m_log.InfoFormat("[Concierge]: initialized for {0}", scene.RegionInfo.RegionName);
        }
 public void AddRegion(Scene scene)
 {
     m_scenes.Add(scene);
     scene.RegisterModuleInterface <IServiceThrottleModule>(this);
     scene.EventManager.OnNewClient     += OnNewClient;
     scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
 }
        public void AddRegion(Scene scene)
        {
            if (Enabled)
            {
                try
                {
                    m_log.InfoFormat("[IRC-Bridge] Connecting region {0}", scene.RegionInfo.RegionName);

                    if (!String.IsNullOrEmpty(m_password))
                    {
                        MainServer.Instance.AddXmlRPCHandler("irc_admin", XmlRpcAdminMethod, false);
                    }

                    m_region = new RegionState(scene, m_config);
                    m_regions.Add(m_region);
                    m_region.Open();
                }
                catch (Exception e)
                {
                    m_log.WarnFormat("[IRC-Bridge] Region {0} not connected to IRC : {1}", scene.RegionInfo.RegionName, e.Message);
                    m_log.Debug(e);
                }
            }
            else
            {
                //m_log.DebugFormat("[IRC-Bridge] Not enabled. Connect for region {0} ignored", scene.RegionInfo.RegionName);
            }
        }
Exemple #5
0
 public void AddRegion(Scene scene)
 {
     if (m_Enabled)
     {
         scene.RegisterModuleInterface <IImprovedAssetCache>(this);
         m_Scenes.Add(scene);
     }
 }
        public void AddRegion(Scene scene)
        {
//            scene.RegisterModuleCommander(m_commander);
//            scene.EventManager.OnPluginConsole += EventManager_OnPluginConsole;
            scene.RegisterModuleInterface <IRegionSerialiserModule>(this);

            m_regions.Add(scene);
        }
        public bool AddConstraint(BSConstraint cons)
        {
            // There is only one constraint between any bodies. Remove any old just to make sure.
            RemoveAndDestroyConstraint(cons.Body1, cons.Body2);

            m_constraints.Add(cons);

            return(true);
        }
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            m_scenes.Add(scene);
            scene.RegisterModuleInterface <IAuthorizationService>(this);
        }
Exemple #9
0
        /// <summary>
        /// Add a command to those which can be invoked from the console.
        /// </summary>
        /// <param name="module"></param>
        /// <param name="command"></param>
        /// <param name="help"></param>
        /// <param name="longhelp"></param>
        /// <param name="descriptivehelp"></param>
        /// <param name="fn"></param>
        public void AddCommand(string module, bool shared, string command,
                               string help, string longhelp, string descriptivehelp,
                               CommandDelegate fn)
        {
            string[] parts = Parser.Parse(command);

            Dictionary <string, Object> current = tree;

            foreach (string part in parts)
            {
                if (current.ContainsKey(part))
                {
                    if (current[part] is Dictionary <string, Object> )
                    {
                        current = (Dictionary <string, Object>)current[part];
                    }
                    else
                    {
                        return;
                    }
                }
                else
                {
                    current[part] = new Dictionary <string, Object>();
                    current       = (Dictionary <string, Object>)current[part];
                }
            }

            CommandInfo info;

            if (current.ContainsKey(String.Empty))
            {
                info = (CommandInfo)current[String.Empty];
                if (!info.shared && !info.fn.Contains(fn))
                {
                    info.fn.Add(fn);
                }

                return;
            }

            info                  = new CommandInfo();
            info.module           = module;
            info.shared           = shared;
            info.help_text        = help;
            info.long_help        = longhelp;
            info.descriptive_help = descriptivehelp;
            info.fn               = new List <CommandDelegate>();
            info.fn.Add(fn);
            current[String.Empty] = info;

            // Now add command to modules dictionary
            ThreadedClasses.RwLockedList <CommandInfo> commands = m_modulesCommands[module];
            commands.Add(info);
        }
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            m_Scenes.Add(scene);

            scene.RegisterModuleInterface <ICallingCardModule>(this);
        }
        public virtual void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            m_log.Debug("[MESSAGE TRANSFER]: Message transfer module active");
            scene.RegisterModuleInterface <IMessageTransferModule>(this);
            m_Scenes.Add(scene);
        }
        public void AddRegion(Scene scene)
        {
            if (m_scene == null)
            {
                m_scene = scene;
            }

            m_scenes.Add(scene);
            scene.EventManager.OnNewClient += OnNewClient;
            m_Clients = new ThreadedClasses.RwLockedList <UUID>();
        }
        public void AddRegion(Scene scene)
        {
            if (!IsEnabled())
            {
                return;
            }

            m_scenes.Add(scene);

            scene.RegisterModuleInterface <IXMLRPC>(this);
        }
        public void AddRegion(Scene scene)
        {
            if (!enabled)
            {
                return;
            }

            m_SceneList.Add(scene);

            scene.EventManager.OnNewClient += OnNewClient;
        }
Exemple #15
0
        public void AddRegion(Scene scene)
        {
            if (!m_enabled)
            {
                return;
            }

            m_scenes.Add(scene);
            scene.EventManager.OnClientConnect          += OnClientConnect;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
        }
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            m_scenes.Add(scene);
            scene.EventManager.OnIncomingInstantMessage += OnIncomingInstantMessage;
            scene.EventManager.OnNewClient += OnNewClient;
        }
        public void AddRegion(Scene scene)
        {
            if (m_Enabled)
            {
                m_Scenes.Add(scene);

                scene.RegisterModuleInterface <IUserManagement>(this);
                scene.RegisterModuleInterface <IPeople>(this);
                scene.EventManager.OnNewClient   += new EventManager.OnNewClientDelegate(EventManager_OnNewClient);
                scene.EventManager.OnPrimsLoaded += new EventManager.PrimsLoaded(EventManager_OnPrimsLoaded);
            }
        }
Exemple #18
0
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            m_Scenes.Add(scene);
            // Hook up events
            scene.EventManager.OnNewClient += OnNewClient;
            scene.RegisterModuleInterface <IProfileModule>(this);
        }
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            // Take ownership of the IProfileModule service
            scene.RegisterModuleInterface <IProfileModule>(this);

            // Add our scene to our list...
            m_Scenes.Add(scene);
        }
        public void RegionLoaded(Scene scene)
        {
//            m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);

            m_scenes.Add(scene);

            scene.AddCommand(
                "Users", this, "attachments show",
                "attachments show [<first-name> <last-name>]",
                "Show attachment information for avatars in this simulator.",
                "If no name is supplied then information for all avatars is shown.",
                HandleShowAttachmentsCommand);
        }
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            m_SceneList.Add(scene);

            scene.EventManager.OnNewClient    += OnNewClient;
            scene.EventManager.OnClientClosed += OnClientClosed;
            //            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
        }
        // Mark the connector as connectable. Harmless if already enabled.

        public void Open()
        {
            if (!m_enabled)
            {
                if (!Connected)
                {
                    Connect();
                }

                m_connectors.Add(this);

                m_enabled = true;
            }
        }
        public bool Store(FriendsData data)
        {
            if (data == null)
            {
                return(false);
            }

//            m_log.DebugFormat(
//                "[NULL FRIENDS DATA]: Storing {0} {1} {2}", data.PrincipalID, data.Friend, data.Data["Flags"]);

            m_Data.Add(data);

            return(true);
        }
 public void Enqueue(PollServiceHttpRequest req)
 {
     if (IsRunning)
     {
         if (req.PollServiceArgs.Type == PollServiceEventArgs.EventType.LongPoll)
         {
             m_longPollRequests.Add(req);
         }
         else
         {
             m_requests.Enqueue(req);
         }
     }
 }
Exemple #25
0
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            m_Scenelist.Add(scene);

//            scene.RegisterModuleInterface<IInventoryTransferModule>(this);

            scene.EventManager.OnNewClient += OnNewClient;
            scene.EventManager.OnIncomingInstantMessage += OnGridInstantMessage;
        }
Exemple #26
0
        public void RegionLoaded(Scene scene)
        {
//            m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);

            m_scenes.Add(scene);

            scene.AddCommand(
                "Users", this, "show animations",
                "show animations [<first-name> <last-name>]",
                "Show animation information for avatars in this simulator.",
                "If no name is supplied then information for all avatars is shown.\n"
                + "Please note that for inventory animations, the animation name is the name under which the animation was originally uploaded\n"
                + ", which is not necessarily the current inventory name.",
                HandleShowAnimationsCommand);
        }
Exemple #27
0
        public void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

            // Hook up events
            scene.EventManager.OnNewClient += OnNewClient;

            // Take ownership of the ISearchModule service
            scene.RegisterModuleInterface <ISearchModule>(this);

            // Add our scene to our list...
            m_Scenes.Add(scene);
        }
        public virtual void AddRegion(Scene scene)
        {
            if (!m_Enabled)
            {
                return;
            }

//            m_log.DebugFormat("[FRIENDS MODULE]: AddRegion on {0}", Name);

            m_Scenes.Add(scene);
            scene.RegisterModuleInterface <IFriendsModule>(this);

            scene.EventManager.OnNewClient     += OnNewClient;
            scene.EventManager.OnClientClosed  += OnClientClosed;
            scene.EventManager.OnMakeRootAgent += OnMakeRootAgent;
            scene.EventManager.OnClientLogin   += OnClientLogin;
        }
        public void Add(UUID itemID, UUID assetID)
        {
            if (itemID == UUID.Zero)
            {
                return;
            }
            if (m_items.ContainsKey(itemID))
            {
                m_items[itemID] = assetID;
                return;
            }
            if (m_ids.Count >= 5)
            {
                return;
            }

            m_ids.Add(itemID);
            m_items[itemID] = assetID;
        }
        public int AddListener(uint localID, UUID itemID, UUID hostID,
                               int channel, string name, UUID id, string msg,
                               int regexBitfield)
        {
            // do we already have a match on this particular filter event?
            List <ListenerInfo> coll = GetListeners(itemID, channel, name, id,
                                                    msg);

            if (coll.Count > 0)
            {
                // special case, called with same filter settings, return same
                // handle (2008-05-02, tested on 1.21.1 server, still holds)
                return(coll[0].GetHandle());
            }

            if (m_curlisteners < m_maxlisteners)
            {
                lock (m_listeners) /* serialize handle creation here */
                {
                    int newHandle = GetNewHandle(itemID);

                    if (newHandle > 0)
                    {
                        ListenerInfo li = new ListenerInfo(newHandle, localID,
                                                           itemID, hostID, channel, name, id, msg,
                                                           regexBitfield);


                        ThreadedClasses.RwLockedList <ListenerInfo> listeners =
                            m_listeners.GetOrAddIfNotExists(channel, delegate()
                        {
                            return(new ThreadedClasses.RwLockedList <ListenerInfo>());
                        });
                        listeners.Add(li);
                        Interlocked.Increment(ref m_curlisteners);

                        return(newHandle);
                    }
                }
            }
            return(-1);
        }
        internal void ReplaceAttachment(AvatarAttachment attach)
        {
//            m_log.DebugFormat(
//                "[AVATAR APPEARANCE]: Replacing itemID={0}, assetID={1} at {2}",
//                attach.ItemID, attach.AssetID, attach.AttachPoint);

            ThreadedClasses.RwLockedList<AvatarAttachment> newList = new ThreadedClasses.RwLockedList<AvatarAttachment>();
            newList.Add(attach);
            m_attachments[attach.AttachPoint] = newList;
        }