/// <summary> /// Sets the Home Point. The LoginService uses this to know where to put a user when they log-in /// </summary> /// <param name = "remoteClient"></param> /// <param name = "regionHandle"></param> /// <param name = "position"></param> /// <param name = "lookAt"></param> /// <param name = "flags"></param> public void SetHomeRezPoint(IClientAPI remoteClient, ulong regionHandle, Vector3 position, Vector3 lookAt, uint flags) { IScene scene = remoteClient.Scene; IScenePresence SP = scene.GetScenePresence(remoteClient.AgentId); IDialogModule module = scene.RequestModuleInterface <IDialogModule>(); if (SP != null) { if (scene.Permissions.CanSetHome(SP.UUID)) { IAvatarAppearanceModule appearance = SP.RequestModuleInterface <IAvatarAppearanceModule>(); position.Z += appearance.Appearance.AvatarHeight / 2; IAgentInfoService agentInfoService = scene.RequestModuleInterface <IAgentInfoService>(); if (agentInfoService != null && agentInfoService.SetHomePosition(remoteClient.AgentId.ToString(), scene.RegionInfo.RegionID, position, lookAt) && module != null) //Do this last so it doesn't screw up the rest { // FUBAR ALERT: this needs to be "Home position set." so the viewer saves a home-screenshot. module.SendAlertToUser(remoteClient, "Home position set."); } else if (module != null) { module.SendAlertToUser(remoteClient, "Set Home request failed."); } } else if (module != null) { module.SendAlertToUser(remoteClient, "Set Home request failed: Permissions do not allow the setting of home here."); } } }
public object RegionSendAlertHandler(IList args, IPEndPoint remoteClient) { m_admin.CheckSessionValid(new UUID((string)args[0])); if (args.Count < 3) { return(false); } Scene scene; if (!m_app.SceneManager.TryGetScene((string)args[1], out scene)) { throw new Exception("region not found"); } String message = (string)args[2]; IDialogModule dialogModule = scene.RequestModuleInterface <IDialogModule>(); if (dialogModule != null) { dialogModule.SendGeneralAlert(message); } return(true); }
/// <summary> /// All message for money actually go through this function. Which also update the balance /// </summary> /// <param name="toId"></param> /// <param name="message"></param> /// <param name="goDeep"></param> /// <param name="transactionId"></param> /// <returns></returns> public bool SendGridMessage(UUID toId, string message, bool goDeep, UUID transactionId) { if (!m_options.DisplayPayMessages) { message = ""; } if (Scene == null) { return((goDeep) && m_connector.SendGridMessage(toId, message, false, transactionId)); } IDialogModule dialogModule = Scene.RequestModuleInterface <IDialogModule>(); if (dialogModule != null) { IClientAPI icapiTo = GetUserClient(toId); if ((message.IndexOf("http") > -1) && (icapiTo != null)) { icapiTo.SendMoneyBalance(transactionId, true, new byte[0], (int)m_connector.UserCurrencyInfo(icapiTo.AgentId).Amount); dialogModule.SendUrlToUser(toId, "", UUID.Zero, UUID.Zero, false, message, message.Substring(message.IndexOf("http"))); icapiTo.SendAlertMessage(message.Substring(message.IndexOf("http"))); } else if (icapiTo != null) { icapiTo.SendMoneyBalance(transactionId, true, Utils.StringToBytes(message), (int)m_connector.UserCurrencyInfo(icapiTo.AgentId).Amount); } else { dialogModule.SendAlertToUser(toId, message); } return(true); } return((goDeep) && m_connector.SendGridMessage(toId, message, false, transactionId)); }
private void OnTimedShutdown(Object source, ElapsedEventArgs e) { countdownTimeNow = Util.GetLongTickCount(); if (countdownTimeNow >= countdownTimeEnd) { shutdownCounter.Stop(); m_app.Shutdown(); countdownTimeEnd = 0; return; } ulong countdownRemaining = countdownTimeEnd - countdownTimeNow; if (countdownRemaining % (60UL * 1000UL) < 1000UL) // Within a second of every minute from 0. { string message = GenerateShutdownMessage((int)(countdownRemaining / 1000UL)); m_log.DebugFormat("[RADMIN] Shutdown: {0}", message); IDialogModule dialogModule = rebootedScene.RequestModuleInterface <IDialogModule>(); if (dialogModule != null) { dialogModule.SendGeneralAlert(message); } } }
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 void Initialise(Scene scene, IConfigSource source) { m_scene = scene; m_dialogModule = m_scene.RequestModuleInterface <IDialogModule>(); m_scene.RegisterModuleInterface <IGodsModule>(this); m_scene.EventManager.OnNewClient += SubscribeToClientEvents; }
public void Initialise(Scene scene, IConfigSource source) { m_scene = scene; m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>(); m_scene.RegisterModuleInterface<IGodsModule>(this); m_scene.EventManager.OnNewClient += SubscribeToClientEvents; }
private void WriteParametersToLocalCurrentFile(string[] parameters) { try { System.IO.StreamWriter outputStream; outputStream = System.IO.File.CreateText(m_currentFile); foreach (string parameter in parameters) { outputStream.WriteLine(parameter); } outputStream.Close(); } catch //failed to write for some reason { m_log.Error("[vpgParameters] Error writing to \"" + m_currentFile + "\". Parameters will not be persistent over region restarts.."); foreach (Scene scene in m_scenes) { IDialogModule dialogmod = scene.RequestModuleInterface <IDialogModule>(); if (dialogmod != null) { dialogmod.SendGeneralAlert("Parameters Module: Error writing parameters to disk. Parameters will not persist over region restarts..."); } } } }
public void initialize(Scene scene) { scene.EventManager.OnFrame += onFrame; m_scene = scene; dialog = m_scene.RequestModuleInterface <IDialogModule>(); /* lookup xEngine */ IScriptModule scriptModule = null; foreach (IScriptModule sm in scene.RequestModuleInterfaces <IScriptModule>()) { if (sm.ScriptEngineName == scene.DefaultScriptEngine) { scriptModule = sm; } else if (scriptModule == null) { scriptModule = sm; } } xEngine = (XEngine)scriptModule; /* lookup NPC module */ npc = (NPCModule)m_scene.RequestModuleInterface <INPCModule>(); }
private void OnEstateMessage(UUID RegionID, UUID FromID, string FromName, string Message) { Scene senderScenes = FindScene(RegionID); if (senderScenes == null) { return; } uint estateID = senderScenes.RegionInfo.EstateSettings.EstateID; foreach (Scene s in Scenes) { if (s.RegionInfo.EstateSettings.EstateID == estateID) { IDialogModule dm = s.RequestModuleInterface <IDialogModule>(); if (dm != null) { dm.SendNotificationToUsersInRegion(FromID, FromName, Message); } } } if (!m_InInfoUpdate) { m_EstateConnector.SendEstateMessage(estateID, FromID, FromName, Message); } }
public DateTime llTextBox(string agent, string message, int chatChannel) { IDialogModule dm = World.RequestModuleInterface <IDialogModule>(); if (dm == null) { return(DateTime.Now); } if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) { return(DateTime.Now); } UUID av = new UUID(); if (!UUID.TryParse(agent, out av)) { Error("llDialog", "First parameter must be a key"); return(DateTime.Now); } if (message != null && message.Length > 1024) { message = message.Substring(0, 1024); } dm.SendTextBoxToUser(av, message, chatChannel, m_host.Name, m_host.UUID, m_host.OwnerID); return(PScriptSleep(m_sleepMsOnTextBox)); }
public void AddRegion(Scene scene) { m_scene = scene; m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>(); m_scene.RegisterModuleInterface<IAttachmentsModule>(this); m_scene.EventManager.OnNewClient += SubscribeToClientEvents; // TODO: Should probably be subscribing to CloseClient too, but this doesn't yet give us IClientAPI }
void DialogToAll(string dialogMessage) { IDialogModule dialogMod = m_scene.RequestModuleInterface <IDialogModule>(); if (dialogMod != null) { dialogMod.SendGeneralAlert(dialogMessage); } }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_dialogmod = scene.RequestModuleInterface <IDialogModule>(); m_scene.EventManager.OnMakeRootAgent += OnVisit; } }
public void AddRegion(Scene scene) { if (ENABLED) { m_scene = scene; m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove; m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>(); } }
public void LoadUrl(IObject sender, string message, string url) { IDialogModule dm = m_rootScene.RequestModuleInterface <IDialogModule>(); if (dm != null) { dm.SendUrlToUser(GetSP().UUID, sender.Name, sender.GlobalID, GetSP().UUID, false, message, url); } }
private void SendEstateBlueBoxMessage( IClientAPI remote_client, UUID invoice, UUID senderID, UUID sessionID, string senderName, string message) { IDialogModule dm = m_scene.RequestModuleInterface <IDialogModule>(); if (dm != null) { dm.SendNotificationToUsersInEstate(senderID, senderName, message); } }
public void AddRegion(Scene scene) { if (ENABLED) { m_scene = scene; m_scene.EventManager.OnObjectAddedToScene += OnObjectAddedToScene; m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove; m_dialogMod = m_scene.RequestModuleInterface <IDialogModule>(); } }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_dialogmod = m_scene.RequestModuleInterface <IDialogModule>(); m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat); m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat); } }
protected OSDMap OnMessageReceived(OSDMap message) { if (message.ContainsKey("Method") && message["Method"] == "GridWideMessage") { //We got a message, now display it string user = message["User"].AsString(); string value = message["Value"].AsString(); //Get the Scene registry since IDialogModule is a region module, and isn't in the ISimulationBase registry ISceneManager manager = m_registry.RequestModuleInterface <ISceneManager>(); if (manager != null) { foreach (IScene scene in manager.Scenes) { IScenePresence sp = null; if (scene.TryGetScenePresence(UUID.Parse(user), out sp) && !sp.IsChildAgent) { IDialogModule dialogModule = scene.RequestModuleInterface <IDialogModule>(); if (dialogModule != null) { //Send the message to the user now dialogModule.SendAlertToUser(UUID.Parse(user), value); } } } } } else if (message.ContainsKey("Method") && message["Method"] == "KickUserMessage") { //We got a message, now display it string user = message["User"].AsString(); string value = message["Value"].AsString(); //Get the Scene registry since IDialogModule is a region module, and isn't in the ISimulationBase registry ISceneManager manager = m_registry.RequestModuleInterface <ISceneManager>(); if (manager != null) { foreach (IScene scene in manager.Scenes) { IScenePresence sp = null; if (scene.TryGetScenePresence(UUID.Parse(user), out sp)) { sp.ControllingClient.Kick(value == "" ? "The WhiteCore Grid Manager kicked you out." : value); IEntityTransferModule transferModule = scene.RequestModuleInterface <IEntityTransferModule>(); if (transferModule != null) { transferModule.IncomingCloseAgent(scene, sp.UUID); } } } } } return(null); }
public void AddRegion(Scene scene) { if (ENABLED) { m_scene = scene; m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove; m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>(); m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name); } }
public void AddRegion(Scene scene) { if (ENABLED) { m_scene = scene; m_scene.EventManager.OnSceneGroupMove += OnSceneGroupMove; m_dialogMod = m_scene.RequestModuleInterface <IDialogModule>(); m_log.DebugFormat("[DA EXAMPLE MODULE]: Added region {0}", m_scene.Name); } }
public DateTime llDialog(string avatar, string message, LSL_List buttons, int chat_channel) { IDialogModule dm = World.RequestModuleInterface <IDialogModule>(); if (dm == null) { return(DateTime.Now); } if (!ScriptProtection.CheckThreatLevel(ThreatLevel.None, "LSL", m_host, "LSL", m_itemID)) { return(DateTime.Now); } UUID av = new UUID(); if (!UUID.TryParse(avatar, out av)) { //Silently accepted in in SL NOTE: it does sleep though! //LSLError("First parameter to llDialog needs to be a key"); return(PScriptSleep(m_sleepMsOnDialog)); } if (buttons.Length > 12) { Error("llDialog", "No more than 12 buttons can be shown"); return(DateTime.Now); } string[] buts = new string[buttons.Length]; for (int i = 0; i < buttons.Length; i++) { if (buttons.Data[i].ToString() == string.Empty) { Error("llDialog", "Button label cannot be blank"); return(DateTime.Now); } if (buttons.Data[i].ToString().Length > 24) { Error("llDialog", "Button label cannot be longer than 24 characters"); return(DateTime.Now); } buts[i] = buttons.Data[i].ToString(); } if (buts.Length == 0) { buts = new[] { "OK" } } ; dm.SendDialogToUser( av, m_host.Name, m_host.UUID, m_host.OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buts); return(PScriptSleep(m_sleepMsOnDialog)); }
void DialogToAll(string message) { foreach (Scene scene in m_scenes) { IDialogModule dialogmod = scene.RequestModuleInterface <IDialogModule>(); if (dialogmod != null) { dialogmod.SendGeneralAlert(message); } } }
private OSDMap syncRecievedService_OnMessageReceived(OSDMap message) { string method = message["Method"]; if (method == "UpdateMoneyBalance") { UUID agentID = message["AgentID"]; int Amount = message["Amount"]; string Message = message["Message"]; UUID TransactionID = message["TransactionID"]; IDialogModule dialogModule = GetSceneFor(agentID).RequestModuleInterface <IDialogModule>(); IScenePresence sp = GetSceneFor(agentID).GetScenePresence(agentID); if (sp != null) { if (dialogModule != null && !string.IsNullOrEmpty(Message)) { dialogModule.SendAlertToUser(agentID, Message); } sp.ControllingClient.SendMoneyBalance(TransactionID, true, Utils.StringToBytes(Message), Amount); } } else if (method == "GetLandData") { UUID agentID = message["AgentID"]; IParcelManagementModule parcelManagement = GetSceneFor(agentID).RequestModuleInterface <IParcelManagementModule>(); if (parcelManagement != null) { IScenePresence sp = GetSceneFor(agentID).GetScenePresence(agentID); if (sp != null) { ILandObject lo = sp.CurrentParcel; if ((lo.LandData.Flags & (uint)ParcelFlags.ForSale) == (uint)ParcelFlags.ForSale) { if (lo.LandData.AuthBuyerID != UUID.Zero && lo.LandData.AuthBuyerID != agentID) { return new OSDMap() { new KeyValuePair <string, OSD>("Success", false) } } ; OSDMap map = lo.LandData.ToOSD(); map["Success"] = true; return(map); } } } return(new OSDMap() { new KeyValuePair <string, OSD>("Success", false) }); } return(null); }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_dialogmod = scene.RequestModuleInterface <IDialogModule>(); m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat); m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat); m_timer.Elapsed += new ElapsedEventHandler(OnTimer); m_timer.Interval = m_cycleTime; } }
public void PostInitialise() { if (m_enabled) { m_dialogmod = m_scene.RequestModuleInterface <IDialogModule>(); m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat); m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat); //Start the timer m_timer.Elapsed += new ElapsedEventHandler(OnTimer); m_timer.Interval = m_cycleTime; } }
public void RegionLoaded(Scene scene) { if (!Enabled) { return; } m_scene = scene; scene.EventManager.OnMakeRootAgent += new Action <ScenePresence>(EventManager_OnMakeRootAgent); scene.EventManager.OnClientClosed += new EventManager.ClientClosed(EventManager_OnClientClosed); scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(EventManager_OnChatFromClient); m_dialogMod = scene.RequestModuleInterface <IDialogModule>(); }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_chatLog = System.IO.Path.Combine(m_logPath, m_instanceTag + "-chat.log"); m_scene.EventManager.OnChatFromClient += OnClientChat; //Avatar chat m_scene.EventManager.OnChatFromWorld += OnWorldChat; //Object chat m_scene.EventManager.OnChatBroadcast += OnBroadcast; //Module chat (e.g., the IRCBridge Module) m_scene.EventManager.OnMakeRootAgent += OnVisit; //Avatars entering region m_dialogMod = m_scene.RequestModuleInterface <IDialogModule>(); } }
public void AddRegion(Scene scene) { m_scene = scene; m_dialogModule = m_scene.RequestModuleInterface <IDialogModule>(); m_scene.RegisterModuleInterface <IAttachmentsModule>(this); if (Enabled) { m_scene.EventManager.OnNewClient += SubscribeToClientEvents; } // TODO: Should probably be subscribing to CloseClient too, but this doesn't yet give us IClientAPI }
public OsButton(SceneObjectPart part, IDisplayBehaviour displayBehaviour, ILabelBehaviour labelBehaviour) { m_part = part; m_scene = m_part.ParentGroup.Scene; ResetButtonPrims(); m_eventManager = m_scene.EventManager; m_dialogModule = m_scene.RequestModuleInterface <IDialogModule>(); DisplayBehaviour = displayBehaviour; displayBehaviour.Button = this; DisplayBehaviour.UpdateAppearance(); LabelBehaviour = labelBehaviour; }
public void PostInitialise() { if (m_enabled) { //Register for modSendCommand events from inworld scripts //If we try to do this as part of Initialise() we get an UnhandledEventException. m_scriptmod = m_scene.RequestModuleInterface <IScriptModuleComms>(); m_scriptmod.OnScriptCommand += new ScriptCommand(OnModSendCommand); //Register for chat commands so we can receive orders to generate new plants m_scene.EventManager.OnChatFromClient += OnChat; m_scene.EventManager.OnChatFromWorld += OnChat; //Register for IDialogModule so we can send notices m_dialogmod = m_scene.RequestModuleInterface <IDialogModule>(); m_log.Info("[vpgManager] Post-initialized... "); } }
// Setup runtime variable values public RegionState(Scene p_scene, IConfig p_config) { scene = p_scene; config = p_config; Region = scene.RegionInfo.RegionName; Host = scene.RegionInfo.ExternalHostName; LocX = Convert.ToString(scene.RegionInfo.RegionLocX); LocY = Convert.ToString(scene.RegionInfo.RegionLocY); IDK = Convert.ToString(_idk_++); showAlert = config.GetBoolean("alert_show", false); string alertServerInfo = String.Empty; if (showAlert) { bool showAlertServerInfo = config.GetBoolean("alert_show_serverinfo", true); if (showAlertServerInfo) { alertServerInfo = String.Format("\nServer: {0}\nPort: {1}\nChannel: {2}\n\n", config.GetString("server", ""), config.GetString("port", ""), config.GetString("channel", "")); } string alertPreMessage = config.GetString("alert_msg_pre", "This region is linked to Irc."); string alertPostMessage = config.GetString("alert_msg_post", "Everything you say in public chat can be listened."); alertMessage = String.Format("{0}\n{1}{2}", alertPreMessage, alertServerInfo, alertPostMessage); dialogModule = scene.RequestModuleInterface <IDialogModule>(); } // OpenChannel conditionally establishes a connection to the // IRC server. The request will either succeed, or it will // throw an exception. ChannelState.OpenChannel(this, config); // Connect channel to world events scene.EventManager.OnChatFromWorld += OnSimChat; scene.EventManager.OnChatFromClient += OnSimChat; scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; m_log.InfoFormat("[IRC-Region {0}] Initialization complete", Region); }
protected void PostNotification(UUID userId, string e, bool modal) { // Put absolutely everything in news // m_controller.Feeds.Notify(userId, e); // We have to search each scene for the player since we don't track this data. foreach (Scene scene in m_controller.Scenes) { ScenePresence sp = scene.GetScenePresence(userId); if (sp != null && !sp.IsChildAgent) { IDialogModule dialogModule = scene.RequestModuleInterface <IDialogModule>(); dialogModule.SendAlertToUser(userId, e, modal); break; } } }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_dialogmod = m_scene.RequestModuleInterface<IDialogModule>(); m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat); m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat); } }
public void PostInitialise() { if (m_enabled) { //Register for modSendCommand events from inworld scripts //If we try to do this as part of Initialise() we get an UnhandledEventException. m_scriptmod = m_scene.RequestModuleInterface<IScriptModuleComms>(); m_scriptmod.OnScriptCommand += new ScriptCommand(OnModSendCommand); //Register for chat commands so we can receive orders to generate new plants m_scene.EventManager.OnChatFromClient += OnChat; m_scene.EventManager.OnChatFromWorld += OnChat; //Register for IDialogModule so we can send notices m_dialogmod = m_scene.RequestModuleInterface<IDialogModule>(); m_log.Info("[vpgManager] Post-initialized... "); } }
public void Initialise(Scene scene, IConfigSource config) { IConfig sierpinskiTreeConfig = config.Configs["SierpinskiTree"]; if (sierpinskiTreeConfig != null) { m_enabled = sierpinskiTreeConfig.GetBoolean("enabled", false); m_channel = sierpinskiTreeConfig.GetInt("chat_channel", 11); float xPos = sierpinskiTreeConfig.GetFloat("tree_x_position", 128); float yPos = sierpinskiTreeConfig.GetFloat("tree_y_position", 128); float zPos = sierpinskiTreeConfig.GetFloat("tree_z_position", 50); m_pos = new Vector3(xPos, yPos, zPos); m_xSize = sierpinskiTreeConfig.GetFloat("tree_x_size", 30); m_ySize = sierpinskiTreeConfig.GetFloat("tree_y_size", 30); m_zSize = sierpinskiTreeConfig.GetFloat("tree_z_size", 40); m_maxSteps = sierpinskiTreeConfig.GetInt("max_steps", 6); //default of 6 will allow a 15k prim pyramid } if (m_enabled) { m_log.Info("[SierpinskiTreeModule] Initializing..."); m_dialogmod = scene.RequestModuleInterface<IDialogModule>(); m_scene = scene; } }
/// <summary> /// Sets up references to modules required by the scene /// </summary> public void SetModuleInterfaces() { m_xmlrpcModule = RequestModuleInterface<IXMLRPC>(); m_worldCommModule = RequestModuleInterface<IWorldComm>(); XferManager = RequestModuleInterface<IXfer>(); m_AvatarFactory = RequestModuleInterface<IAvatarFactory>(); m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); m_interregionCommsOut = RequestModuleInterface<IInterregionCommsOut>(); m_interregionCommsIn = RequestModuleInterface<IInterregionCommsIn>(); m_dialogModule = RequestModuleInterface<IDialogModule>(); m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); m_teleportModule = RequestModuleInterface<ITeleportModule>(); }
public void RegionLoaded(Scene scene) { m_userManager = m_scene.RequestModuleInterface<IUserManagement>(); m_primCountModule = m_scene.RequestModuleInterface<IPrimCountModule>(); m_Dialog = m_scene.RequestModuleInterface<IDialogModule>(); }
/// <summary> /// Sets up references to modules required by the scene /// </summary> public void SetModuleInterfaces() { m_xmlrpcModule = RequestModuleInterface<IXMLRPC>(); m_worldCommModule = RequestModuleInterface<IWorldComm>(); XferManager = RequestModuleInterface<IXfer>(); m_AvatarFactory = RequestModuleInterface<IAvatarFactory>(); AttachmentsModule = RequestModuleInterface<IAttachmentsModule>(); m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); m_dialogModule = RequestModuleInterface<IDialogModule>(); m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); m_teleportModule = RequestModuleInterface<IEntityTransferModule>(); }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_dialogmod = scene.RequestModuleInterface<IDialogModule>(); m_scene.EventManager.OnMakeRootAgent += OnVisit; } }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_dialogmod = m_scene.RequestModuleInterface<IDialogModule>(); m_pauseTimer.Elapsed += new ElapsedEventHandler(OnPauseTimer); m_pauseTimer.Interval = 30000; m_prims = new SceneObjectGroup[m_xCells, m_yCells]; RandomizeStartMatrix(); m_pauseTimer.Start(); //Don't allow users to setup or use module til all objects have time to load from datastore } }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_dialogmod = scene.RequestModuleInterface<IDialogModule>(); m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat); m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat); m_timer.Elapsed += new ElapsedEventHandler(OnTimer); m_timer.Interval = m_cycleTime; } }
/// <summary> /// Sets up references to modules required by the scene /// </summary> public void SetModuleInterfaces() { m_xmlrpcModule = RequestModuleInterface<IXMLRPC>(); m_worldCommModule = RequestModuleInterface<IWorldComm>(); XferManager = RequestModuleInterface<IXfer>(); m_AvatarFactory = RequestModuleInterface<IAvatarFactory>(); AttachmentsModule = RequestModuleInterface<IAttachmentsModule>(); m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); m_dialogModule = RequestModuleInterface<IDialogModule>(); m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); m_teleportModule = RequestModuleInterface<IEntityTransferModule>(); // Shoving this in here for now, because we have the needed // interfaces at this point // // TODO: Find a better place for this // while (m_regInfo.EstateSettings.EstateOwner == UUID.Zero && MainConsole.Instance != null) { MainConsole.Instance.Output("The current estate " + m_regInfo.EstateSettings.EstateName + " has no owner set."); List<char> excluded = new List<char>(new char[1] { ' ' }); string first = MainConsole.Instance.CmdPrompt("Estate owner first name", "Test", excluded); string last = MainConsole.Instance.CmdPrompt("Estate owner last name", "User", excluded); UserAccount account = UserAccountService.GetUserAccount(m_regInfo.ScopeID, first, last); if (account == null) { // Create a new account account = new UserAccount(m_regInfo.ScopeID, first, last, String.Empty); if (account.ServiceURLs == null || (account.ServiceURLs != null && account.ServiceURLs.Count == 0)) { account.ServiceURLs = new Dictionary<string, object>(); account.ServiceURLs["HomeURI"] = string.Empty; account.ServiceURLs["GatekeeperURI"] = string.Empty; account.ServiceURLs["InventoryServerURI"] = string.Empty; account.ServiceURLs["AssetServerURI"] = string.Empty; } if (UserAccountService.StoreUserAccount(account)) { string password = MainConsole.Instance.PasswdPrompt("Password"); string email = MainConsole.Instance.CmdPrompt("Email", ""); account.Email = email; UserAccountService.StoreUserAccount(account); bool success = false; success = AuthenticationService.SetPassword(account.PrincipalID, password); if (!success) m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set password for account {0} {1}.", first, last); GridRegion home = null; if (GridService != null) { List<GridRegion> defaultRegions = GridService.GetDefaultRegions(UUID.Zero); if (defaultRegions != null && defaultRegions.Count >= 1) home = defaultRegions[0]; if (GridUserService != null && home != null) GridUserService.SetHome(account.PrincipalID.ToString(), home.RegionID, new Vector3(128, 128, 0), new Vector3(0, 1, 0)); else m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to set home for account {0} {1}.", first, last); } else m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to retrieve home region for account {0} {1}.", first, last); if (InventoryService != null) success = InventoryService.CreateUserInventory(account.PrincipalID); if (!success) m_log.WarnFormat("[USER ACCOUNT SERVICE]: Unable to create inventory for account {0} {1}.", first, last); m_log.InfoFormat("[USER ACCOUNT SERVICE]: Account {0} {1} created successfully", first, last); m_regInfo.EstateSettings.EstateOwner = account.PrincipalID; m_regInfo.EstateSettings.Save(); } else m_log.ErrorFormat("[SCENE]: Unable to store account. If this simulator is connected to a grid, you must create the estate owner account first."); } else { m_regInfo.EstateSettings.EstateOwner = account.PrincipalID; m_regInfo.EstateSettings.Save(); } } }
public void Initialise(Scene scene, IConfigSource source) { m_scene = scene; m_dialogModule = m_scene.RequestModuleInterface<IDialogModule>(); m_scene.RegisterModuleInterface<IGodsModule>(this); }
public void RegionLoaded(IScene scene) { m_DialogModule = m_scene.RequestModuleInterface<IDialogModule> (); m_scene.EventManager.OnStartupFullyComplete += EventManager_OnStartupFullyComplete; }
/// <summary> /// Sets up references to modules required by the scene /// </summary> public void SetModuleInterfaces() { m_xmlrpcModule = RequestModuleInterface<IXMLRPC>(); m_worldCommModule = RequestModuleInterface<IWorldComm>(); XferManager = RequestModuleInterface<IXfer>(); m_AvatarFactory = RequestModuleInterface<IAvatarFactoryModule>(); AttachmentsModule = RequestModuleInterface<IAttachmentsModule>(); m_serialiser = RequestModuleInterface<IRegionSerialiserModule>(); m_dialogModule = RequestModuleInterface<IDialogModule>(); m_capsModule = RequestModuleInterface<ICapabilitiesModule>(); EntityTransferModule = RequestModuleInterface<IEntityTransferModule>(); m_groupsModule = RequestModuleInterface<IGroupsModule>(); AgentTransactionsModule = RequestModuleInterface<IAgentAssetTransactions>(); UserManagementModule = RequestModuleInterface<IUserManagement>(); }
public void RegionLoaded(Scene scene) { if (m_enabled == false) return; m_dialogModule = scene.RequestModuleInterface<IDialogModule>(); }
// Setup runtime variable values public RegionState(Scene p_scene, IConfig p_config) { scene = p_scene; config = p_config; Region = scene.RegionInfo.RegionName; Host = scene.RegionInfo.ExternalHostName; LocX = Convert.ToString(scene.RegionInfo.RegionLocX); LocY = Convert.ToString(scene.RegionInfo.RegionLocY); IDK = Convert.ToString(_idk_++); showAlert = config.GetBoolean("alert_show", false); string alertServerInfo = String.Empty; if (showAlert) { bool showAlertServerInfo = config.GetBoolean("alert_show_serverinfo", true); if (showAlertServerInfo) alertServerInfo = String.Format("\nServer: {0}\nPort: {1}\nChannel: {2}\n\n", config.GetString("server", ""), config.GetString("port", ""), config.GetString("channel", "")); string alertPreMessage = config.GetString("alert_msg_pre", "This region is linked to Irc."); string alertPostMessage = config.GetString("alert_msg_post", "Everything you say in public chat can be listened."); alertMessage = String.Format("{0}\n{1}{2}", alertPreMessage, alertServerInfo, alertPostMessage); dialogModule = scene.RequestModuleInterface<IDialogModule>(); } // OpenChannel conditionally establishes a connection to the // IRC server. The request will either succeed, or it will // throw an exception. ChannelState.OpenChannel(this, config); // Connect channel to world events scene.EventManager.OnChatFromWorld += OnSimChat; scene.EventManager.OnChatFromClient += OnSimChat; scene.EventManager.OnMakeRootAgent += OnMakeRootAgent; scene.EventManager.OnMakeChildAgent += OnMakeChildAgent; m_log.InfoFormat("[IRC-Region {0}] Initialization complete", Region); }
public void PostInitialise() { if (m_enabled) { m_dialogmod = m_scene.RequestModuleInterface<IDialogModule>(); m_scene.EventManager.OnChatFromWorld += new EventManager.ChatFromWorldEvent(OnChat); m_scene.EventManager.OnChatFromClient += new EventManager.ChatFromClientEvent(OnChat); //Start the timer m_timer.Elapsed += new ElapsedEventHandler(OnTimer); m_timer.Interval = m_cycleTime; } }
public void RegionLoaded(Scene scene) { m_DialogModule = m_scene.RequestModuleInterface<IDialogModule>(); }
public void AddRegion(Scene scene) { if (m_enabled) { m_scene = scene; m_chatLog = System.IO.Path.Combine(m_logPath, m_instanceTag + "-chat.log"); m_scene.EventManager.OnChatFromClient += OnClientChat; //Avatar chat m_scene.EventManager.OnChatFromWorld += OnWorldChat; //Object chat m_scene.EventManager.OnChatBroadcast += OnBroadcast; //Module chat (e.g., the IRCBridge Module) m_scene.EventManager.OnMakeRootAgent += OnVisit; //Avatars entering region m_dialogMod = m_scene.RequestModuleInterface<IDialogModule>(); } }