From 70ea62544716134447884e999898267497b85a12 Mon Sep 17 00:00:00 2001 From: Snoopy Pfeffer Date: Sun, 14 Aug 2011 18:20:20 +0200 Subject: [PATCH] Added optional Login Service parameter "Currency" to be able to change the currency name shown in the viewer. --- .../LLLoginService/LLLoginResponse.cs | 19 ++++++++++++++++++- .../Services/LLLoginService/LLLoginService.cs | 4 +++- bin/Robust.HG.ini.example | 2 ++ bin/Robust.ini.example | 2 ++ .../StandaloneCommon.ini.example | 2 ++ 5 files changed, 27 insertions(+), 2 deletions(-) diff --git a/OpenSim/Services/LLLoginService/LLLoginResponse.cs b/OpenSim/Services/LLLoginService/LLLoginResponse.cs index f68c078c39..1a874c8ea5 100644 --- a/OpenSim/Services/LLLoginService/LLLoginResponse.cs +++ b/OpenSim/Services/LLLoginService/LLLoginResponse.cs @@ -183,6 +183,8 @@ namespace OpenSim.Services.LLLoginService private BuddyList m_buddyList = null; + private string currency; + static LLLoginResponse() { // This is being set, but it's not used @@ -218,7 +220,7 @@ namespace OpenSim.Services.LLLoginService public LLLoginResponse(UserAccount account, AgentCircuitData aCircuit, GridUserInfo pinfo, 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) + GridRegion home, IPEndPoint clientIP, string mapTileURL, string searchURL, string currency) : this() { FillOutInventoryData(invSkel, libService); @@ -236,6 +238,7 @@ namespace OpenSim.Services.LLLoginService StartLocation = where; MapTileURL = mapTileURL; SearchURL = searchURL; + Currency = currency; FillOutHomeData(pinfo, home); LookAt = String.Format("[r{0},r{1},r{2}]", lookAt.X, lookAt.Y, lookAt.Z); @@ -382,6 +385,8 @@ namespace OpenSim.Services.LLLoginService initialOutfit.Add(InitialOutfitHash); mapTileURL = String.Empty; searchURL = String.Empty; + + currency = String.Empty; } @@ -456,6 +461,12 @@ namespace OpenSim.Services.LLLoginService responseData["buddy-list"] = m_buddyList.ToArray(); } + if (currency != String.Empty) + { + // responseData["real_currency"] = currency; + responseData["currency"] = currency; + } + responseData["login"] = "true"; return responseData; @@ -940,6 +951,12 @@ namespace OpenSim.Services.LLLoginService set { m_buddyList = value; } } + public string Currency + { + get { return currency; } + set { currency = value; } + } + #endregion public class UserInfo diff --git a/OpenSim/Services/LLLoginService/LLLoginService.cs b/OpenSim/Services/LLLoginService/LLLoginService.cs index 00405a118a..4ccc7ff148 100644 --- a/OpenSim/Services/LLLoginService/LLLoginService.cs +++ b/OpenSim/Services/LLLoginService/LLLoginService.cs @@ -75,6 +75,7 @@ namespace OpenSim.Services.LLLoginService protected bool m_AllowRemoteSetLoginLevel; protected string m_MapTileURL; protected string m_SearchURL; + protected string m_Currency; protected string m_AllowedClients; protected string m_DeniedClients; @@ -108,6 +109,7 @@ namespace OpenSim.Services.LLLoginService m_GatekeeperURL = m_LoginServerConfig.GetString("GatekeeperURI", string.Empty); m_MapTileURL = m_LoginServerConfig.GetString("MapTileURL", string.Empty); m_SearchURL = m_LoginServerConfig.GetString("SearchURL", string.Empty); + m_Currency = m_LoginServerConfig.GetString("Currency", string.Empty); m_AllowedClients = m_LoginServerConfig.GetString("AllowedClients", string.Empty); m_DeniedClients = m_LoginServerConfig.GetString("DeniedClients", string.Empty); @@ -408,7 +410,7 @@ namespace OpenSim.Services.LLLoginService // Finally, fill out the response and return it // LLLoginResponse response = new LLLoginResponse(account, aCircuit, guinfo, destination, inventorySkel, friendsList, m_LibraryService, - where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_SearchURL); + where, startLocation, position, lookAt, gestures, m_WelcomeMessage, home, clientIP, m_MapTileURL, m_SearchURL, m_Currency); m_log.DebugFormat("[LLOGIN SERVICE]: All clear. Sending login response to client."); return response; diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example index ea271b864a..b760abde52 100644 --- a/bin/Robust.HG.ini.example +++ b/bin/Robust.HG.ini.example @@ -203,6 +203,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 UserAgentService = "OpenSim.Services.HypergridService.dll:UserAgentService" FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" + ;Currency = "" + WelcomeMessage = "Welcome, Avatar!" AllowRemoteSetLoginLevel = "false" diff --git a/bin/Robust.ini.example b/bin/Robust.ini.example index 14f79aac14..a36d255c94 100644 --- a/bin/Robust.ini.example +++ b/bin/Robust.ini.example @@ -188,6 +188,8 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003 LibraryService = "OpenSim.Services.InventoryService.dll:LibraryService" FriendsService = "OpenSim.Services.FriendsService.dll:FriendsService" + ;Currency = "" + WelcomeMessage = "Welcome, Avatar!" AllowRemoteSetLoginLevel = "false" diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example index ee0523f91a..babd1160c0 100644 --- a/bin/config-include/StandaloneCommon.ini.example +++ b/bin/config-include/StandaloneCommon.ini.example @@ -99,6 +99,8 @@ ;; For Viewer 2 MapTileURL = "http://127.0.0.1:9000/" + ;Currency = "" + ;; Regular expressions for controlling which client versions are accepted/denied. ;; An empty string means nothing is checked. ;;