aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Communications/Local
diff options
context:
space:
mode:
authorSean Dague2008-04-10 13:53:06 +0000
committerSean Dague2008-04-10 13:53:06 +0000
commitc176caeb05c2264654b764e4d010561da60c24fc (patch)
tree87e0cab128ecaac57c5995df4cf5048185fe383f /OpenSim/Region/Communications/Local
parent* Brings back map tile generation based on the terrain. The algorithm produc... (diff)
downloadopensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.zip
opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.gz
opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.bz2
opensim-SC_OLD-c176caeb05c2264654b764e4d010561da60c24fc.tar.xz
moved fields to properties for UserDataProfile, which was
actually a little more work than I expected given the copious use of out params.
Diffstat (limited to 'OpenSim/Region/Communications/Local')
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs30
-rw-r--r--OpenSim/Region/Communications/Local/LocalUserServices.cs2
2 files changed, 16 insertions, 16 deletions
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 4632716..d1d3e22 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -87,7 +87,7 @@ namespace OpenSim.Region.Communications.Local
87 profile = m_userManager.GetUserProfile(firstname, lastname); 87 profile = m_userManager.GetUserProfile(firstname, lastname);
88 if (profile != null) 88 if (profile != null)
89 { 89 {
90 m_Parent.InventoryService.CreateNewUserInventory(profile.UUID); 90 m_Parent.InventoryService.CreateNewUserInventory(profile.Id);
91 } 91 }
92 92
93 return profile; 93 return profile;
@@ -107,17 +107,17 @@ namespace OpenSim.Region.Communications.Local
107 else 107 else
108 { 108 {
109 m_log.Info( 109 m_log.Info(
110 "[LOGIN]: Authenticating " + profile.username + " " + profile.surname); 110 "[LOGIN]: Authenticating " + profile.FirstName + " " + profile.SurName);
111 111
112 if (!password.StartsWith("$1$")) 112 if (!password.StartsWith("$1$"))
113 password = "$1$" + Util.Md5Hash(password); 113 password = "$1$" + Util.Md5Hash(password);
114 114
115 password = password.Remove(0, 3); //remove $1$ 115 password = password.Remove(0, 3); //remove $1$
116 116
117 string s = Util.Md5Hash(password + ":" + profile.passwordSalt); 117 string s = Util.Md5Hash(password + ":" + profile.PasswordSalt);
118 118
119 bool loginresult = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) 119 bool loginresult = (profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
120 || profile.passwordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase)); 120 || profile.PasswordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
121 return loginresult; 121 return loginresult;
122 } 122 }
123 } 123 }
@@ -127,18 +127,18 @@ namespace OpenSim.Region.Communications.Local
127 ulong currentRegion = 0; 127 ulong currentRegion = 0;
128 if (startLocationRequest == "last") 128 if (startLocationRequest == "last")
129 { 129 {
130 currentRegion = theUser.currentAgent.currentHandle; 130 currentRegion = theUser.CurrentAgent.currentHandle;
131 } 131 }
132 else if (startLocationRequest == "home") 132 else if (startLocationRequest == "home")
133 { 133 {
134 currentRegion = theUser.homeRegion; 134 currentRegion = theUser.HomeRegion;
135 } 135 }
136 else 136 else
137 { 137 {
138 m_log.Info("[LOGIN]: Got Custom Login URL, but can't process it"); 138 m_log.Info("[LOGIN]: Got Custom Login URL, but can't process it");
139 // LocalBackEndServices can't possibly look up a region by name :( 139 // LocalBackEndServices can't possibly look up a region by name :(
140 // TODO: Parse string in the following format: 'uri:RegionName&X&Y&Z' 140 // TODO: Parse string in the following format: 'uri:RegionName&X&Y&Z'
141 currentRegion = theUser.currentAgent.currentHandle; 141 currentRegion = theUser.CurrentAgent.currentHandle;
142 } 142 }
143 143
144 RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion); 144 RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion);
@@ -147,10 +147,10 @@ namespace OpenSim.Region.Communications.Local
147 { 147 {
148 response.Home = "{'region_handle':[r" + (reg.RegionLocX * Constants.RegionSize).ToString() + ",r" + 148 response.Home = "{'region_handle':[r" + (reg.RegionLocX * Constants.RegionSize).ToString() + ",r" +
149 (reg.RegionLocY * Constants.RegionSize).ToString() + "], " + 149 (reg.RegionLocY * Constants.RegionSize).ToString() + "], " +
150 "'position':[r" + theUser.homeLocation.X.ToString() + ",r" + 150 "'position':[r" + theUser.HomeLocation.X.ToString() + ",r" +
151 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " + 151 theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " +
152 "'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + 152 "'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" +
153 theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}"; 153 theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}";
154 string capsPath = Util.GetRandomCapsPath(); 154 string capsPath = Util.GetRandomCapsPath();
155 response.SimAddress = reg.ExternalEndPoint.Address.ToString(); 155 response.SimAddress = reg.ExternalEndPoint.Address.ToString();
156 response.SimPort = (uint) reg.ExternalEndPoint.Port; 156 response.SimPort = (uint) reg.ExternalEndPoint.Port;
@@ -164,12 +164,12 @@ namespace OpenSim.Region.Communications.Local
164 "[CAPS]: Sending new CAPS seed url {0} to client {1}", 164 "[CAPS]: Sending new CAPS seed url {0} to client {1}",
165 response.SeedCapability, response.AgentID); 165 response.SeedCapability, response.AgentID);
166 166
167 theUser.currentAgent.currentRegion = reg.RegionID; 167 theUser.CurrentAgent.currentRegion = reg.RegionID;
168 theUser.currentAgent.currentHandle = reg.RegionHandle; 168 theUser.CurrentAgent.currentHandle = reg.RegionHandle;
169 169
170 LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList(); 170 LoginResponse.BuddyList buddyList = new LoginResponse.BuddyList();
171 171
172 response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.UUID)); 172 response.BuddList = ConvertFriendListItem(m_userManager.GetUserFriendList(theUser.Id));
173 173
174 Login _login = new Login(); 174 Login _login = new Login();
175 //copy data to login object 175 //copy data to login object
diff --git a/OpenSim/Region/Communications/Local/LocalUserServices.cs b/OpenSim/Region/Communications/Local/LocalUserServices.cs
index c31367f..00514e8 100644
--- a/OpenSim/Region/Communications/Local/LocalUserServices.cs
+++ b/OpenSim/Region/Communications/Local/LocalUserServices.cs
@@ -84,7 +84,7 @@ namespace OpenSim.Region.Communications.Local
84 } 84 }
85 else 85 else
86 { 86 {
87 m_inventoryService.CreateNewUserInventory(profile.UUID); 87 m_inventoryService.CreateNewUserInventory(profile.Id);
88 } 88 }
89 89
90 return profile; 90 return profile;