[Opensim-users] Change console prompt

Gudule Lapointe gudule at spekuloos.be
Thu Nov 10 01:38:54 UTC 2011


I submitted a patch 2 weeks ago for this mod, but I didn't get any reaction. Am I the only one running several simulators? ;-)
	
	http://opensimulator.org/mantis/view.php?id=5760



Le 28 oct. 2011 à 18:11, Gudule Lapointe a écrit :

> OK, it didn't work the way you said (things "not defined in this context") and after tweaking a bit, it kinda worked, but didn't fetch the values with configSource.Configs
> 
> But I think I get it now. Here is what I have done:
> 	added  
> 		protected string m_custom_prompt;
> 	in public class OpenSim
> 	and 
> 		m_custom_prompt = startupConfig.GetString("custom_prompt", "Region");
> 	after startupConfig (under "if(startupConfig != NULL)
> 	and then
> 		m_console.DefaultPrompt = String.Format("{0} ({1}) ", m_custom_prompt, regionName);
> 	at the original place
> 
> Now, I can set up the custom_prompt value in OpenSim.ini or GridCommon.ini, and if it is not set, it defaults to the current "Region" prompt.
> 
> In short, I patched OpenSim/Region/Application/OpenSim.cs this way:
> 58a59
>> 	protected string m_custom_prompt;
> 110a112
>> 		m_custom_prompt = startupConfig.GetString("custom_prompt", "Region");
> 831d832
> < 
> 834c835
> <             m_console.DefaultPrompt = String.Format("Region ({0}) ", regionName);
> ---
>> 	    m_console.DefaultPrompt = String.Format("{0} ({1}) ", m_custom_prompt, regionName);
> 
> 
> 
> 
> Le 28 oct. 2011 à 16:49, Garmin Kawaguichi a écrit :
> 
>>> ----- Original Message ----- From: "Gudule Lapointe" <gudule at spekuloos.be>
>>> Sent: Friday, October 28, 2011 4:32 PM
>>> Subject: Re: [Opensim-users] Change console prompt
>>> In
>>> string m_custom_prompt = configSource.Configs["Startup"].GetString("custom_prompt", String.Empty);
>>> does "String.Empty" defines the value to use if custom_prompt is not set?
>>> In this case, I guess we should use "Region" (the current value) instead?
>> 
>> Yes, it seems to be the "default value"
>> 
>> There is an example of string used as default in OpenSim.cs line 569
>> and an example without default value in LoadImageURLModule.cs lines 109-110
>> 
>> GCI
>> _______________________________________________
>> Opensim-users mailing list
>> Opensim-users at lists.berlios.de
>> https://lists.berlios.de/mailman/listinfo/opensim-users
> 
> _______________________________________________
> Opensim-users mailing list
> Opensim-users at lists.berlios.de
> https://lists.berlios.de/mailman/listinfo/opensim-users
> 




More information about the Opensim-users mailing list