aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJeff Ames2008-03-18 03:41:05 +0000
committerJeff Ames2008-03-18 03:41:05 +0000
commit9f7639fd6d2d7fd37587223259303377ee15bab4 (patch)
tree686d6d493fda3dd2de2fa83221a1e5500ddcd37a
parentBuilding on Joha's update... (diff)
downloadopensim-SC-9f7639fd6d2d7fd37587223259303377ee15bab4.zip
opensim-SC-9f7639fd6d2d7fd37587223259303377ee15bab4.tar.gz
opensim-SC-9f7639fd6d2d7fd37587223259303377ee15bab4.tar.bz2
opensim-SC-9f7639fd6d2d7fd37587223259303377ee15bab4.tar.xz
Formatting cleanup.
-rw-r--r--OpenSim/Framework/Communications/LoginService.cs163
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs12
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLManager.cs31
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLUserData.cs46
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs1
-rw-r--r--OpenSim/Region/ClientStack/ClientView.cs53
-rw-r--r--OpenSim/Region/Communications/Local/LocalLoginService.cs1
7 files changed, 117 insertions, 190 deletions
diff --git a/OpenSim/Framework/Communications/LoginService.cs b/OpenSim/Framework/Communications/LoginService.cs
index 5547c24..bb8cad5 100644
--- a/OpenSim/Framework/Communications/LoginService.cs
+++ b/OpenSim/Framework/Communications/LoginService.cs
@@ -114,7 +114,6 @@ namespace OpenSim.Framework.UserManagement
114 string clientversion = (string)requestData["version"]; 114 string clientversion = (string)requestData["version"];
115 m_log.Info("[LOGIN]: Client Version " + clientversion + " for " + firstname + " " + lastname); 115 m_log.Info("[LOGIN]: Client Version " + clientversion + " for " + firstname + " " + lastname);
116 } 116 }
117
118 117
119 userProfile = GetTheUser(firstname, lastname); 118 userProfile = GetTheUser(firstname, lastname);
120 if (userProfile == null) 119 if (userProfile == null)
@@ -398,7 +397,6 @@ namespace OpenSim.Framework.UserManagement
398 397
399 public Hashtable ProcessHTMLLogin(Hashtable keysvals) 398 public Hashtable ProcessHTMLLogin(Hashtable keysvals)
400 { 399 {
401
402 // Matches all unspecified characters 400 // Matches all unspecified characters
403 // Currently specified,; lowercase letters, upper case letters, numbers, underline 401 // Currently specified,; lowercase letters, upper case letters, numbers, underline
404 // period, space, parens, and dash. 402 // period, space, parens, and dash.
@@ -422,44 +420,42 @@ namespace OpenSim.Framework.UserManagement
422 // the client requires the HTML form field be named 'username' 420 // the client requires the HTML form field be named 'username'
423 // however, the data it sends when it loads the first time is 'firstname' 421 // however, the data it sends when it loads the first time is 'firstname'
424 // another one of those little nuances. 422 // another one of those little nuances.
425
426 423
427 if (keysvals.Contains("firstname")) 424 if (keysvals.Contains("firstname"))
428 firstname = wfcut.Replace((string)keysvals["firstname"],String.Empty,99999); 425 firstname = wfcut.Replace((string)keysvals["firstname"], String.Empty, 99999);
426
429 if (keysvals.Contains("username")) 427 if (keysvals.Contains("username"))
430 firstname = wfcut.Replace((string)keysvals["username"],String.Empty,99999); 428 firstname = wfcut.Replace((string)keysvals["username"], String.Empty, 99999);
431 429
432 if (keysvals.Contains("lastname")) 430 if (keysvals.Contains("lastname"))
433 lastname = wfcut.Replace((string)keysvals["lastname"],String.Empty,99999); 431 lastname = wfcut.Replace((string)keysvals["lastname"], String.Empty, 99999);
434 432
435 if (keysvals.Contains("location")) 433 if (keysvals.Contains("location"))
436 location = wfcut.Replace((string)keysvals["location"],String.Empty,99999); 434 location = wfcut.Replace((string)keysvals["location"], String.Empty, 99999);
437 435
438 if (keysvals.Contains("region")) 436 if (keysvals.Contains("region"))
439 region = wfcut.Replace((string)keysvals["region"],String.Empty,99999); 437 region = wfcut.Replace((string)keysvals["region"], String.Empty, 99999);
440 438
441 if (keysvals.Contains("grid")) 439 if (keysvals.Contains("grid"))
442 grid = wfcut.Replace((string)keysvals["grid"],String.Empty,99999); 440 grid = wfcut.Replace((string)keysvals["grid"], String.Empty, 99999);
443 441
444 if (keysvals.Contains("channel")) 442 if (keysvals.Contains("channel"))
445 channel = wfcut.Replace((string)keysvals["channel"],String.Empty,99999); 443 channel = wfcut.Replace((string)keysvals["channel"], String.Empty, 99999);
446 444
447 if (keysvals.Contains("version")) 445 if (keysvals.Contains("version"))
448 version = wfcut.Replace((string)keysvals["version"],String.Empty,99999); 446 version = wfcut.Replace((string)keysvals["version"], String.Empty, 99999);
449 447
450 if (keysvals.Contains("lang")) 448 if (keysvals.Contains("lang"))
451 lang = wfcut.Replace((string)keysvals["lang"],String.Empty,99999); 449 lang = wfcut.Replace((string)keysvals["lang"], String.Empty, 99999);
452 450
453 if (keysvals.Contains("password")) 451 if (keysvals.Contains("password"))
454 password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999); 452 password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999);
455 453
456
457 // load our login form. 454 // load our login form.
458 string loginform = GetLoginForm(firstname,lastname,location,region,grid,channel,version,lang,password,errormessages); 455 string loginform = GetLoginForm(firstname, lastname, location, region, grid, channel, version, lang, password, errormessages);
459 456
460 if (keysvals.ContainsKey("show_login_form")) 457 if (keysvals.ContainsKey("show_login_form"))
461 { 458 {
462
463 UserProfileData user = GetTheUser(firstname, lastname); 459 UserProfileData user = GetTheUser(firstname, lastname);
464 bool goodweblogin = false; 460 bool goodweblogin = false;
465 461
@@ -472,9 +468,10 @@ namespace OpenSim.Framework.UserManagement
472 m_userManager.StoreWebLoginKey(user.UUID, webloginkey); 468 m_userManager.StoreWebLoginKey(user.UUID, webloginkey);
473 statuscode = 301; 469 statuscode = 301;
474 470
475 string redirectURL = "about:blank?redirect-http-hack=" + System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" + 471 string redirectURL = "about:blank?redirect-http-hack=" +
476 lastname + 472 System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" +
477 "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString()); 473 lastname +
474 "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString());
478 //m_log.Info("[WEB]: R:" + redirectURL); 475 //m_log.Info("[WEB]: R:" + redirectURL);
479 returnactions["int_response_code"] = statuscode; 476 returnactions["int_response_code"] = statuscode;
480 returnactions["str_redirect_location"] = redirectURL; 477 returnactions["str_redirect_location"] = redirectURL;
@@ -487,11 +484,7 @@ namespace OpenSim.Framework.UserManagement
487 loginform = GetLoginForm(firstname, lastname, location, region, grid, channel, version, lang, password, errormessages); 484 loginform = GetLoginForm(firstname, lastname, location, region, grid, channel, version, lang, password, errormessages);
488 returnactions["int_response_code"] = statuscode; 485 returnactions["int_response_code"] = statuscode;
489 returnactions["str_response_string"] = loginform; 486 returnactions["str_response_string"] = loginform;
490
491 } 487 }
492
493
494
495 } 488 }
496 else 489 else
497 { 490 {
@@ -499,7 +492,6 @@ namespace OpenSim.Framework.UserManagement
499 returnactions["str_response_string"] = loginform; 492 returnactions["str_response_string"] = loginform;
500 } 493 }
501 return returnactions; 494 return returnactions;
502
503 } 495 }
504 496
505 public string GetLoginForm(string firstname, string lastname, string location, string region, 497 public string GetLoginForm(string firstname, string lastname, string location, string region,
@@ -537,67 +529,66 @@ namespace OpenSim.Framework.UserManagement
537 public string GetDefaultLoginForm() 529 public string GetDefaultLoginForm()
538 { 530 {
539 string responseString = 531 string responseString =
540 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">"; 532 "<!DOCTYPE html PUBLIC \"-//W3C//DTD XHTML 1.0 Transitional//EN\" \"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd\">";
541 responseString = responseString + "<html xmlns=\"http://www.w3.org/1999/xhtml\">"; 533 responseString += "<html xmlns=\"http://www.w3.org/1999/xhtml\">";
542 responseString = responseString + "<head>"; 534 responseString += "<head>";
543 responseString = responseString + 535 responseString += "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />";
544 "<meta http-equiv=\"Content-Type\" content=\"text/html; charset=utf-8\" />"; 536 responseString += "<meta http-equiv=\"cache-control\" content=\"no-cache\">";
545 responseString = responseString + "<meta http-equiv=\"cache-control\" content=\"no-cache\">"; 537 responseString += "<meta http-equiv=\"Pragma\" content=\"no-cache\">";
546 responseString = responseString + "<meta http-equiv=\"Pragma\" content=\"no-cache\">"; 538 responseString += "<title>OpenSim Login</title>";
547 responseString = responseString + "<title>OpenSim Login</title>"; 539 responseString += "<body><br />";
548 responseString = responseString + "<body><br />"; 540 responseString += "<div id=\"login_box\">";
549 responseString = responseString + "<div id=\"login_box\">";
550 541
551 responseString = responseString + "<form action=\"/go.cgi\" method=\"GET\" id=\"login-form\">"; 542 responseString += "<form action=\"/go.cgi\" method=\"GET\" id=\"login-form\">";
552 543
553 responseString = responseString + "<div id=\"message\">[$errors]</div>"; 544 responseString += "<div id=\"message\">[$errors]</div>";
554 responseString = responseString + "<fieldset id=\"firstname\">"; 545 responseString += "<fieldset id=\"firstname\">";
555 responseString = responseString + "<legend>First Name:</legend>"; 546 responseString += "<legend>First Name:</legend>";
556 responseString = responseString + "<input type=\"text\" id=\"firstname_input\" size=\"15\" maxlength=\"100\" name=\"username\" value=\"[$firstname]\" />"; 547 responseString += "<input type=\"text\" id=\"firstname_input\" size=\"15\" maxlength=\"100\" name=\"username\" value=\"[$firstname]\" />";
557 responseString = responseString + "</fieldset>"; 548 responseString += "</fieldset>";
558 responseString = responseString + "<fieldset id=\"lastname\">"; 549 responseString += "<fieldset id=\"lastname\">";
559 responseString = responseString + "<legend>Last Name:</legend>"; 550 responseString += "<legend>Last Name:</legend>";
560 responseString = responseString + "<input type=\"text\" size=\"15\" maxlength=\"100\" name=\"lastname\" value=\"[$lastname]\" />"; 551 responseString += "<input type=\"text\" size=\"15\" maxlength=\"100\" name=\"lastname\" value=\"[$lastname]\" />";
561 responseString = responseString + "</fieldset>"; 552 responseString += "</fieldset>";
562 responseString = responseString + "<fieldset id=\"password\">"; 553 responseString += "<fieldset id=\"password\">";
563 responseString = responseString + "<legend>Password:</legend>"; 554 responseString += "<legend>Password:</legend>";
564 responseString = responseString + "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">"; 555 responseString += "<table cellspacing=\"0\" cellpadding=\"0\" border=\"0\">";
565 responseString = responseString + "<tr>"; 556 responseString += "<tr>";
566 responseString = responseString + "<td colspan=\"2\"><input type=\"password\" size=\"15\" maxlength=\"100\" name=\"password\" value=\"[$password]\" /></td>"; 557 responseString += "<td colspan=\"2\"><input type=\"password\" size=\"15\" maxlength=\"100\" name=\"password\" value=\"[$password]\" /></td>";
567 responseString = responseString + "</tr>"; 558 responseString += "</tr>";
568 responseString = responseString + "<tr>"; 559 responseString += "<tr>";
569 responseString = responseString + "<td valign=\"middle\"><input type=\"checkbox\" name=\"remember_password\" id=\"remember_password\" [$remember_password] style=\"margin-left:0px;\"/></td>"; 560 responseString += "<td valign=\"middle\"><input type=\"checkbox\" name=\"remember_password\" id=\"remember_password\" [$remember_password] style=\"margin-left:0px;\"/></td>";
570 responseString = responseString + "<td><label for=\"remember_password\">Remember password</label></td>"; 561 responseString += "<td><label for=\"remember_password\">Remember password</label></td>";
571 responseString = responseString + "</tr>"; 562 responseString += "</tr>";
572 responseString = responseString + "</table>"; 563 responseString += "</table>";
573 responseString = responseString + "</fieldset>"; 564 responseString += "</fieldset>";
574 responseString = responseString + "<input type=\"hidden\" name=\"show_login_form\" value=\"FALSE\" />"; 565 responseString += "<input type=\"hidden\" name=\"show_login_form\" value=\"FALSE\" />";
575 responseString = responseString + "<input type=\"hidden\" name=\"method\" value=\"login\" />"; 566 responseString += "<input type=\"hidden\" name=\"method\" value=\"login\" />";
576 responseString = responseString + "<input type=\"hidden\" id=\"grid\" name=\"grid\" value=\"[$grid]\" />"; 567 responseString += "<input type=\"hidden\" id=\"grid\" name=\"grid\" value=\"[$grid]\" />";
577 responseString = responseString + "<input type=\"hidden\" id=\"region\" name=\"region\" value=\"[$region]\" />"; 568 responseString += "<input type=\"hidden\" id=\"region\" name=\"region\" value=\"[$region]\" />";
578 responseString = responseString + "<input type=\"hidden\" id=\"location\" name=\"location\" value=\"[$location]\" />"; 569 responseString += "<input type=\"hidden\" id=\"location\" name=\"location\" value=\"[$location]\" />";
579 responseString = responseString + "<input type=\"hidden\" id=\"channel\" name=\"channel\" value=\"[$channel]\" />"; 570 responseString += "<input type=\"hidden\" id=\"channel\" name=\"channel\" value=\"[$channel]\" />";
580 responseString = responseString + "<input type=\"hidden\" id=\"version\" name=\"version\" value=\"[$version]\" />"; 571 responseString += "<input type=\"hidden\" id=\"version\" name=\"version\" value=\"[$version]\" />";
581 responseString = responseString + "<input type=\"hidden\" id=\"lang\" name=\"lang\" value=\"[$lang]\" />"; 572 responseString += "<input type=\"hidden\" id=\"lang\" name=\"lang\" value=\"[$lang]\" />";
582 responseString = responseString + "<div id=\"submitbtn\">"; 573 responseString += "<div id=\"submitbtn\">";
583 responseString = responseString + "<input class=\"input_over\" type=\"submit\" value=\"Connect\" />"; 574 responseString += "<input class=\"input_over\" type=\"submit\" value=\"Connect\" />";
584 responseString = responseString + "</div>"; 575 responseString += "</div>";
585 responseString = responseString + "<div id=\"connecting\" style=\"visibility:hidden\"> Connecting...</div>"; 576 responseString += "<div id=\"connecting\" style=\"visibility:hidden\"> Connecting...</div>";
586 577
587 responseString = responseString + "<div id=\"helplinks\">"; 578 responseString += "<div id=\"helplinks\">";
588 responseString = responseString + "<a href=\"#join now link\" target=\"_blank\"></a> | "; 579 responseString += "<a href=\"#join now link\" target=\"_blank\"></a> | ";
589 responseString = responseString + "<a href=\"#forgot password link\" target=\"_blank\"></a>"; 580 responseString += "<a href=\"#forgot password link\" target=\"_blank\"></a>";
590 responseString = responseString + "</div>"; 581 responseString += "</div>";
591 582
592 responseString = responseString + "<div id=\"channelinfo\"> [$channel] | [$version]=[$lang]</div>"; 583 responseString += "<div id=\"channelinfo\"> [$channel] | [$version]=[$lang]</div>";
593 responseString = responseString + "</form>"; 584 responseString += "</form>";
594 responseString = responseString + "<script language=\"JavaScript\">"; 585 responseString += "<script language=\"JavaScript\">";
595 responseString = responseString + "document.getElementById('firstname_input').focus();"; 586 responseString += "document.getElementById('firstname_input').focus();";
596 responseString = responseString + "</script>"; 587 responseString += "</script>";
597 responseString = responseString + "</div>"; 588 responseString += "</div>";
598 responseString = responseString + "</div>"; 589 responseString += "</div>";
599 responseString = responseString + "</body>"; 590 responseString += "</body>";
600 responseString = responseString + "</html>"; 591 responseString += "</html>";
601 return responseString; 592 return responseString;
602 } 593 }
603 594
@@ -611,7 +602,6 @@ namespace OpenSim.Framework.UserManagement
611 return m_userManager.CommitAgent(ref profile); 602 return m_userManager.CommitAgent(ref profile);
612 } 603 }
613 604
614
615 /// <summary> 605 /// <summary>
616 /// Checks a user against it's password hash 606 /// Checks a user against it's password hash
617 /// </summary> 607 /// </summary>
@@ -638,7 +628,7 @@ namespace OpenSim.Framework.UserManagement
638 //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password); 628 //m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password);
639 629
640 passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase) 630 passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
641 || profile.passwordHash.Equals(password,StringComparison.InvariantCultureIgnoreCase)); 631 || profile.passwordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
642 632
643 return passwordSuccess; 633 return passwordSuccess;
644 } 634 }
@@ -699,7 +689,6 @@ namespace OpenSim.Framework.UserManagement
699 buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms; 689 buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms;
700 buddyitem.BuddyRightsGiven = (int) fl.FriendPerms; 690 buddyitem.BuddyRightsGiven = (int) fl.FriendPerms;
701 buddylistreturn.AddNewBuddy(buddyitem); 691 buddylistreturn.AddNewBuddy(buddyitem);
702
703 } 692 }
704 return buddylistreturn; 693 return buddylistreturn;
705 } 694 }
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index b8e3114..48807c2 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -194,7 +194,6 @@ namespace OpenSim.Framework.UserManagement
194 /// <returns>A List of FriendListItems that contains info about the user's friends</returns> 194 /// <returns>A List of FriendListItems that contains info about the user's friends</returns>
195 public List<FriendListItem> GetUserFriendList(LLUUID ownerID) 195 public List<FriendListItem> GetUserFriendList(LLUUID ownerID)
196 { 196 {
197
198 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 197 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
199 { 198 {
200 try 199 try
@@ -208,12 +207,10 @@ namespace OpenSim.Framework.UserManagement
208 } 207 }
209 208
210 return null; 209 return null;
211
212 } 210 }
213 211
214 public void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey) 212 public void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey)
215 { 213 {
216
217 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 214 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
218 { 215 {
219 try 216 try
@@ -240,10 +237,8 @@ namespace OpenSim.Framework.UserManagement
240 m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")"); 237 m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
241 } 238 }
242 } 239 }
243
244 } 240 }
245 241
246
247 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend) 242 public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
248 { 243 {
249 foreach (KeyValuePair<string, IUserData> plugin in _plugins) 244 foreach (KeyValuePair<string, IUserData> plugin in _plugins)
@@ -273,6 +268,7 @@ namespace OpenSim.Framework.UserManagement
273 } 268 }
274 } 269 }
275 } 270 }
271
276 /// <summary> 272 /// <summary>
277 /// Loads a user agent by name (not called directly) 273 /// Loads a user agent by name (not called directly)
278 /// </summary> 274 /// </summary>
@@ -295,7 +291,10 @@ namespace OpenSim.Framework.UserManagement
295 return null; 291 return null;
296 } 292 }
297 293
298 // TODO: document 294 /// <summary>
295 /// Resets the currentAgent in the user profile
296 /// </summary>
297 /// <param name="agentID">The agent's ID</param>
299 public void clearUserAgent(LLUUID agentID) 298 public void clearUserAgent(LLUUID agentID)
300 { 299 {
301 UserProfileData profile = GetUserProfile(agentID); 300 UserProfileData profile = GetUserProfile(agentID);
@@ -459,7 +458,6 @@ namespace OpenSim.Framework.UserManagement
459 // If currentagent is null, we can't reference it here or the UserServer crashes! 458 // If currentagent is null, we can't reference it here or the UserServer crashes!
460 m_log.Info("[LOGOUT]: didn't save logout position: " + userid.ToString()); 459 m_log.Info("[LOGOUT]: didn't save logout position: " + userid.ToString());
461 } 460 }
462
463 } 461 }
464 else 462 else
465 { 463 {
diff --git a/OpenSim/Framework/Data.MySQL/MySQLManager.cs b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
index 46fd1bc..d422687 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLManager.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLManager.cs
@@ -138,13 +138,11 @@ namespace OpenSim.Framework.Data.MySQL
138 string dllName = module.Assembly.ManifestModule.Name; 138 string dllName = module.Assembly.ManifestModule.Name;
139 Version dllVersion = module.Assembly.GetName().Version; 139 Version dllVersion = module.Assembly.GetName().Version;
140 140
141
142 return 141 return
143 string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build, 142 string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
144 dllVersion.Revision); 143 dllVersion.Revision);
145 } 144 }
146 145
147
148 /// <summary> 146 /// <summary>
149 /// Extract a named string resource from the embedded resources 147 /// Extract a named string resource from the embedded resources
150 /// </summary> 148 /// </summary>
@@ -156,7 +154,9 @@ namespace OpenSim.Framework.Data.MySQL
156 string[] names = assem.GetManifestResourceNames(); 154 string[] names = assem.GetManifestResourceNames();
157 155
158 foreach (string s in names) 156 foreach (string s in names)
157 {
159 if (s.EndsWith(name)) 158 if (s.EndsWith(name))
159 {
160 using (Stream resource = assem.GetManifestResourceStream(s)) 160 using (Stream resource = assem.GetManifestResourceStream(s))
161 { 161 {
162 using (StreamReader resourceReader = new StreamReader(resource)) 162 using (StreamReader resourceReader = new StreamReader(resource))
@@ -165,6 +165,8 @@ namespace OpenSim.Framework.Data.MySQL
165 return resourceString; 165 return resourceString;
166 } 166 }
167 } 167 }
168 }
169 }
168 throw new Exception(string.Format("Resource '{0}' was not found", name)); 170 throw new Exception(string.Format("Resource '{0}' was not found", name));
169 } 171 }
170 172
@@ -214,8 +216,7 @@ namespace OpenSim.Framework.Data.MySQL
214 } 216 }
215 } 217 }
216 218
217 219 // TODO: at some time this code should be cleaned up
218 // at some time this code should be cleaned up
219 220
220 /// <summary> 221 /// <summary>
221 /// Runs a query with protection against SQL Injection by using parameterised input. 222 /// Runs a query with protection against SQL Injection by using parameterised input.
@@ -249,7 +250,7 @@ namespace OpenSim.Framework.Data.MySQL
249 { 250 {
250 } 251 }
251 252
252 // Try reopen it 253 // Try to reopen it
253 try 254 try
254 { 255 {
255 dbcon = new MySqlConnection(connectionString); 256 dbcon = new MySqlConnection(connectionString);
@@ -368,7 +369,7 @@ namespace OpenSim.Framework.Data.MySQL
368 retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString()); 369 retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString());
369 retval.reservationName = (string) reader["resName"]; 370 retval.reservationName = (string) reader["resName"];
370 retval.status = Convert.ToInt32(reader["status"].ToString()) == 1; 371 retval.status = Convert.ToInt32(reader["status"].ToString()) == 1;
371 LLUUID.TryParse((string) reader["userUUID"], out retval.userUUID); 372 LLUUID.TryParse((string) reader["userUUID"], out retval.userUUID);
372 } 373 }
373 else 374 else
374 { 375 {
@@ -458,22 +459,22 @@ namespace OpenSim.Framework.Data.MySQL
458 else 459 else
459 retval.profileAboutText = (string) reader["profileAboutText"]; 460 retval.profileAboutText = (string) reader["profileAboutText"];
460 461
461 if (reader.IsDBNull( reader.GetOrdinal( "profileFirstText" ) ) ) 462 if (reader.IsDBNull(reader.GetOrdinal("profileFirstText")))
462 retval.profileFirstText = ""; 463 retval.profileFirstText = "";
463 else 464 else
464 retval.profileFirstText = (string)reader["profileFirstText"]; 465 retval.profileFirstText = (string)reader["profileFirstText"];
465 466
466 if (reader.IsDBNull( reader.GetOrdinal( "profileImage" ) ) ) 467 if (reader.IsDBNull(reader.GetOrdinal("profileImage")))
467 retval.profileImage = LLUUID.Zero; 468 retval.profileImage = LLUUID.Zero;
468 else 469 else
469 LLUUID.TryParse((string)reader["profileImage"], out retval.profileImage); 470 LLUUID.TryParse((string)reader["profileImage"], out retval.profileImage);
470 471
471 if (reader.IsDBNull( reader.GetOrdinal( "profileFirstImage" ) ) ) 472 if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage")))
472 retval.profileFirstImage = LLUUID.Zero; 473 retval.profileFirstImage = LLUUID.Zero;
473 else 474 else
474 LLUUID.TryParse((string)reader["profileFirstImage"], out retval.profileFirstImage); 475 LLUUID.TryParse((string)reader["profileFirstImage"], out retval.profileFirstImage);
475 476
476 if( reader.IsDBNull( reader.GetOrdinal( "webLoginKey" ) ) ) 477 if(reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
477 { 478 {
478 retval.webLoginKey = LLUUID.Zero; 479 retval.webLoginKey = LLUUID.Zero;
479 } 480 }
@@ -489,7 +490,6 @@ namespace OpenSim.Framework.Data.MySQL
489 return retval; 490 return retval;
490 } 491 }
491 492
492
493 /// <summary> 493 /// <summary>
494 /// Inserts a new row into the log database 494 /// Inserts a new row into the log database
495 /// </summary> 495 /// </summary>
@@ -534,7 +534,6 @@ namespace OpenSim.Framework.Data.MySQL
534 return returnval; 534 return returnval;
535 } 535 }
536 536
537
538 /// <summary> 537 /// <summary>
539 /// Creates a new user and inserts it into the database 538 /// Creates a new user and inserts it into the database
540 /// </summary> 539 /// </summary>
@@ -630,7 +629,7 @@ namespace OpenSim.Framework.Data.MySQL
630 return returnval; 629 return returnval;
631 } 630 }
632 631
633 /// <summary> 632 /// <summary>
634 /// Creates a new user and inserts it into the database 633 /// Creates a new user and inserts it into the database
635 /// </summary> 634 /// </summary>
636 /// <param name="uuid">User ID</param> 635 /// <param name="uuid">User ID</param>
@@ -823,6 +822,7 @@ namespace OpenSim.Framework.Data.MySQL
823 822
824 return returnval; 823 return returnval;
825 } 824 }
825
826 /// <summary> 826 /// <summary>
827 /// Delete a region from the database 827 /// Delete a region from the database
828 /// </summary> 828 /// </summary>
@@ -833,14 +833,13 @@ namespace OpenSim.Framework.Data.MySQL
833 { 833 {
834 bool returnval = false; 834 bool returnval = false;
835 835
836 string sql = 836 string sql = "DELETE FROM regions WHERE uuid = ?uuid;";
837 "DELETE FROM regions WHERE uuid = ?uuid;";
838 837
839 Dictionary<string, string> parameters = new Dictionary<string, string>(); 838 Dictionary<string, string> parameters = new Dictionary<string, string>();
840 839
841 try 840 try
842 { 841 {
843 parameters["?uuid"] = uuid; 842 parameters["?uuid"] = uuid;
844 843
845 IDbCommand result = Query(sql, parameters); 844 IDbCommand result = Query(sql, parameters);
846 845
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
index 4c76461..1370b1b 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
@@ -108,7 +108,6 @@ namespace OpenSim.Framework.Data.MySQL
108 UpgradeAgentsTable(tableList[m_agentsTableName]); 108 UpgradeAgentsTable(tableList[m_agentsTableName]);
109 UpgradeUsersTable(tableList[m_usersTableName]); 109 UpgradeUsersTable(tableList[m_usersTableName]);
110 UpgradeFriendsTable(tableList[m_userFriendsTableName]); 110 UpgradeFriendsTable(tableList[m_userFriendsTableName]);
111
112 } 111 }
113 112
114 /// <summary> 113 /// <summary>
@@ -227,7 +226,6 @@ namespace OpenSim.Framework.Data.MySQL
227 "(?friendID,?ownerID,?friendPerms,?datetimestamp)", 226 "(?friendID,?ownerID,?friendPerms,?datetimestamp)",
228 param); 227 param);
229 adder.ExecuteNonQuery(); 228 adder.ExecuteNonQuery();
230
231 } 229 }
232 } 230 }
233 catch (Exception e) 231 catch (Exception e)
@@ -244,23 +242,21 @@ namespace OpenSim.Framework.Data.MySQL
244 param["?ownerID"] = friendlistowner.UUID.ToString(); 242 param["?ownerID"] = friendlistowner.UUID.ToString();
245 param["?friendID"] = friend.UUID.ToString(); 243 param["?friendID"] = friend.UUID.ToString();
246 244
247
248 try 245 try
249 { 246 {
250 lock (database) 247 lock (database)
251 { 248 {
252 IDbCommand updater = 249 IDbCommand updater =
253 database.Query( 250 database.Query(
254 "delete from " + m_userFriendsTableName + " where ownerID = ?ownerID and friendID = ?friendID", 251 "delete from " + m_userFriendsTableName + " where ownerID = ?ownerID and friendID = ?friendID",
255 param); 252 param);
256 updater.ExecuteNonQuery(); 253 updater.ExecuteNonQuery();
257 254
258 updater = 255 updater =
259 database.Query( 256 database.Query(
260 "delete from " + m_userFriendsTableName + " where ownerID = ?friendID and friendID = ?ownerID", 257 "delete from " + m_userFriendsTableName + " where ownerID = ?friendID and friendID = ?ownerID",
261 param); 258 param);
262 updater.ExecuteNonQuery(); 259 updater.ExecuteNonQuery();
263
264 } 260 }
265 } 261 }
266 catch (Exception e) 262 catch (Exception e)
@@ -270,13 +266,13 @@ namespace OpenSim.Framework.Data.MySQL
270 return; 266 return;
271 } 267 }
272 } 268 }
269
273 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms) 270 public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
274 { 271 {
275 Dictionary<string, string> param = new Dictionary<string, string>(); 272 Dictionary<string, string> param = new Dictionary<string, string>();
276 param["?ownerID"] = friendlistowner.UUID.ToString(); 273 param["?ownerID"] = friendlistowner.UUID.ToString();
277 param["?friendID"] = friend.UUID.ToString(); 274 param["?friendID"] = friend.UUID.ToString();
278 param["?friendPerms"] = perms.ToString(); 275 param["?friendPerms"] = perms.ToString();
279
280 276
281 try 277 try
282 { 278 {
@@ -284,12 +280,11 @@ namespace OpenSim.Framework.Data.MySQL
284 { 280 {
285 IDbCommand updater = 281 IDbCommand updater =
286 database.Query( 282 database.Query(
287 "update " + m_userFriendsTableName + 283 "update " + m_userFriendsTableName +
288 " SET friendPerms = ?friendPerms " + 284 " SET friendPerms = ?friendPerms " +
289 "where ownerID = ?ownerID and friendID = ?friendID", 285 "where ownerID = ?ownerID and friendID = ?friendID",
290 param); 286 param);
291 updater.ExecuteNonQuery(); 287 updater.ExecuteNonQuery();
292
293 } 288 }
294 } 289 }
295 catch (Exception e) 290 catch (Exception e)
@@ -300,7 +295,6 @@ namespace OpenSim.Framework.Data.MySQL
300 } 295 }
301 } 296 }
302 297
303
304 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner) 298 public List<FriendListItem> GetUserFriendList(LLUUID friendlistowner)
305 { 299 {
306 List<FriendListItem> Lfli = new List<FriendListItem>(); 300 List<FriendListItem> Lfli = new List<FriendListItem>();
@@ -315,12 +309,11 @@ namespace OpenSim.Framework.Data.MySQL
315 //Left Join userfriends to itself 309 //Left Join userfriends to itself
316 IDbCommand result = 310 IDbCommand result =
317 database.Query( 311 database.Query(
318 "select a.ownerID,a.friendID,a.friendPerms,b.friendPerms as ownerperms from " + m_userFriendsTableName + " as a, " + m_userFriendsTableName + " as b" + 312 "select a.ownerID,a.friendID,a.friendPerms,b.friendPerms as ownerperms from " + m_userFriendsTableName + " as a, " + m_userFriendsTableName + " as b" +
319 " where a.ownerID = ?ownerID and b.ownerID = a.friendID and b.friendID = a.ownerID", 313 " where a.ownerID = ?ownerID and b.ownerID = a.friendID and b.friendID = a.ownerID",
320 param); 314 param);
321 IDataReader reader = result.ExecuteReader(); 315 IDataReader reader = result.ExecuteReader();
322 316
323
324 while (reader.Read()) 317 while (reader.Read())
325 { 318 {
326 FriendListItem fli = new FriendListItem(); 319 FriendListItem fli = new FriendListItem();
@@ -354,7 +347,6 @@ namespace OpenSim.Framework.Data.MySQL
354 m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called"); 347 m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
355 } 348 }
356 349
357
358 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 350 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
359 { 351 {
360 List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>(); 352 List<Framework.AvatarPickerAvatar> returnlist = new List<Framework.AvatarPickerAvatar>();
@@ -378,7 +370,6 @@ namespace OpenSim.Framework.Data.MySQL
378 param); 370 param);
379 IDataReader reader = result.ExecuteReader(); 371 IDataReader reader = result.ExecuteReader();
380 372
381
382 while (reader.Read()) 373 while (reader.Read())
383 { 374 {
384 Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); 375 Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
@@ -413,7 +404,6 @@ namespace OpenSim.Framework.Data.MySQL
413 param); 404 param);
414 IDataReader reader = result.ExecuteReader(); 405 IDataReader reader = result.ExecuteReader();
415 406
416
417 while (reader.Read()) 407 while (reader.Read())
418 { 408 {
419 Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar(); 409 Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
@@ -489,7 +479,6 @@ namespace OpenSim.Framework.Data.MySQL
489 479
490 public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey) 480 public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey)
491 { 481 {
492
493 Dictionary<string, string> param = new Dictionary<string, string>(); 482 Dictionary<string, string> param = new Dictionary<string, string>();
494 param["?UUID"] = AgentID.UUID.ToString(); 483 param["?UUID"] = AgentID.UUID.ToString();
495 param["?webLoginKey"] = WebLoginKey.UUID.ToString(); 484 param["?webLoginKey"] = WebLoginKey.UUID.ToString();
@@ -500,11 +489,10 @@ namespace OpenSim.Framework.Data.MySQL
500 { 489 {
501 IDbCommand updater = 490 IDbCommand updater =
502 database.Query( 491 database.Query(
503 "update " + m_usersTableName + " SET webLoginKey = ?webLoginKey " + 492 "update " + m_usersTableName + " SET webLoginKey = ?webLoginKey " +
504 "where UUID = ?UUID", 493 "where UUID = ?UUID",
505 param); 494 param);
506 updater.ExecuteNonQuery(); 495 updater.ExecuteNonQuery();
507
508 } 496 }
509 } 497 }
510 catch (Exception e) 498 catch (Exception e)
@@ -513,10 +501,6 @@ namespace OpenSim.Framework.Data.MySQL
513 m_log.Error(e.ToString()); 501 m_log.Error(e.ToString());
514 return; 502 return;
515 } 503 }
516
517
518
519
520 } 504 }
521 505
522 /// <summary> 506 /// <summary>
@@ -605,11 +589,11 @@ namespace OpenSim.Framework.Data.MySQL
605 /// <param name="user">The profile data to use to update the DB</param> 589 /// <param name="user">The profile data to use to update the DB</param>
606 public bool UpdateUserProfile(UserProfileData user) 590 public bool UpdateUserProfile(UserProfileData user)
607 { 591 {
608 database.updateUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt 592 database.updateUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt,
609 , user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z, user.homeLookAt.X 593 user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z, user.homeLookAt.X,
610 , user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI 594 user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI,
611 , user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask, user.profileAboutText 595 user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask, user.profileAboutText,
612 , user.profileFirstText, user.profileImage, user.profileFirstImage, user.webLoginKey); 596 user.profileFirstText, user.profileImage, user.profileFirstImage, user.webLoginKey);
613 return true; 597 return true;
614 } 598 }
615 599
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index c8d0619..8c53e77 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -44,7 +44,6 @@ using InventoryFolder=OpenSim.Framework.InventoryFolder;
44 44
45namespace OpenSim.Grid.UserServer 45namespace OpenSim.Grid.UserServer
46{ 46{
47
48 public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, 47 public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID,
49 ulong regionhandle, float positionX, float positionY, float positionZ, string firstname, string lastname); 48 ulong regionhandle, float positionX, float positionY, float positionZ, string firstname, string lastname);
50 49
diff --git a/OpenSim/Region/ClientStack/ClientView.cs b/OpenSim/Region/ClientStack/ClientView.cs
index 8e64137..588a8a1 100644
--- a/OpenSim/Region/ClientStack/ClientView.cs
+++ b/OpenSim/Region/ClientStack/ClientView.cs
@@ -2705,11 +2705,10 @@ namespace OpenSim.Region.ClientStack
2705 } 2705 }
2706 else 2706 else
2707 { 2707 {
2708 //Need some extra space in case we need to add proxy information to the message later 2708 //Need some extra space in case we need to add proxy information to the message later
2709 Buffer.BlockCopy(sendbuffer, 0, ZeroOutBuffer, 0, sendbuffer.Length); 2709 Buffer.BlockCopy(sendbuffer, 0, ZeroOutBuffer, 0, sendbuffer.Length);
2710 m_networkServer.SendPacketTo(ZeroOutBuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode); 2710 m_networkServer.SendPacketTo(ZeroOutBuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode);
2711 } 2711 }
2712
2713 } 2712 }
2714 catch (Exception e) 2713 catch (Exception e)
2715 { 2714 {
@@ -2749,7 +2748,6 @@ namespace OpenSim.Region.ClientStack
2749 } 2748 }
2750 } 2749 }
2751 2750
2752
2753 // Handle PacketAck packets 2751 // Handle PacketAck packets
2754 if (NewPack.Type == PacketType.PacketAck) 2752 if (NewPack.Type == PacketType.PacketAck)
2755 { 2753 {
@@ -2958,7 +2956,6 @@ namespace OpenSim.Region.ClientStack
2958 handlerRequestAvatarProperties(this, avatarProperties.AgentData.AvatarID); 2956 handlerRequestAvatarProperties(this, avatarProperties.AgentData.AvatarID);
2959 } 2957 }
2960 2958
2961
2962 break; 2959 break;
2963 case PacketType.ChatFromViewer: 2960 case PacketType.ChatFromViewer:
2964 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack; 2961 ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
@@ -3003,8 +3000,8 @@ namespace OpenSim.Region.ClientStack
3003 UserProfile.profileImage = Properties.ImageID; 3000 UserProfile.profileImage = Properties.ImageID;
3004 3001
3005 handlerUpdateAvatarProperties(this, UserProfile); 3002 handlerUpdateAvatarProperties(this, UserProfile);
3006 } 3003 }
3007 break; 3004 break;
3008 3005
3009 case PacketType.ScriptDialogReply: 3006 case PacketType.ScriptDialogReply:
3010 ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack; 3007 ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack;
@@ -3042,8 +3039,6 @@ namespace OpenSim.Region.ClientStack
3042 msgpack.MessageBlock.Position, msgpack.MessageBlock.RegionID, 3039 msgpack.MessageBlock.Position, msgpack.MessageBlock.RegionID,
3043 msgpack.MessageBlock.BinaryBucket); 3040 msgpack.MessageBlock.BinaryBucket);
3044 } 3041 }
3045
3046
3047 break; 3042 break;
3048 3043
3049 case PacketType.AcceptFriendship: 3044 case PacketType.AcceptFriendship:
@@ -3065,10 +3060,6 @@ namespace OpenSim.Region.ClientStack
3065 { 3060 {
3066 handlerApproveFriendRequest(this, agentID, transactionID, callingCardFolders); 3061 handlerApproveFriendRequest(this, agentID, transactionID, callingCardFolders);
3067 } 3062 }
3068
3069
3070
3071
3072 break; 3063 break;
3073 case PacketType.TerminateFriendship: 3064 case PacketType.TerminateFriendship:
3074 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack; 3065 TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
@@ -3080,8 +3071,6 @@ namespace OpenSim.Region.ClientStack
3080 { 3071 {
3081 handlerTerminateFriendship(this, listOwnerAgentID, exFriendID); 3072 handlerTerminateFriendship(this, listOwnerAgentID, exFriendID);
3082 } 3073 }
3083
3084
3085 break; 3074 break;
3086 case PacketType.RezObject: 3075 case PacketType.RezObject:
3087 RezObjectPacket rezPacket = (RezObjectPacket)Pack; 3076 RezObjectPacket rezPacket = (RezObjectPacket)Pack;
@@ -3107,7 +3096,6 @@ namespace OpenSim.Region.ClientStack
3107 rezPacket.RezData.RezSelected, rezPacket.RezData.RemoveItem, 3096 rezPacket.RezData.RezSelected, rezPacket.RezData.RemoveItem,
3108 rezPacket.RezData.FromTaskID); 3097 rezPacket.RezData.FromTaskID);
3109 } 3098 }
3110
3111 break; 3099 break;
3112 case PacketType.DeRezObject: 3100 case PacketType.DeRezObject:
3113 handlerDeRezObject = OnDeRezObject; 3101 handlerDeRezObject = OnDeRezObject;
@@ -3115,7 +3103,6 @@ namespace OpenSim.Region.ClientStack
3115 { 3103 {
3116 handlerDeRezObject(Pack, this); 3104 handlerDeRezObject(Pack, this);
3117 } 3105 }
3118
3119 break; 3106 break;
3120 case PacketType.ModifyLand: 3107 case PacketType.ModifyLand:
3121 ModifyLandPacket modify = (ModifyLandPacket)Pack; 3108 ModifyLandPacket modify = (ModifyLandPacket)Pack;
@@ -3124,7 +3111,6 @@ namespace OpenSim.Region.ClientStack
3124 { 3111 {
3125 if (OnModifyTerrain != null) 3112 if (OnModifyTerrain != null)
3126 { 3113 {
3127
3128 for (int i = 0; i < modify.ParcelData.Length; i++) 3114 for (int i = 0; i < modify.ParcelData.Length; i++)
3129 { 3115 {
3130 handlerModifyTerrain = OnModifyTerrain; 3116 handlerModifyTerrain = OnModifyTerrain;
@@ -3158,7 +3144,6 @@ namespace OpenSim.Region.ClientStack
3158 handlerRequestWearables(); 3144 handlerRequestWearables();
3159 } 3145 }
3160 3146
3161
3162 handlerRequestAvatarsData = OnRequestAvatarsData; 3147 handlerRequestAvatarsData = OnRequestAvatarsData;
3163 3148
3164 if (handlerRequestAvatarsData != null) 3149 if (handlerRequestAvatarsData != null)
@@ -3166,7 +3151,6 @@ namespace OpenSim.Region.ClientStack
3166 handlerRequestAvatarsData(this); 3151 handlerRequestAvatarsData(this);
3167 } 3152 }
3168 3153
3169
3170 break; 3154 break;
3171 case PacketType.AgentSetAppearance: 3155 case PacketType.AgentSetAppearance:
3172 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack; 3156 AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
@@ -3196,12 +3180,9 @@ namespace OpenSim.Region.ClientStack
3196 { 3180 {
3197 handlerAvatarNowWearing(this, wearingArgs); 3181 handlerAvatarNowWearing(this, wearingArgs);
3198 } 3182 }
3199
3200
3201 } 3183 }
3202 break; 3184 break;
3203 case PacketType.RezSingleAttachmentFromInv: 3185 case PacketType.RezSingleAttachmentFromInv:
3204
3205 handlerRezSingleAttachment = OnRezSingleAttachmentFromInv; 3186 handlerRezSingleAttachment = OnRezSingleAttachmentFromInv;
3206 if (handlerRezSingleAttachment != null) 3187 if (handlerRezSingleAttachment != null)
3207 { 3188 {
@@ -3212,8 +3193,6 @@ namespace OpenSim.Region.ClientStack
3212 3193
3213 break; 3194 break;
3214 case PacketType.ObjectAttach: 3195 case PacketType.ObjectAttach:
3215
3216
3217 if (OnObjectAttach != null) 3196 if (OnObjectAttach != null)
3218 { 3197 {
3219 ObjectAttachPacket att = (ObjectAttachPacket)Pack; 3198 ObjectAttachPacket att = (ObjectAttachPacket)Pack;
@@ -3234,11 +3213,8 @@ namespace OpenSim.Region.ClientStack
3234 if (handlerSetAlwaysRun != null) 3213 if (handlerSetAlwaysRun != null)
3235 handlerSetAlwaysRun(this, run.AgentData.AlwaysRun); 3214 handlerSetAlwaysRun(this, run.AgentData.AlwaysRun);
3236 3215
3237
3238
3239 break; 3216 break;
3240 case PacketType.CompleteAgentMovement: 3217 case PacketType.CompleteAgentMovement:
3241
3242 handlerCompleteMovementToRegion = OnCompleteMovementToRegion; 3218 handlerCompleteMovementToRegion = OnCompleteMovementToRegion;
3243 if (handlerCompleteMovementToRegion != null) 3219 if (handlerCompleteMovementToRegion != null)
3244 { 3220 {
@@ -3294,7 +3270,7 @@ namespace OpenSim.Region.ClientStack
3294 handlerAgentRequestSit = OnAgentRequestSit; 3270 handlerAgentRequestSit = OnAgentRequestSit;
3295 if (handlerAgentRequestSit != null) 3271 if (handlerAgentRequestSit != null)
3296 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID, 3272 handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
3297 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset); 3273 agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
3298 } 3274 }
3299 break; 3275 break;
3300 case PacketType.AgentSit: 3276 case PacketType.AgentSit:
@@ -3590,7 +3566,6 @@ namespace OpenSim.Region.ClientStack
3590 { 3566 {
3591 ObjectPermissionsPacket.ObjectDataBlock permChanges = newobjPerms.ObjectData[i]; 3567 ObjectPermissionsPacket.ObjectDataBlock permChanges = newobjPerms.ObjectData[i];
3592 3568
3593
3594 byte field = permChanges.Field; 3569 byte field = permChanges.Field;
3595 uint localID = permChanges.ObjectLocalID; 3570 uint localID = permChanges.ObjectLocalID;
3596 uint mask = permChanges.Mask; 3571 uint mask = permChanges.Mask;
@@ -3615,14 +3590,12 @@ namespace OpenSim.Region.ClientStack
3615 // Unfortunately, we have to pass the event the packet because objData is an array 3590 // Unfortunately, we have to pass the event the packet because objData is an array
3616 // That means multiple object perms may be updated in a single packet. 3591 // That means multiple object perms may be updated in a single packet.
3617 3592
3618
3619 break; 3593 break;
3620 3594
3621 case PacketType.RequestObjectPropertiesFamily: 3595 case PacketType.RequestObjectPropertiesFamily:
3622 //This powers the little tooltip that appears when you move your mouse over an object 3596 //This powers the little tooltip that appears when you move your mouse over an object
3623 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack; 3597 RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack;
3624 3598
3625
3626 RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData; 3599 RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData;
3627 3600
3628 handlerRequestObjectPropertiesFamily = OnRequestObjectPropertiesFamily; 3601 handlerRequestObjectPropertiesFamily = OnRequestObjectPropertiesFamily;
@@ -3682,7 +3655,6 @@ namespace OpenSim.Region.ClientStack
3682 3655
3683 if (handlerAssetUploadRequest != null) 3656 if (handlerAssetUploadRequest != null)
3684 { 3657 {
3685
3686 handlerAssetUploadRequest(this, temp, 3658 handlerAssetUploadRequest(this, temp,
3687 request.AssetBlock.TransactionID, request.AssetBlock.Type, 3659 request.AssetBlock.TransactionID, request.AssetBlock.Type,
3688 request.AssetBlock.AssetData, request.AssetBlock.StoreLocal, 3660 request.AssetBlock.AssetData, request.AssetBlock.StoreLocal,
@@ -3723,7 +3695,6 @@ namespace OpenSim.Region.ClientStack
3723 handlerCreateInventoryFolder = OnCreateNewInventoryFolder; 3695 handlerCreateInventoryFolder = OnCreateNewInventoryFolder;
3724 if (handlerCreateInventoryFolder != null) 3696 if (handlerCreateInventoryFolder != null)
3725 { 3697 {
3726
3727 handlerCreateInventoryFolder(this, invFolder.FolderData.FolderID, 3698 handlerCreateInventoryFolder(this, invFolder.FolderData.FolderID,
3728 (ushort)invFolder.FolderData.Type, 3699 (ushort)invFolder.FolderData.Type,
3729 Util.FieldToString(invFolder.FolderData.Name), 3700 Util.FieldToString(invFolder.FolderData.Name),
@@ -3810,14 +3781,12 @@ namespace OpenSim.Region.ClientStack
3810 handlerFetchInventoryDescendents = OnFetchInventoryDescendents; 3781 handlerFetchInventoryDescendents = OnFetchInventoryDescendents;
3811 if (handlerFetchInventoryDescendents != null) 3782 if (handlerFetchInventoryDescendents != null)
3812 { 3783 {
3813
3814 handlerFetchInventoryDescendents(this, Fetch.InventoryData.FolderID, Fetch.InventoryData.OwnerID, 3784 handlerFetchInventoryDescendents(this, Fetch.InventoryData.FolderID, Fetch.InventoryData.OwnerID,
3815 Fetch.InventoryData.FetchFolders, Fetch.InventoryData.FetchItems, 3785 Fetch.InventoryData.FetchFolders, Fetch.InventoryData.FetchItems,
3816 Fetch.InventoryData.SortOrder); 3786 Fetch.InventoryData.SortOrder);
3817 } 3787 }
3818 break; 3788 break;
3819 case PacketType.PurgeInventoryDescendents: 3789 case PacketType.PurgeInventoryDescendents:
3820
3821 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack; 3790 PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack;
3822 3791
3823 handlerPurgeInventoryDescendents = OnPurgeInventoryDescendents; 3792 handlerPurgeInventoryDescendents = OnPurgeInventoryDescendents;
@@ -4092,7 +4061,6 @@ namespace OpenSim.Region.ClientStack
4092 handlerMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID); 4061 handlerMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID);
4093 } 4062 }
4094 4063
4095
4096 break; 4064 break;
4097 case PacketType.UUIDNameRequest: 4065 case PacketType.UUIDNameRequest:
4098 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack; 4066 UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
@@ -4249,7 +4217,6 @@ namespace OpenSim.Region.ClientStack
4249 } 4217 }
4250 break; 4218 break;
4251 4219
4252
4253 #endregion 4220 #endregion
4254 4221
4255 #region GodPackets 4222 #region GodPackets
@@ -4274,7 +4241,6 @@ namespace OpenSim.Region.ClientStack
4274 4241
4275 GodKickUserPacket gkupack = (GodKickUserPacket)Pack; 4242 GodKickUserPacket gkupack = (GodKickUserPacket)Pack;
4276 4243
4277
4278 if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID) 4244 if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID)
4279 { 4245 {
4280 handlerGodKickUser = OnGodKickUser; 4246 handlerGodKickUser = OnGodKickUser;
@@ -4301,12 +4267,10 @@ namespace OpenSim.Region.ClientStack
4301 //OutPacket(kupack, ThrottleOutPacketType.Task); 4267 //OutPacket(kupack, ThrottleOutPacketType.Task);
4302 break; 4268 break;
4303 4269
4304
4305 #endregion 4270 #endregion
4306 4271
4307 #region unimplemented handlers 4272 #region unimplemented handlers
4308 4273
4309
4310 case PacketType.StartPingCheck: 4274 case PacketType.StartPingCheck:
4311 // Send the client the ping response back 4275 // Send the client the ping response back
4312 // Pass the same PingID in the matching packet 4276 // Pass the same PingID in the matching packet
@@ -4354,11 +4318,6 @@ namespace OpenSim.Region.ClientStack
4354 // TODO: handle this packet 4318 // TODO: handle this packet
4355 m_log.Warn("[CLIENT]: unhandled MuteListRequest packet"); 4319 m_log.Warn("[CLIENT]: unhandled MuteListRequest packet");
4356 break; 4320 break;
4357 //case PacketType.AgentDataUpdateRequest:
4358 // TODO: handle this packet
4359 //m_log.Warn("[CLIENT]: unhandled AgentDataUpdateRequest packet");
4360 //break;
4361
4362 case PacketType.ParcelDwellRequest: 4321 case PacketType.ParcelDwellRequest:
4363 // TODO: handle this packet 4322 // TODO: handle this packet
4364 m_log.Warn("[CLIENT]: unhandled ParcelDwellRequest packet"); 4323 m_log.Warn("[CLIENT]: unhandled ParcelDwellRequest packet");
diff --git a/OpenSim/Region/Communications/Local/LocalLoginService.cs b/OpenSim/Region/Communications/Local/LocalLoginService.cs
index 6088890..3a7e324 100644
--- a/OpenSim/Region/Communications/Local/LocalLoginService.cs
+++ b/OpenSim/Region/Communications/Local/LocalLoginService.cs
@@ -246,7 +246,6 @@ namespace OpenSim.Region.Communications.Local
246 246
247 return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID); 247 return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID);
248 } 248 }
249
250 } 249 }
251 } 250 }
252} 251}