From b2c8d5eec7cc5c6b4685d22921a6e684ce7714b1 Mon Sep 17 00:00:00 2001 From: BlueWall Date: Thu, 13 Jun 2013 09:18:27 -0400 Subject: Add Option: ClassifiedFee Add option to set minimum fee for publishing classifieds. Many viewers have a hard coded minimum of 50, which makes publishing classifieds fail where grids have no economy. This allows the grid to set the minimum fee to a suitable value for their operation. The option is located in the [LoginService] section and defaults to 0. The value is sent as "classified_fee" in the login response. --- OpenSim/Services/LLLoginService/LLLoginResponse.cs | 18 +++++++++++++++++- OpenSim/Services/LLLoginService/LLLoginService.cs | 4 +++- 2 files changed, 20 insertions(+), 2 deletions(-) (limited to 'OpenSim') diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index 400f303..6ab5258 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -190,6 +190,7 @@ namespace OpenSim.Services.LLLoginService private BuddyList m_buddyList = null; private string currency; + private string classifiedFee; static LLLoginResponse() { @@ -227,7 +228,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 profileURL, string openIDURL, string searchURL, string currency, - string DSTZone, string destinationsURL, string avatarsURL) + string DSTZone, string destinationsURL, string avatarsURL, string classifiedFee) : this() { FillOutInventoryData(invSkel, libService); @@ -251,6 +252,8 @@ namespace OpenSim.Services.LLLoginService SearchURL = searchURL; Currency = currency; + ClassifiedFee = classifiedFee; + FillOutHomeData(pinfo, home); LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); @@ -463,6 +466,7 @@ namespace OpenSim.Services.LLLoginService searchURL = String.Empty; currency = String.Empty; + ClassifiedFee = "0"; } @@ -555,6 +559,9 @@ namespace OpenSim.Services.LLLoginService // responseData["real_currency"] = currency; responseData["currency"] = currency; } + + if (ClassifiedFee != String.Empty) + responseData["classified_fee"] = ClassifiedFee; responseData["login"] = "true"; @@ -659,6 +666,9 @@ namespace OpenSim.Services.LLLoginService if (searchURL != String.Empty) map["search"] = OSD.FromString(searchURL); + if (ClassifiedFee != String.Empty) + map["classified_fee"] = OSD.FromString(ClassifiedFee); + if (m_buddyList != null) { map["buddy-list"] = ArrayListToOSDArray(m_buddyList.ToArray()); @@ -1064,6 +1074,12 @@ namespace OpenSim.Services.LLLoginService set { currency = value; } } + public string ClassifiedFee + { + get { return classifiedFee; } + set { classifiedFee = value; } + } + public string DestinationsURL { get; set; diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index abda98f..10cf90f 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -78,6 +78,7 @@ namespace OpenSim.Services.LLLoginService protected string m_OpenIDURL; protected string m_SearchURL; protected string m_Currency; + protected string m_ClassifiedFee; protected string m_DestinationGuide; protected string m_AvatarPicker; @@ -119,6 +120,7 @@ namespace OpenSim.Services.LLLoginService m_OpenIDURL = m_LoginServerConfig.GetString("OpenIDServerURL", String.Empty); m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty); + m_ClassifiedFee = m_LoginServerConfig.GetString("ClassifiedFee", string.Empty); m_DestinationGuide = m_LoginServerConfig.GetString ("DestinationGuide", string.Empty); m_AvatarPicker = m_LoginServerConfig.GetString ("AvatarPicker", string.Empty); @@ -458,7 +460,7 @@ namespace OpenSim.Services.LLLoginService account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_ProfileURL, m_OpenIDURL, m_SearchURL, m_Currency, m_DSTZone, - m_DestinationGuide, m_AvatarPicker); + m_DestinationGuide, m_AvatarPicker, m_ClassifiedFee); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to {0} {1}", firstName, lastName); -- cgit v1.1