From 019d6626068920283b700440e780c86c162ca7c6 Mon Sep 17 00:00:00 2001 From: Justin Clarke Casey Date: Sat, 15 Dec 2007 21:58:07 +0000 Subject: Put out a more comprehensible message when user authentication fails than the current NullReferenceException based one --- OpenSim/Region/Communications/Local/LocalLoginService.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/Communications/Local') diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs index 103c76f..37cea1f 100644 --- a/OpenSim/Region/Communications/Local/LocalLoginService.cs +++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs @@ -31,6 +31,7 @@ using System.Collections; using System.Collections.Generic; using libsecondlife; using OpenSim.Framework; +using OpenSim.Framework.Console; using OpenSim.Framework.UserManagement; using InventoryFolder=OpenSim.Framework.InventoryFolder; @@ -72,7 +73,8 @@ namespace OpenSim.Region.Communications.Local if (!authUsers) { //no current user account so make one - Console.WriteLine("No User account found so creating a new one "); + MainLog.Instance.Notice("LOGIN", "No user account found so creating a new one."); + m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); profile = m_userManager.GetUserProfile(firstname, lastname); @@ -91,12 +93,14 @@ namespace OpenSim.Region.Communications.Local if (!authUsers) { //for now we will accept any password in sandbox mode - Console.WriteLine("authorising user"); + MainLog.Instance.Notice("LOGIN", "Authorising user (no actual password check)"); + return true; } else { - Console.WriteLine("Authenticating " + profile.username + " " + profile.surname); + MainLog.Instance.Notice( + "LOGIN", "Authenticating " + profile.username + " " + profile.surname); password = password.Remove(0, 3); //remove $1$ @@ -153,7 +157,7 @@ namespace OpenSim.Region.Communications.Local } else { - Console.WriteLine("not found region " + currentRegion); + MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion); } } -- cgit v1.1