From 79045abe685efef2c497b6cae97601689186153f Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Mon, 24 Sep 2007 01:16:21 +0000 Subject: * Renamed stuff on UserManagerBase to get implicit implementation of IUserServices (instead of stubs) --- .../Communications/Local/CommunicationsLocal.cs | 2 +- .../Communications/Local/LocalLoginService.cs | 4 ++-- .../Communications/Local/LocalUserServices.cs | 28 ++++++---------------- 3 files changed, 10 insertions(+), 24 deletions(-) (limited to 'OpenSim/Region/Communications/Local') diff --git a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs index e326a1e..0105b9d 100644 --- a/OpenSim/Region/Communications/Local/CommunicationsLocal.cs +++ b/OpenSim/Region/Communications/Local/CommunicationsLocal.cs @@ -45,7 +45,7 @@ namespace OpenSim.Region.Communications.Local public LocalLoginService LoginServices; public LocalInventoryService InvenServices; // public CAPSService CapsServices; - private LocalSettings m_settings; + private readonly LocalSettings m_settings; public CommunicationsLocal(NetworkServersInfo serversInfo, BaseHttpServer httpServer, AssetCache assetCache, LocalSettings settings) : base(serversInfo, httpServer, assetCache) diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 3c43d29..9c15742 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -33,7 +33,7 @@ namespace OpenSim.Region.Communications.Local public override UserProfileData GetTheUser(string firstname, string lastname) { - UserProfileData profile = this.m_userManager.getUserProfile(firstname, lastname); + UserProfileData profile = this.m_userManager.GetUserProfile(firstname, lastname); if (profile != null) { @@ -46,7 +46,7 @@ namespace OpenSim.Region.Communications.Local Console.WriteLine("No User account found so creating a new one "); this.m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); - profile = this.m_userManager.getUserProfile(firstname, lastname); + profile = this.m_userManager.GetUserProfile(firstname, lastname); if (profile != null) { m_Parent.InvenServices.CreateNewUserInventory(profile.UUID); diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs index 1a409bf..02b6e60 100644 --- a/OpenSim/Region/Communications/Local/LocalUserServices.cs +++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs @@ -10,36 +10,22 @@ namespace OpenSim.Region.Communications.Local { public class LocalUserServices : UserManagerBase, IUserServices { - private CommunicationsLocal m_Parent; + private readonly CommunicationsLocal m_Parent; - private NetworkServersInfo serversInfo; - private uint defaultHomeX ; - private uint defaultHomeY; + private readonly NetworkServersInfo serversInfo; + private readonly uint defaultHomeX ; + private readonly uint defaultHomeY; public LocalUserServices(CommunicationsLocal parent, NetworkServersInfo serversInfo) { m_Parent = parent; this.serversInfo = serversInfo; + defaultHomeX = this.serversInfo.DefaultHomeLocX; defaultHomeY = this.serversInfo.DefaultHomeLocY; } - public UserProfileData GetUserProfile(string firstName, string lastName) - { - return GetUserProfile(firstName + " " + lastName); - } - - public UserProfileData GetUserProfile(string name) - { - return this.getUserProfile(name); - } - - public UserProfileData GetUserProfile(LLUUID avatarID) - { - return this.getUserProfile(avatarID); - } - public UserProfileData SetupMasterUser(string firstName, string lastName) { return SetupMasterUser(firstName, lastName, ""); @@ -47,7 +33,7 @@ namespace OpenSim.Region.Communications.Local public UserProfileData SetupMasterUser(string firstName, string lastName, string password) { - UserProfileData profile = getUserProfile(firstName, lastName); + UserProfileData profile = base.GetUserProfile(firstName, lastName); if (profile != null) { @@ -57,7 +43,7 @@ namespace OpenSim.Region.Communications.Local Console.WriteLine("Unknown Master User. Sandbox Mode: Creating Account"); this.AddUserProfile(firstName, lastName, password, defaultHomeX, defaultHomeY); - profile = getUserProfile(firstName, lastName); + profile = base.GetUserProfile(firstName, lastName); if (profile == null) { -- cgit v1.1