From f5c82186c159149d7e4ef5570a93e3fc399e0761 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Fri, 5 Sep 2008 16:54:31 +0000 Subject: [PATCH] * 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 --- .../Modules/InterGrid/OpenGridProtocolModule.cs | 7 +++++++ bin/OpenSim.ini.example | 4 ++++ 2 files changed, 11 insertions(+) diff --git a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs index dbe045abdd..8fad62f8e2 100644 --- a/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/Environment/Modules/InterGrid/OpenGridProtocolModule.cs @@ -90,6 +90,8 @@ namespace OpenSim.Region.Environment.Modules.InterGrid private Dictionary CapsLoginID = new Dictionary(); private Dictionary m_OGPState = new Dictionary(); + 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(); diff --git a/bin/OpenSim.ini.example b/bin/OpenSim.ini.example index 20a2339033..5005741030 100644 --- a/bin/OpenSim.ini.example +++ b/bin/OpenSim.ini.example @@ -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"