public override void RegionLoaded(Scene scene)
        {
            base.World = scene;

            if (base.World != null)
            {
                try
                {
                    m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();

                    m_scriptModule.RegisterScriptInvocation(this, "osGetSearchableObjectList");
                    m_scriptModule.RegisterScriptInvocation(this, "osGetSearchableObjectPartList");
                }
                catch (Exception e)
                {
                    base.Logger.WarnFormat("[" + Name + "]: Script method registration failed; {0}", e.Message);
                }

                base.World.EventManager.OnSceneObjectLoaded      += onSceneObjectLoaded;
                base.World.EventManager.OnSceneObjectPartCopy    += onSceneObjectPartCopy;
                base.World.EventManager.OnSceneObjectPartUpdated += onSceneObjectPartUpdated;
                base.World.EventManager.OnIncomingSceneObject    += onIncomingSceneObject;
            }
            else
            {
                base.Logger.Warn("[" + Name + "]: scene == null");
            }
        }
Example #2
0
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface <IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.WarnFormat("[ModInvoke] ScriptModuleComms interface not defined");
                    m_enabled = false;

                    return;
                }

                m_comms.RegisterScriptInvocation(this, "ModTest0");
                m_comms.RegisterScriptInvocation(this, "ModTest1");
                m_comms.RegisterScriptInvocation(this, "ModTest2");
                m_comms.RegisterScriptInvocation(this, "ModTest3");
                m_comms.RegisterScriptInvocation(this, "ModTest4");
                m_comms.RegisterScriptInvocation(this, "ModTest5");
                m_comms.RegisterScriptInvocation(this, "ModTest6");
                m_comms.RegisterScriptInvocation(this, "ModTest7");
                m_comms.RegisterScriptInvocation(this, "ModTest8");

                // Register some constants as well
                m_comms.RegisterConstant("ModConstantInt1", 25);
                m_comms.RegisterConstant("ModConstantFloat1", 25.000f);
                m_comms.RegisterConstant("ModConstantString1", "abcdefg");
            }
        }
Example #3
0
        public override void RegionLoaded(Scene scene)
        {
            base.World = scene;

            try
            {
                IScriptModuleComms m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();

                m_scriptModule.RegisterScriptInvocation(this, "osStartScriptEvents");
                m_scriptModule.RegisterScriptInvocation(this, "osStopScriptEvents");
                m_scriptModule.RegisterScriptInvocation(this, "osTriggerCustomEvent");

                m_scriptModule.RegisterConstant("EVENT_CUSTOM", 0);
                m_scriptModule.RegisterConstant("EVENT_NEWPRESENCE", 1);
                m_scriptModule.RegisterConstant("EVENT_REMOVEPRESENCE", 2);
                m_scriptModule.RegisterConstant("EVENT_AVATARENTERPARCEL", 3);
                m_scriptModule.RegisterConstant("EVENT_AVATARTELEPORT", 4);

                m_scriptModule.RegisterConstant("EVENT_DATASTORAGESET", 1001);
                m_scriptModule.RegisterConstant("EVENT_DATASTORAGEREMOVE", 1002);

                m_scriptModule.RegisterConstant("EVENT_EASYDIALOGTIMEOUT", 2001);

                m_scriptModule.RegisterConstant("EVENT_GENERIC", 42001337);
            }
            catch (Exception e)
            {
                base.Logger.WarnFormat("[" + Name + "]: Script method registration failed; {0}", e.Message);
            }

            ScriptEngine = base.World.RequestModuleInterface <IScriptModule>();

            base.World.EventManager.OnScriptReset  += onScriptReset;
            base.World.EventManager.OnRemoveScript += onScriptRemove;

            //DataStorage Events
            DataStorageEvents.onDeleteDataValue += scriptevent_onDeleteDataValue;
            DataStorageEvents.onSetDataValue    += scriptevent_onSetDataValue;
            DataStorageEvents.onRateLimit       += scriptevent_onRateLimit;

            //EasyDialog Events
            EasyDialogEvents.onDialogTimeout += scriptevent_onDialogTimeout;

            //Events for Scripts
            base.World.EventManager.OnNewPresence             += scriptevent_OnNewPresence;
            base.World.EventManager.OnRemovePresence          += scriptevent_OnRemovePresence;
            base.World.EventManager.OnAvatarEnteringNewParcel += scriptevent_OnAvatarEnteringNewParcel;
            base.World.EventManager.OnTeleportStart           += scriptevent_OnTeleportStart;
        }
        public override void RegionLoaded(Scene scene)
        {
            base.World = scene;

            try
            {
                IScriptModuleComms m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();
                m_scriptModule.RegisterScriptInvocation(this, "osGetInventoryList");
                m_scriptModule.RegisterScriptInvocation(this, "osGetRemoteInventoryList");
            }
            catch (Exception e)
            {
                base.Logger.WarnFormat("[" + Name + "]: script method registration failed; {0}", e.Message);
            }
        }
Example #5
0
        public override void RegionLoaded(Scene scene)
        {
            base.World = scene;

            try
            {
                IScriptModuleComms m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();
                m_scriptModule.RegisterScriptInvocation(this, "osEasyDialog");
            }
            catch (Exception e)
            {
                base.Logger.WarnFormat("[" + Name + "]: script method registration failed; {0}", e.Message);
            }

            m_dialogModule = base.World.RequestModuleInterface <IDialogModule>();
            m_scriptEngine = base.World.RequestModuleInterface <IScriptModule>();

            base.World.EventManager.OnChatFromClient += onChat;
            base.World.EventManager.OnScriptReset    += onScriptReset;
            base.World.EventManager.OnRemoveScript   += onScriptRemove;

            m_timer           = new Timer();
            m_timer.Interval  = 60000;
            m_timer.AutoReset = true;
            m_timer.Elapsed  += cleanup;
            m_timer.Start();
        }
        public override void RegionLoaded(Scene scene)
        {
            base.World = scene;
            base.World.EventManager.OnChatFromClient += onChat;
            base.World.EventManager.OnChatFromWorld  += onChat;

            base.World.EventManager.OnNewPresence    += scriptevent_OnNewPresence;
            base.World.EventManager.OnRemovePresence += scriptevent_OnRemovePresence;

            try
            {
                IScriptModuleComms m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();
                m_scriptModule.RegisterScriptInvocation(this, "osSendToDiscord");
            }
            catch (Exception e)
            {
                base.Logger.WarnFormat("[" + Name + "]: script method registration failed; {0}", e.Message);
            }

            WebHook webhook = new WebHook(m_discordWebHookURL);

            webhook.Name    = base.World.Name;
            webhook.Message = "The region started successfully.";
            webhook.sendAsync();
        }
Example #7
0
        private void RegisterScriptFunctions()
        {
            IScriptModuleComms comms = m_scene.RequestModuleInterface <IScriptModuleComms>();

            if (comms != null)
            {
                comms.RegisterScriptInvocation(this, "birdsGetStats");
            }
        }
Example #8
0
        public override void RegionLoaded(Scene scene)
        {
            base.Logger.Info("[" + Name + "]: Load region " + scene.Name);

            base.World = scene;

            if (m_storageTyp == "REGIONEXTRAS")
            {
                m_storage = new RegionExtras(base.World, m_config);
            }

            if (m_storageTyp == "FILESYSTEM")
            {
                m_storage = new FileSystem(base.World, m_config);
            }

            if (m_storageTyp == "MYSQL")
            {
                m_storage = new MySQL(base.World, m_config);
            }

            if (m_storageTyp == "REDIS")
            {
                m_storage = new Redis(base.World, m_config);
            }

            if (m_storageTyp == "MEMORY")
            {
                m_storage = new Memory();
            }

            if (m_storage == null)
            {
                m_storage = new Memory();
            }

            base.Logger.Info("[" + Name + "] Using '" + m_storageTyp + "' as Storage.");

            m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();
            if (m_scriptModule != null)
            {
                m_scriptModule.RegisterScriptInvocation(this, "osGetDataValue");
                m_scriptModule.RegisterScriptInvocation(this, "osSetDataValue");
                m_scriptModule.RegisterScriptInvocation(this, "osDeleteDataValue");
                m_scriptModule.RegisterScriptInvocation(this, "osCheckDataValue");

                m_scriptModule.RegisterScriptInvocation(this, "osGetPrivateDataValue");
                m_scriptModule.RegisterScriptInvocation(this, "osSetPrivateDataValue");
                m_scriptModule.RegisterScriptInvocation(this, "osDeletePrivateDataValue");
                m_scriptModule.RegisterScriptInvocation(this, "osCheckPrivateDataValue");
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface <IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.WarnFormat("[ModInvoke] ScriptModuleComms interface not defined");
                    m_enabled = false;

                    return;
                }

                m_comms.RegisterScriptInvocation(this, "dsMemClear");
                m_comms.RegisterScriptInvocation(this, "dsMemCount");
                m_comms.RegisterScriptInvocation(this, "dsMemGet");
                m_comms.RegisterScriptInvocation(this, "dsMemSet");
            }
        }
Example #10
0
        public override void RegionLoaded(Scene scene)
        {
            base.World = scene;

            try
            {
                IScriptModuleComms m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();

                m_scriptModule.RegisterScriptInvocation(this, "osTimerStart");
                m_scriptModule.RegisterScriptInvocation(this, "osTimerStop");
            }
            catch (Exception e)
            {
                base.Logger.WarnFormat("[" + Name + "]: script method registration failed; {0}", e.Message);
            }

            ScriptEngine = base.World.RequestModuleInterface <IScriptModule>();

            base.World.EventManager.OnScriptReset  += onScriptReset;
            base.World.EventManager.OnStopScript   += onScriptStop;
            base.World.EventManager.OnRemoveScript += onScriptRemove;
        }
Example #11
0
        // -----------------------------------------------------------------
        /// <summary>
        /// Called when all modules have been added for a region. This is
        /// where we hook up events
        /// </summary>
        // -----------------------------------------------------------------
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface <IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.ErrorFormat("[QuickSort] ScriptModuleComms interface not defined");
                    m_enabled = false;
                    return;
                }

                //m_comms.RegisterScriptInvocation("QuickSortConfig",SI_QuickSortConfig, new Type[] { typeof(string), typeof(string) }, typeof(int));
                //m_comms.RegisterScriptInvocation("QuickSortState",SI_QuickSortState, new Type[] { typeof(string) }, typeof(string));
                m_comms.RegisterScriptInvocation(this, "QuickSortConfig");
                m_comms.RegisterScriptInvocation(this, "QuickSortState");

                m_probeTimer.Enabled   = false;
                m_probeTimer.AutoReset = false;
                m_probeTimer.Interval  = 500; // 500 milliseconds wait to start async ops
                m_probeTimer.Elapsed  += new ElapsedEventHandler(UpdateSortObjects);
            }
        }
Example #12
0
        public override void RegionLoaded(Scene scene)
        {
            base.World = scene;

            base.World.Permissions.OnRezObject       += onRezObject;
            base.World.Permissions.OnDeleteObject    += onDeleteObject;
            base.World.Permissions.OnDuplicateObject += onDuplicateObject;
            base.World.Permissions.OnEditObject      += onEditObject;

            try
            {
                IScriptModuleComms m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();

                m_scriptModule.RegisterScriptInvocation(this, "osGetNodeListToTarget");
                m_scriptModule.RegisterScriptInvocation(this, "osGetNodeList");
                m_scriptModule.RegisterScriptInvocation(this, "osGetNextNode");
                m_scriptModule.RegisterScriptInvocation(this, "osGetNodeConnections");
                m_scriptModule.RegisterScriptInvocation(this, "osClearNodeCache");
            }
            catch (Exception e)
            {
                base.Logger.WarnFormat("[" + Name + "]: script method registration failed; {0}", e.Message);
            }
        }
Example #13
0
        // -----------------------------------------------------------------
        /// <summary>
        /// Called when all modules have been added for a region. This is
        /// where we hook up events
        /// </summary>
        // -----------------------------------------------------------------
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface <IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.ErrorFormat("[Utility] ScriptModuleComms interface not defined");
                    m_enabled = false;
                    return;
                }

                m_comms.RegisterScriptInvocation(this, "GISConvertFromUTM");
            }
        }
        public override void RegionLoaded(Scene scene)
        {
            base.World = scene;

            base.World.Permissions.OnRezObject    += onRezObject;
            base.World.Permissions.OnDeleteObject += onDeleteObject;

            try
            {
                IScriptModuleComms m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();
                m_scriptModule.RegisterScriptInvocation(this, "osSetExtraPermission");
            }
            catch (Exception e)
            {
                base.Logger.WarnFormat("[" + Name + "]: script method registration failed; {0}", e.Message);
            }
        }
Example #15
0
        public override void RegionLoaded(Scene scene)
        {
            base.World = scene;

            try
            {
                IScriptModuleComms m_scriptModule = base.World.RequestModuleInterface <IScriptModuleComms>();
                m_scriptModule.RegisterScriptInvocation(this, "osCreateBitmap");
                m_scriptModule.RegisterScriptInvocation(this, "osLoadBitmap");
                m_scriptModule.RegisterScriptInvocation(this, "osLoadBitmapFromURL");

                m_scriptModule.RegisterScriptInvocation(this, "osUnloadBitmap");
                m_scriptModule.RegisterScriptInvocation(this, "osSaveBitmap");
                m_scriptModule.RegisterScriptInvocation(this, "osResizeBitmap");
                m_scriptModule.RegisterScriptInvocation(this, "osGetBitmapPixel");
                m_scriptModule.RegisterScriptInvocation(this, "osSetBitmapPixel");
            }
            catch (Exception e)
            {
                base.Logger.WarnFormat("[" + Name + "]: script method registration failed; {0}", e.Message);
            }
        }
        public void RegionLoaded(Scene scene)
        {
            m_scene = scene;

            IScriptModuleComms comms = scene.RequestModuleInterface <IScriptModuleComms>();

            if (comms != null)
            {
                comms.RegisterScriptInvocation(this, "llAttachToAvatarTemp");
                m_log.DebugFormat("[TEMP ATTACHS]: Registered script functions");
                m_console = scene.RequestModuleInterface <IRegionConsole>();

                if (m_console != null)
                {
                    m_console.AddCommand("TempAttachModule", false, "set auto_grant_attach_perms", "set auto_grant_attach_perms true|false", "Allow objects owned by the region owner or estate managers to obtain attach permissions without asking the user", SetAutoGrantAttachPerms);
                }
            }
            else
            {
                m_log.ErrorFormat("[TEMP ATTACHS]: Failed to register script functions");
            }
        }
Example #17
0
        // -----------------------------------------------------------------
        /// <summary>
        /// Called when all modules have been added for a region. This is
        /// where we hook up events
        /// </summary>
        // -----------------------------------------------------------------
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface <IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.ErrorFormat("[NBody] ScriptModuleComms interface not defined");
                    m_enabled = false;
                    return;
                }

                m_comms.RegisterScriptInvocation(this, "NBCreateDomain");
                m_comms.RegisterScriptInvocation(this, "NBDestroyDomain");
                m_comms.RegisterScriptInvocation(this, "NBSetTimeScale");
                m_comms.RegisterScriptInvocation(this, "NBEnableDomain");
                m_comms.RegisterScriptInvocation(this, "NBDisableDomain");

                m_comms.RegisterScriptInvocation(this, "NBAddEntity");
                m_comms.RegisterScriptInvocation(this, "NBRemoveEntity");
                m_comms.RegisterScriptInvocation(this, "NBDump");
            }
        }
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface<IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.WarnFormat("[ModInvoke] ScriptModuleComms interface not defined");
                    m_enabled = false;

                    return;
                }

                m_comms.RegisterScriptInvocation(this,"ModTest0");
                m_comms.RegisterScriptInvocation(this,"ModTest1");
                m_comms.RegisterScriptInvocation(this,"ModTest2");
                m_comms.RegisterScriptInvocation(this,"ModTest3");
                m_comms.RegisterScriptInvocation(this,"ModTest4");
                m_comms.RegisterScriptInvocation(this,"ModTest5");
                m_comms.RegisterScriptInvocation(this,"ModTest6");
                m_comms.RegisterScriptInvocation(this,"ModTest7");
                m_comms.RegisterScriptInvocation(this,"ModTest8");

                m_comms.RegisterScriptInvocation(this,"ModTestR1");

                m_comms.RegisterScriptInvocation(this,"ModTest1p");
                m_comms.RegisterScriptInvocation(this,"ModTest2p");
                m_comms.RegisterScriptInvocation(this,"ModTest3p");
                m_comms.RegisterScriptInvocation(this,"ModTest4p");
                m_comms.RegisterScriptInvocation(this,"ModTest5p");

                m_comms.RegisterConstant("ModConstantInt1",25);
                m_comms.RegisterConstant("ModConstantFloat1",25.000f);
                m_comms.RegisterConstant("ModConstantString1","abcdefg");
            }
        }
Example #19
0
        // -----------------------------------------------------------------
        /// <summary>
        /// Called when all modules have been added for a region. This is
        /// where we hook up events
        /// </summary>
        // -----------------------------------------------------------------
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface <IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.ErrorFormat("[JsonStoreScripts] ScriptModuleComms interface not defined");
                    m_enabled = false;
                    return;
                }

                m_store = m_scene.RequestModuleInterface <IJsonStoreModule>();
                if (m_store == null)
                {
                    m_log.ErrorFormat("[JsonStoreScripts] JsonModule interface not defined");
                    m_enabled = false;
                    return;
                }

                try
                {
                    m_comms.RegisterScriptInvocation(this, "JsonCreateStore");
                    m_comms.RegisterScriptInvocation(this, "JsonDestroyStore");

                    m_comms.RegisterScriptInvocation(this, "JsonReadNotecard");
                    m_comms.RegisterScriptInvocation(this, "JsonWriteNotecard");

                    m_comms.RegisterScriptInvocation(this, "JsonTestPath");
                    m_comms.RegisterScriptInvocation(this, "JsonTestPathJson");

                    m_comms.RegisterScriptInvocation(this, "JsonGetValue");
                    m_comms.RegisterScriptInvocation(this, "JsonGetValueJson");

                    m_comms.RegisterScriptInvocation(this, "JsonTakeValue");
                    m_comms.RegisterScriptInvocation(this, "JsonTakeValueJson");

                    m_comms.RegisterScriptInvocation(this, "JsonReadValue");
                    m_comms.RegisterScriptInvocation(this, "JsonReadValueJson");

                    m_comms.RegisterScriptInvocation(this, "JsonSetValue");
                    m_comms.RegisterScriptInvocation(this, "JsonSetValueJson");

                    m_comms.RegisterScriptInvocation(this, "JsonRemoveValue");
                }
                catch (Exception e)
                {
                    // See http://opensimulator.org/mantis/view.php?id=5971 for more information
                    m_log.WarnFormat("[JsonStroreScripts] script method registration failed; {0}", e.Message);
                    m_enabled = false;
                }
            }
        }
        // -----------------------------------------------------------------
        /// <summary>
        /// Called when all modules have been added for a region. This is 
        /// where we hook up events
        /// </summary>
        // -----------------------------------------------------------------
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface<IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.ErrorFormat("[QuickSort] ScriptModuleComms interface not defined");
                    m_enabled = false;
                    return;
                }

                //m_comms.RegisterScriptInvocation("QuickSortConfig",SI_QuickSortConfig, new Type[] { typeof(string), typeof(string) }, typeof(int));
                //m_comms.RegisterScriptInvocation("QuickSortState",SI_QuickSortState, new Type[] { typeof(string) }, typeof(string));
                m_comms.RegisterScriptInvocation(this,"QuickSortConfig");
                m_comms.RegisterScriptInvocation(this,"QuickSortState");

                m_probeTimer.Enabled = false;
                m_probeTimer.AutoReset = false;
                m_probeTimer.Interval = 500; // 500 milliseconds wait to start async ops
                m_probeTimer.Elapsed += new ElapsedEventHandler(UpdateSortObjects);
            }
        }
        // -----------------------------------------------------------------
        /// <summary>
        /// Called when all modules have been added for a region. This is 
        /// where we hook up events
        /// </summary>
        // -----------------------------------------------------------------
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface<IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.ErrorFormat("[Utility] ScriptModuleComms interface not defined");
                    m_enabled = false;
                    return;
                }

                m_comms.RegisterScriptInvocation(this,"GISConvertFromUTM");
            }
        }
        // -----------------------------------------------------------------
        /// <summary>
        /// Called when all modules have been added for a region. This is 
        /// where we hook up events
        /// </summary>
        // -----------------------------------------------------------------
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface<IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.ErrorFormat("[JsonStoreScripts] ScriptModuleComms interface not defined");
                    m_enabled = false;
                    return;
                }

                m_store = m_scene.RequestModuleInterface<IJsonStoreModule>();
                if (m_store == null)
                {
                    m_log.ErrorFormat("[JsonStoreScripts] JsonModule interface not defined");
                    m_enabled = false;
                    return;
                }
                    
                try
                {
                    m_comms.RegisterScriptInvocation(this,"JsonCreateStore");
                    m_comms.RegisterScriptInvocation(this,"JsonDestroyStore");

                    m_comms.RegisterScriptInvocation(this,"JsonReadNotecard");
                    m_comms.RegisterScriptInvocation(this,"JsonWriteNotecard");

                    m_comms.RegisterScriptInvocation(this,"JsonTestPath");
                    m_comms.RegisterScriptInvocation(this,"JsonTestPathJson");

                    m_comms.RegisterScriptInvocation(this,"JsonGetValue");
                    m_comms.RegisterScriptInvocation(this,"JsonGetValueJson");

                    m_comms.RegisterScriptInvocation(this,"JsonTakeValue");
                    m_comms.RegisterScriptInvocation(this,"JsonTakeValueJson");

                    m_comms.RegisterScriptInvocation(this,"JsonReadValue");
                    m_comms.RegisterScriptInvocation(this,"JsonReadValueJson");

                    m_comms.RegisterScriptInvocation(this,"JsonSetValue");
                    m_comms.RegisterScriptInvocation(this,"JsonSetValueJson");

                    m_comms.RegisterScriptInvocation(this,"JsonRemoveValue");
                }
                catch (Exception e)
                {
                    // See http://opensimulator.org/mantis/view.php?id=5971 for more information
                    m_log.WarnFormat("[JsonStroreScripts] script method registration failed; {0}",e.Message);
                    m_enabled = false;
                }
            }
        }
        // -----------------------------------------------------------------
        /// <summary>
        /// Called when all modules have been added for a region. This is 
        /// where we hook up events
        /// </summary>
        // -----------------------------------------------------------------
        public void RegionLoaded(Scene scene)
        {
            if (m_enabled)
            {
                m_scene = scene;
                m_comms = m_scene.RequestModuleInterface<IScriptModuleComms>();
                if (m_comms == null)
                {
                    m_log.ErrorFormat("[NBody] ScriptModuleComms interface not defined");
                    m_enabled = false;
                    return;
                }

                m_comms.RegisterScriptInvocation(this,"NBCreateDomain");
                m_comms.RegisterScriptInvocation(this,"NBDestroyDomain");
                m_comms.RegisterScriptInvocation(this,"NBSetTimeScale");
                m_comms.RegisterScriptInvocation(this,"NBEnableDomain");
                m_comms.RegisterScriptInvocation(this,"NBDisableDomain");

                m_comms.RegisterScriptInvocation(this,"NBAddEntity");
                m_comms.RegisterScriptInvocation(this,"NBRemoveEntity");
                m_comms.RegisterScriptInvocation(this,"NBDump");
            }
        }