aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications
diff options
context:
space:
mode:
authorJustin Clarke Casey2007-12-15 21:58:07 +0000
committerJustin Clarke Casey2007-12-15 21:58:07 +0000
commit019d6626068920283b700440e780c86c162ca7c6 (patch)
tree7c0a9ec1ca185257cee0463a73feef882be23878 /OpenSim/Region/Communications
parentmore dorking around with exporter. Still far (diff)
downloadopensim-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')
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs12
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;
31using System.Collections.Generic; 31using System.Collections.Generic;
32using libsecondlife; 32using libsecondlife;
33using OpenSim.Framework; 33using OpenSim.Framework;
34using OpenSim.Framework.Console;
34using OpenSim.Framework.UserManagement; 35using OpenSim.Framework.UserManagement;
35using InventoryFolder=OpenSim.Framework.InventoryFolder; 36using 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