* Adds configurable OGP Name prefix and suffix. See OpenSim.ini.example at the bottom for details. Defaults to an empty string for prefix and '_EXTERNAL' for suffix

0.6.0-stable
Teravus Ovares 2008-09-05 16:54:31 +00:00
parent 0fc618e7b2
commit f5c82186c1
2 changed files with 11 additions and 0 deletions

View File

@ -90,6 +90,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
private Dictionary<string, AgentCircuitData> CapsLoginID = new Dictionary<string, AgentCircuitData>();
private Dictionary<LLUUID, OGPState> m_OGPState = new Dictionary<LLUUID, OGPState>();
private string LastNameSuffix = "_EXTERNAL";
private string FirstNamePrefix = "";
#region IRegionModule Members
@ -107,6 +109,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
if (cfg != null)
{
enabled = cfg.GetBoolean("ogp_enabled", false);
LastNameSuffix = cfg.GetString("ogp_lastname_suffix", "_EXTERNAL");
FirstNamePrefix = cfg.GetString("ogp_firstname_prefix", "");
if (enabled)
{
m_log.Warn("[OGP]: Open Grid Protocol is on, Listening for Clients on /agent/");
@ -235,6 +239,9 @@ namespace OpenSim.Region.Environment.Modules.InterGrid
string FirstName = requestMap["first_name"].AsString();
string LastName = requestMap["last_name"].AsString();
FirstName = FirstNamePrefix + FirstName;
LastName = LastName + LastNameSuffix;
OGPState userState = GetOGPState(LocalAgentID);
userState.first_name = requestMap["first_name"].AsString();

View File

@ -715,3 +715,7 @@ password = http://127.0.0.1/password
[OpenGridProtocol]
;On/true or Off/false
ogp_enabled=false
;Name Prefix/suffix when using OGP
ogp_firstname_prefix=""
ogp_lastname_suffix="_EXTERNAL"