diff options
author | Justin Clarke Casey | 2007-12-15 21:58:07 +0000 |
---|---|---|
committer | Justin Clarke Casey | 2007-12-15 21:58:07 +0000 |
commit | 019d6626068920283b700440e780c86c162ca7c6 (patch) | |
tree | 7c0a9ec1ca185257cee0463a73feef882be23878 /OpenSim/Region/Communications/Local/LocalLoginService.cs | |
parent | more dorking around with exporter. Still far (diff) | |
download | opensim-SC-019d6626068920283b700440e780c86c162ca7c6.zip opensim-SC-019d6626068920283b700440e780c86c162ca7c6.tar.gz opensim-SC-019d6626068920283b700440e780c86c162ca7c6.tar.bz2 opensim-SC-019d6626068920283b700440e780c86c162ca7c6.tar.xz |
Put out a more comprehensible message when user authentication fails than the current NullReferenceException based one
Diffstat (limited to 'OpenSim/Region/Communications/Local/LocalLoginService.cs')
-rw-r--r-- | OpenSim/Region/Communications/Local/LocalLoginService.cs | 12 |
1 files changed, 8 insertions, 4 deletions
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; | |||
31 | using System.Collections.Generic; | 31 | using System.Collections.Generic; |
32 | using libsecondlife; | 32 | using libsecondlife; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
34 | using OpenSim.Framework.Console; | ||
34 | using OpenSim.Framework.UserManagement; | 35 | using OpenSim.Framework.UserManagement; |
35 | using InventoryFolder=OpenSim.Framework.InventoryFolder; | 36 | using InventoryFolder=OpenSim.Framework.InventoryFolder; |
36 | 37 | ||
@@ -72,7 +73,8 @@ namespace OpenSim.Region.Communications.Local | |||
72 | if (!authUsers) | 73 | if (!authUsers) |
73 | { | 74 | { |
74 | //no current user account so make one | 75 | //no current user account so make one |
75 | Console.WriteLine("No User account found so creating a new one "); | 76 | MainLog.Instance.Notice("LOGIN", "No user account found so creating a new one."); |
77 | |||
76 | m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); | 78 | m_userManager.AddUserProfile(firstname, lastname, "test", defaultHomeX, defaultHomeY); |
77 | 79 | ||
78 | profile = m_userManager.GetUserProfile(firstname, lastname); | 80 | profile = m_userManager.GetUserProfile(firstname, lastname); |
@@ -91,12 +93,14 @@ namespace OpenSim.Region.Communications.Local | |||
91 | if (!authUsers) | 93 | if (!authUsers) |
92 | { | 94 | { |
93 | //for now we will accept any password in sandbox mode | 95 | //for now we will accept any password in sandbox mode |
94 | Console.WriteLine("authorising user"); | 96 | MainLog.Instance.Notice("LOGIN", "Authorising user (no actual password check)"); |
97 | |||
95 | return true; | 98 | return true; |
96 | } | 99 | } |
97 | else | 100 | else |
98 | { | 101 | { |
99 | Console.WriteLine("Authenticating " + profile.username + " " + profile.surname); | 102 | MainLog.Instance.Notice( |
103 | "LOGIN", "Authenticating " + profile.username + " " + profile.surname); | ||
100 | 104 | ||
101 | password = password.Remove(0, 3); //remove $1$ | 105 | password = password.Remove(0, 3); //remove $1$ |
102 | 106 | ||
@@ -153,7 +157,7 @@ namespace OpenSim.Region.Communications.Local | |||
153 | } | 157 | } |
154 | else | 158 | else |
155 | { | 159 | { |
156 | Console.WriteLine("not found region " + currentRegion); | 160 | MainLog.Instance.Warn("LOGIN", "Not found region " + currentRegion); |
157 | } | 161 | } |
158 | } | 162 | } |
159 | 163 | ||