Hi Gudule. I intended to look at this patch last Friday but got swamped by other things. I hope to take a look
tomorrow (Friday).
Justin
On 10/11/11 01:38, Gudule Lapointe wrote:
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"<[email protected]>
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
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users
--
Justin Clark-Casey (justincc)
http://justincc.org/blog
http://twitter.com/justincc
_______________________________________________
Opensim-users mailing list
[email protected]
https://lists.berlios.de/mailman/listinfo/opensim-users