aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorGuduleLapointe2011-10-28 23:58:14 +0200
committerBlueWall2011-11-10 06:56:32 -0500
commit37583063eebb021784ce3b7d5aec75608c0cc27a (patch)
treedfd3f8166df8640298f19dbcdfc753dcee4d6ab0
parentminor: Correct misleading method doc on SOG.UpdateRootRotation() (diff)
downloadopensim-SC_OLD-37583063eebb021784ce3b7d5aec75608c0cc27a.zip
opensim-SC_OLD-37583063eebb021784ce3b7d5aec75608c0cc27a.tar.gz
opensim-SC_OLD-37583063eebb021784ce3b7d5aec75608c0cc27a.tar.bz2
opensim-SC_OLD-37583063eebb021784ce3b7d5aec75608c0cc27a.tar.xz
Allow custom setting for the console prompt
Signed-off-by: BlueWall <jamesh@bluewallgroup.com>
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Application/OpenSim.cs5
-rwxr-xr-xbin/OpenSim.ini.example5
2 files changed, 8 insertions, 2 deletions
diff --git a/OpenSim/Region/Application/OpenSim.cs b/OpenSim/Region/Application/OpenSim.cs
index 60c130f..52b19ea 100644
--- a/OpenSim/Region/Application/OpenSim.cs
+++ b/OpenSim/Region/Application/OpenSim.cs
@@ -56,6 +56,7 @@ namespace OpenSim
56 protected bool m_gui = false; 56 protected bool m_gui = false;
57 protected string m_consoleType = "local"; 57 protected string m_consoleType = "local";
58 protected uint m_consolePort = 0; 58 protected uint m_consolePort = 0;
59 protected string m_custom_prompt;
59 60
60 private string m_timedScript = "disabled"; 61 private string m_timedScript = "disabled";
61 private Timer m_scriptTimer; 62 private Timer m_scriptTimer;
@@ -108,6 +109,7 @@ namespace OpenSim
108 Util.FireAndForgetMethod = asyncCallMethod; 109 Util.FireAndForgetMethod = asyncCallMethod;
109 110
110 stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15); 111 stpMaxThreads = startupConfig.GetInt("MaxPoolThreads", 15);
112 m_custom_prompt = startupConfig.GetString("custom_prompt", "Region");
111 } 113 }
112 114
113 if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool) 115 if (Util.FireAndForgetMethod == FireAndForgetMethod.SmartThreadPool)
@@ -828,10 +830,9 @@ namespace OpenSim
828 { 830 {
829 MainConsole.Instance.Output("Usage: change region <region name>"); 831 MainConsole.Instance.Output("Usage: change region <region name>");
830 } 832 }
831
832 string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName); 833 string regionName = (m_sceneManager.CurrentScene == null ? "root" : m_sceneManager.CurrentScene.RegionInfo.RegionName);
833 MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName)); 834 MainConsole.Instance.Output(String.Format("Currently selected region is {0}", regionName));
834 m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName); 835 m_console.DefaultPrompt = String.Format("{0} ({1}) ", m_custom_prompt, regionName);
835 m_console.ConsoleScene = m_sceneManager.CurrentScene; 836 m_console.ConsoleScene = m_sceneManager.CurrentScene;
836 } 837 }
837 838
diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example
index e71fb05..c5205db 100755
--- a/bin/OpenSim.ini.example
+++ b/bin/OpenSim.ini.example
@@ -230,6 +230,11 @@
230 ;; by scripts have changed. 230 ;; by scripts have changed.
231 ; DeleteScriptsOnStartup = true 231 ; DeleteScriptsOnStartup = true
232 232
233 ;; Custom prompt
234 ;; This value replaces the word "Region" in console prompt
235 ;; (usualy "Region (regionName) # "
236 ;; Useful only if you have to monitor serveral servers
237 ; custom_prompt = "MyServer1"
233 238
234[SMTP] 239[SMTP]
235 ;; The SMTP server enabled the email module to send email to external 240 ;; The SMTP server enabled the email module to send email to external