diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 27376cc69d..fdf89bee75 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -191,6 +191,7 @@ namespace OpenSim.Services.LLLoginService private string currency; private string classifiedFee; + private int maxAgentGroups; static LLLoginResponse() { @@ -228,7 +229,7 @@ namespace OpenSim.Services.LLLoginService GridRegion destination, List invSkel, FriendInfo[] friendsList, ILibraryService libService, string where, string startlocation, Vector3 position, Vector3 lookAt, List gestures, string message, GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, - string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee) + string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee, int maxAgentGroups) : this() { FillOutInventoryData(invSkel, libService); @@ -253,6 +254,7 @@ namespace OpenSim.Services.LLLoginService SearchURL = searchURL; Currency = currency; ClassifiedFee = classifiedFee; + MaxAgentGroups = maxAgentGroups; FillOutHomeData(pinfo, home); LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); @@ -483,6 +485,7 @@ namespace OpenSim.Services.LLLoginService currency = String.Empty; ClassifiedFee = "0"; + MaxAgentGroups = 42; } @@ -542,6 +545,7 @@ namespace OpenSim.Services.LLLoginService responseData["seed_capability"] = seedCapability; responseData["home"] = home; responseData["look_at"] = lookAt; + responseData["max-agent-groups"] = MaxAgentGroups; responseData["message"] = welcomeMessage; responseData["region_x"] = (Int32)(RegionX); responseData["region_y"] = (Int32)(RegionY); @@ -669,6 +673,7 @@ namespace OpenSim.Services.LLLoginService map["seed_capability"] = OSD.FromString(seedCapability); map["home"] = OSD.FromString(home); map["look_at"] = OSD.FromString(lookAt); + map["max-agent-groups"] = OSD.FromInteger(MaxAgentGroups); map["message"] = OSD.FromString(welcomeMessage); map["region_x"] = OSD.FromInteger(RegionX); map["region_y"] = OSD.FromInteger(RegionY); @@ -1102,6 +1107,12 @@ namespace OpenSim.Services.LLLoginService set { classifiedFee = value; } } + public int MaxAgentGroups + { + get { return maxAgentGroups; } + set { maxAgentGroups = value; } + } + public string DestinationsURL { get; set; diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 96f2621981..65030a41a3 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -80,6 +80,7 @@ namespace OpenSim.Services.LLLoginService protected string m_SearchURL; protected string m_Currency; protected string m_ClassifiedFee; + protected int m_MaxAgentGroups; protected string m_DestinationGuide; protected string m_AvatarPicker; protected string m_AllowedClients; @@ -127,6 +128,11 @@ namespace OpenSim.Services.LLLoginService m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty); m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time"); + IConfig groupConfig = config.Configs["Groups"]; + if (groupConfig != null) + m_MaxAgentGroups = groupConfig.GetInt("MaxAgentGroups", 42); + + // Clean up some of these vars if (m_MapTileURL != String.Empty) { @@ -506,7 +512,7 @@ namespace OpenSim.Services.LLLoginService account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, - m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee); + m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee, m_MaxAgentGroups); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index 2a05a56549..36025d5fba 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -758,6 +758,9 @@ ;; Can overwrite the default in [Hypergrid], but probably shouldn't ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" + ;; Sets the maximum number of groups an agent may join + ; MaxAgentGroups = 42 + [UserProfilesService] LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService" diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index f61b213d3f..284e9699e1 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -507,6 +507,11 @@ OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService" +[Groups] + ;; Sets the maximum number of groups an agent may join + ; MaxAgentGroups = 42 + + [GridInfoService] ; These settings are used to return information on a get_grid_info call. ; Client launcher scripts and third-party clients make use of this to