max-agent-groups support

Robust now tells viewers what the maximum number of groups is. Viewers show this limit to the users, and enforce it.

The default is 42, which is what viewers had assumed was the maximum number before this update.

Signed-off-by: Oren Hurvitz <orenh@kitely.com>
0.8.2-post-fixes
Cinder 2015-08-06 17:32:58 -06:00 committed by Oren Hurvitz
parent 5a1279af8a
commit f218cbd29d
4 changed files with 27 additions and 2 deletions

View File

@ -191,6 +191,7 @@ namespace OpenSim.Services.LLLoginService
private string currency; private string currency;
private string classifiedFee; private string classifiedFee;
private int maxAgentGroups;
static LLLoginResponse() static LLLoginResponse()
{ {
@ -228,7 +229,7 @@ namespace OpenSim.Services.LLLoginService
GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService, GridRegion destination, List<InventoryFolderBase> invSkel, FriendInfo[] friendsList, ILibraryService libService,
string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message, string where, string startlocation, Vector3 position, Vector3 lookAt, List<InventoryItemBase> gestures, string message,
GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency, 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() : this()
{ {
FillOutInventoryData(invSkel, libService); FillOutInventoryData(invSkel, libService);
@ -253,6 +254,7 @@ namespace OpenSim.Services.LLLoginService
SearchURL = searchURL; SearchURL = searchURL;
Currency = currency; Currency = currency;
ClassifiedFee = classifiedFee; ClassifiedFee = classifiedFee;
MaxAgentGroups = maxAgentGroups;
FillOutHomeData(pinfo, home); FillOutHomeData(pinfo, home);
LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); 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; currency = String.Empty;
ClassifiedFee = "0"; ClassifiedFee = "0";
MaxAgentGroups = 42;
} }
@ -542,6 +545,7 @@ namespace OpenSim.Services.LLLoginService
responseData["seed_capability"] = seedCapability; responseData["seed_capability"] = seedCapability;
responseData["home"] = home; responseData["home"] = home;
responseData["look_at"] = lookAt; responseData["look_at"] = lookAt;
responseData["max-agent-groups"] = MaxAgentGroups;
responseData["message"] = welcomeMessage; responseData["message"] = welcomeMessage;
responseData["region_x"] = (Int32)(RegionX); responseData["region_x"] = (Int32)(RegionX);
responseData["region_y"] = (Int32)(RegionY); responseData["region_y"] = (Int32)(RegionY);
@ -669,6 +673,7 @@ namespace OpenSim.Services.LLLoginService
map["seed_capability"] = OSD.FromString(seedCapability); map["seed_capability"] = OSD.FromString(seedCapability);
map["home"] = OSD.FromString(home); map["home"] = OSD.FromString(home);
map["look_at"] = OSD.FromString(lookAt); map["look_at"] = OSD.FromString(lookAt);
map["max-agent-groups"] = OSD.FromInteger(MaxAgentGroups);
map["message"] = OSD.FromString(welcomeMessage); map["message"] = OSD.FromString(welcomeMessage);
map["region_x"] = OSD.FromInteger(RegionX); map["region_x"] = OSD.FromInteger(RegionX);
map["region_y"] = OSD.FromInteger(RegionY); map["region_y"] = OSD.FromInteger(RegionY);
@ -1102,6 +1107,12 @@ namespace OpenSim.Services.LLLoginService
set { classifiedFee = value; } set { classifiedFee = value; }
} }
public int MaxAgentGroups
{
get { return maxAgentGroups; }
set { maxAgentGroups = value; }
}
public string DestinationsURL public string DestinationsURL
{ {
get; set; get; set;

View File

@ -80,6 +80,7 @@ namespace OpenSim.Services.LLLoginService
protected string m_SearchURL; protected string m_SearchURL;
protected string m_Currency; protected string m_Currency;
protected string m_ClassifiedFee; protected string m_ClassifiedFee;
protected int m_MaxAgentGroups;
protected string m_DestinationGuide; protected string m_DestinationGuide;
protected string m_AvatarPicker; protected string m_AvatarPicker;
protected string m_AllowedClients; protected string m_AllowedClients;
@ -127,6 +128,11 @@ namespace OpenSim.Services.LLLoginService
m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty); m_MessageUrl = m_LoginServerConfig.GetString("MessageUrl", string.Empty);
m_DSTZone = m_LoginServerConfig.GetString("DSTZone", "America/Los_Angeles;Pacific Standard Time"); 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 // Clean up some of these vars
if (m_MapTileURL != String.Empty) if (m_MapTileURL != String.Empty)
{ {
@ -506,7 +512,7 @@ namespace OpenSim.Services.LLLoginService
account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService,
where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP, where, startLocation, position, lookAt, gestures, processedMessage, home, clientIP,
m_MapTileURL, m_SearchURL, m_Currency, m_DSTZone, 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); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName);

View File

@ -758,6 +758,9 @@
;; Can overwrite the default in [Hypergrid], but probably shouldn't ;; Can overwrite the default in [Hypergrid], but probably shouldn't
; HomeURI = "${Const|BaseURL}:${Const|PublicPort}" ; HomeURI = "${Const|BaseURL}:${Const|PublicPort}"
;; Sets the maximum number of groups an agent may join
; MaxAgentGroups = 42
[UserProfilesService] [UserProfilesService]
LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService" LocalServiceModule = "OpenSim.Services.UserProfilesService.dll:UserProfilesService"

View File

@ -507,6 +507,11 @@
OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService" OfflineIMService = "OpenSim.Addons.OfflineIM.dll:OfflineIMService"
[Groups]
;; Sets the maximum number of groups an agent may join
; MaxAgentGroups = 42
[GridInfoService] [GridInfoService]
; These settings are used to return information on a get_grid_info call. ; 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 ; Client launcher scripts and third-party clients make use of this to