From 9f7639fd6d2d7fd37587223259303377ee15bab4 Mon Sep 17 00:00:00 2001
From: Jeff Ames
Date: Tue, 18 Mar 2008 03:41:05 +0000
Subject: Formatting cleanup.
---
OpenSim/Framework/Communications/LoginService.cs | 163 ++++++++++-----------
.../Framework/Communications/UserManagerBase.cs | 12 +-
OpenSim/Framework/Data.MySQL/MySQLManager.cs | 31 ++--
OpenSim/Framework/Data.MySQL/MySQLUserData.cs | 46 ++----
OpenSim/Grid/UserServer/UserLoginService.cs | 1 -
OpenSim/Region/ClientStack/ClientView.cs | 53 +------
.../Communications/Local/LocalLoginService.cs | 1 -
7 files changed, 117 insertions(+), 190 deletions(-)
(limited to 'OpenSim')
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
string clientversion = (string)requestData["version"];
m_log.Info("[LOGIN]: Client Version " + clientversion + " for " + firstname + " " + lastname);
}
-
userProfile = GetTheUser(firstname, lastname);
if (userProfile == null)
@@ -398,7 +397,6 @@ namespace OpenSim.Framework.UserManagement
public Hashtable ProcessHTMLLogin(Hashtable keysvals)
{
-
// Matches all unspecified characters
// Currently specified,; lowercase letters, upper case letters, numbers, underline
// period, space, parens, and dash.
@@ -422,44 +420,42 @@ namespace OpenSim.Framework.UserManagement
// the client requires the HTML form field be named 'username'
// however, the data it sends when it loads the first time is 'firstname'
// another one of those little nuances.
-
if (keysvals.Contains("firstname"))
- firstname = wfcut.Replace((string)keysvals["firstname"],String.Empty,99999);
+ firstname = wfcut.Replace((string)keysvals["firstname"], String.Empty, 99999);
+
if (keysvals.Contains("username"))
- firstname = wfcut.Replace((string)keysvals["username"],String.Empty,99999);
+ firstname = wfcut.Replace((string)keysvals["username"], String.Empty, 99999);
if (keysvals.Contains("lastname"))
- lastname = wfcut.Replace((string)keysvals["lastname"],String.Empty,99999);
+ lastname = wfcut.Replace((string)keysvals["lastname"], String.Empty, 99999);
if (keysvals.Contains("location"))
- location = wfcut.Replace((string)keysvals["location"],String.Empty,99999);
+ location = wfcut.Replace((string)keysvals["location"], String.Empty, 99999);
if (keysvals.Contains("region"))
- region = wfcut.Replace((string)keysvals["region"],String.Empty,99999);
+ region = wfcut.Replace((string)keysvals["region"], String.Empty, 99999);
if (keysvals.Contains("grid"))
- grid = wfcut.Replace((string)keysvals["grid"],String.Empty,99999);
+ grid = wfcut.Replace((string)keysvals["grid"], String.Empty, 99999);
if (keysvals.Contains("channel"))
- channel = wfcut.Replace((string)keysvals["channel"],String.Empty,99999);
+ channel = wfcut.Replace((string)keysvals["channel"], String.Empty, 99999);
if (keysvals.Contains("version"))
- version = wfcut.Replace((string)keysvals["version"],String.Empty,99999);
+ version = wfcut.Replace((string)keysvals["version"], String.Empty, 99999);
if (keysvals.Contains("lang"))
- lang = wfcut.Replace((string)keysvals["lang"],String.Empty,99999);
+ lang = wfcut.Replace((string)keysvals["lang"], String.Empty, 99999);
if (keysvals.Contains("password"))
- password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999);
+ password = wfcut.Replace((string)keysvals["password"], String.Empty, 99999);
-
// load our login form.
- string loginform = GetLoginForm(firstname,lastname,location,region,grid,channel,version,lang,password,errormessages);
+ string loginform = GetLoginForm(firstname, lastname, location, region, grid, channel, version, lang, password, errormessages);
if (keysvals.ContainsKey("show_login_form"))
{
-
UserProfileData user = GetTheUser(firstname, lastname);
bool goodweblogin = false;
@@ -472,9 +468,10 @@ namespace OpenSim.Framework.UserManagement
m_userManager.StoreWebLoginKey(user.UUID, webloginkey);
statuscode = 301;
- string redirectURL = "about:blank?redirect-http-hack=" + System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" +
- lastname +
- "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString());
+ string redirectURL = "about:blank?redirect-http-hack=" +
+ System.Web.HttpUtility.UrlEncode("secondlife:///app/login?first_name=" + firstname + "&last_name=" +
+ lastname +
+ "&location=" + location + "&grid=Other&web_login_key=" + webloginkey.ToString());
//m_log.Info("[WEB]: R:" + redirectURL);
returnactions["int_response_code"] = statuscode;
returnactions["str_redirect_location"] = redirectURL;
@@ -487,11 +484,7 @@ namespace OpenSim.Framework.UserManagement
loginform = GetLoginForm(firstname, lastname, location, region, grid, channel, version, lang, password, errormessages);
returnactions["int_response_code"] = statuscode;
returnactions["str_response_string"] = loginform;
-
}
-
-
-
}
else
{
@@ -499,7 +492,6 @@ namespace OpenSim.Framework.UserManagement
returnactions["str_response_string"] = loginform;
}
return returnactions;
-
}
public string GetLoginForm(string firstname, string lastname, string location, string region,
@@ -537,67 +529,66 @@ namespace OpenSim.Framework.UserManagement
public string GetDefaultLoginForm()
{
string responseString =
- "";
- responseString = responseString + "";
- responseString = responseString + "
";
- responseString = responseString +
- "";
- responseString = responseString + "";
- responseString = responseString + "";
- responseString = responseString + "OpenSim Login";
- responseString = responseString + "
";
- responseString = responseString + "";
+ "";
+ responseString += "";
+ responseString += "";
+ responseString += "
";
+ responseString += "
";
+ responseString += "
";
+ responseString += "
OpenSim Login";
+ responseString += "
";
+ responseString += "
";
- responseString = responseString + "
";
- responseString = responseString + "";
- responseString = responseString + "
";
- responseString = responseString + "
";
- responseString = responseString + "";
- responseString = responseString + "";
+ responseString += "";
+ responseString += "";
+ responseString += "";
+ responseString += "";
+ responseString += "";
+ responseString += "";
return responseString;
}
@@ -611,7 +602,6 @@ namespace OpenSim.Framework.UserManagement
return m_userManager.CommitAgent(ref profile);
}
-
///
/// Checks a user against it's password hash
///
@@ -638,7 +628,7 @@ namespace OpenSim.Framework.UserManagement
//m_log.Info("[LOGIN]: userprofile:" + profile.passwordHash + " SubCT:" + password);
passwordSuccess = (profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase)
- || profile.passwordHash.Equals(password,StringComparison.InvariantCultureIgnoreCase));
+ || profile.passwordHash.Equals(password, StringComparison.InvariantCultureIgnoreCase));
return passwordSuccess;
}
@@ -699,7 +689,6 @@ namespace OpenSim.Framework.UserManagement
buddyitem.BuddyRightsHave = (int)fl.FriendListOwnerPerms;
buddyitem.BuddyRightsGiven = (int) fl.FriendPerms;
buddylistreturn.AddNewBuddy(buddyitem);
-
}
return buddylistreturn;
}
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
/// A List of FriendListItems that contains info about the user's friends
public List GetUserFriendList(LLUUID ownerID)
{
-
foreach (KeyValuePair plugin in _plugins)
{
try
@@ -208,12 +207,10 @@ namespace OpenSim.Framework.UserManagement
}
return null;
-
}
public void StoreWebLoginKey(LLUUID agentID, LLUUID webLoginKey)
{
-
foreach (KeyValuePair plugin in _plugins)
{
try
@@ -240,10 +237,8 @@ namespace OpenSim.Framework.UserManagement
m_log.Info("[USERSTORAGE]: Unable to AddNewUserFriend via " + plugin.Key + "(" + e.ToString() + ")");
}
}
-
}
-
public void RemoveUserFriend(LLUUID friendlistowner, LLUUID friend)
{
foreach (KeyValuePair plugin in _plugins)
@@ -273,6 +268,7 @@ namespace OpenSim.Framework.UserManagement
}
}
}
+
///
/// Loads a user agent by name (not called directly)
///
@@ -295,7 +291,10 @@ namespace OpenSim.Framework.UserManagement
return null;
}
- // TODO: document
+ ///
+ /// Resets the currentAgent in the user profile
+ ///
+ /// The agent's ID
public void clearUserAgent(LLUUID agentID)
{
UserProfileData profile = GetUserProfile(agentID);
@@ -459,7 +458,6 @@ namespace OpenSim.Framework.UserManagement
// If currentagent is null, we can't reference it here or the UserServer crashes!
m_log.Info("[LOGOUT]: didn't save logout position: " + userid.ToString());
}
-
}
else
{
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
string dllName = module.Assembly.ManifestModule.Name;
Version dllVersion = module.Assembly.GetName().Version;
-
return
string.Format("{0}.{1}.{2}.{3}", dllVersion.Major, dllVersion.Minor, dllVersion.Build,
dllVersion.Revision);
}
-
///
/// Extract a named string resource from the embedded resources
///
@@ -156,7 +154,9 @@ namespace OpenSim.Framework.Data.MySQL
string[] names = assem.GetManifestResourceNames();
foreach (string s in names)
+ {
if (s.EndsWith(name))
+ {
using (Stream resource = assem.GetManifestResourceStream(s))
{
using (StreamReader resourceReader = new StreamReader(resource))
@@ -165,6 +165,8 @@ namespace OpenSim.Framework.Data.MySQL
return resourceString;
}
}
+ }
+ }
throw new Exception(string.Format("Resource '{0}' was not found", name));
}
@@ -214,8 +216,7 @@ namespace OpenSim.Framework.Data.MySQL
}
}
-
- // at some time this code should be cleaned up
+ // TODO: at some time this code should be cleaned up
///
/// Runs a query with protection against SQL Injection by using parameterised input.
@@ -249,7 +250,7 @@ namespace OpenSim.Framework.Data.MySQL
{
}
- // Try reopen it
+ // Try to reopen it
try
{
dbcon = new MySqlConnection(connectionString);
@@ -368,7 +369,7 @@ namespace OpenSim.Framework.Data.MySQL
retval.reservationMinY = Convert.ToInt32(reader["resYMin"].ToString());
retval.reservationName = (string) reader["resName"];
retval.status = Convert.ToInt32(reader["status"].ToString()) == 1;
- LLUUID.TryParse((string) reader["userUUID"], out retval.userUUID);
+ LLUUID.TryParse((string) reader["userUUID"], out retval.userUUID);
}
else
{
@@ -458,22 +459,22 @@ namespace OpenSim.Framework.Data.MySQL
else
retval.profileAboutText = (string) reader["profileAboutText"];
- if (reader.IsDBNull( reader.GetOrdinal( "profileFirstText" ) ) )
+ if (reader.IsDBNull(reader.GetOrdinal("profileFirstText")))
retval.profileFirstText = "";
else
retval.profileFirstText = (string)reader["profileFirstText"];
- if (reader.IsDBNull( reader.GetOrdinal( "profileImage" ) ) )
+ if (reader.IsDBNull(reader.GetOrdinal("profileImage")))
retval.profileImage = LLUUID.Zero;
else
LLUUID.TryParse((string)reader["profileImage"], out retval.profileImage);
- if (reader.IsDBNull( reader.GetOrdinal( "profileFirstImage" ) ) )
+ if (reader.IsDBNull(reader.GetOrdinal("profileFirstImage")))
retval.profileFirstImage = LLUUID.Zero;
else
LLUUID.TryParse((string)reader["profileFirstImage"], out retval.profileFirstImage);
- if( reader.IsDBNull( reader.GetOrdinal( "webLoginKey" ) ) )
+ if(reader.IsDBNull(reader.GetOrdinal("webLoginKey")))
{
retval.webLoginKey = LLUUID.Zero;
}
@@ -489,7 +490,6 @@ namespace OpenSim.Framework.Data.MySQL
return retval;
}
-
///
/// Inserts a new row into the log database
///
@@ -534,7 +534,6 @@ namespace OpenSim.Framework.Data.MySQL
return returnval;
}
-
///
/// Creates a new user and inserts it into the database
///
@@ -630,7 +629,7 @@ namespace OpenSim.Framework.Data.MySQL
return returnval;
}
- ///
+ ///
/// Creates a new user and inserts it into the database
///
/// User ID
@@ -823,6 +822,7 @@ namespace OpenSim.Framework.Data.MySQL
return returnval;
}
+
///
/// Delete a region from the database
///
@@ -833,14 +833,13 @@ namespace OpenSim.Framework.Data.MySQL
{
bool returnval = false;
- string sql =
- "DELETE FROM regions WHERE uuid = ?uuid;";
+ string sql = "DELETE FROM regions WHERE uuid = ?uuid;";
Dictionary parameters = new Dictionary();
try
{
- parameters["?uuid"] = uuid;
+ parameters["?uuid"] = uuid;
IDbCommand result = Query(sql, parameters);
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
UpgradeAgentsTable(tableList[m_agentsTableName]);
UpgradeUsersTable(tableList[m_usersTableName]);
UpgradeFriendsTable(tableList[m_userFriendsTableName]);
-
}
///
@@ -227,7 +226,6 @@ namespace OpenSim.Framework.Data.MySQL
"(?friendID,?ownerID,?friendPerms,?datetimestamp)",
param);
adder.ExecuteNonQuery();
-
}
}
catch (Exception e)
@@ -244,23 +242,21 @@ namespace OpenSim.Framework.Data.MySQL
param["?ownerID"] = friendlistowner.UUID.ToString();
param["?friendID"] = friend.UUID.ToString();
-
try
{
lock (database)
{
IDbCommand updater =
database.Query(
- "delete from " + m_userFriendsTableName + " where ownerID = ?ownerID and friendID = ?friendID",
+ "delete from " + m_userFriendsTableName + " where ownerID = ?ownerID and friendID = ?friendID",
param);
updater.ExecuteNonQuery();
updater =
database.Query(
- "delete from " + m_userFriendsTableName + " where ownerID = ?friendID and friendID = ?ownerID",
+ "delete from " + m_userFriendsTableName + " where ownerID = ?friendID and friendID = ?ownerID",
param);
updater.ExecuteNonQuery();
-
}
}
catch (Exception e)
@@ -270,13 +266,13 @@ namespace OpenSim.Framework.Data.MySQL
return;
}
}
+
public void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms)
{
Dictionary param = new Dictionary();
param["?ownerID"] = friendlistowner.UUID.ToString();
param["?friendID"] = friend.UUID.ToString();
param["?friendPerms"] = perms.ToString();
-
try
{
@@ -284,12 +280,11 @@ namespace OpenSim.Framework.Data.MySQL
{
IDbCommand updater =
database.Query(
- "update " + m_userFriendsTableName +
- " SET friendPerms = ?friendPerms " +
- "where ownerID = ?ownerID and friendID = ?friendID",
+ "update " + m_userFriendsTableName +
+ " SET friendPerms = ?friendPerms " +
+ "where ownerID = ?ownerID and friendID = ?friendID",
param);
updater.ExecuteNonQuery();
-
}
}
catch (Exception e)
@@ -300,7 +295,6 @@ namespace OpenSim.Framework.Data.MySQL
}
}
-
public List GetUserFriendList(LLUUID friendlistowner)
{
List Lfli = new List();
@@ -315,12 +309,11 @@ namespace OpenSim.Framework.Data.MySQL
//Left Join userfriends to itself
IDbCommand result =
database.Query(
- "select a.ownerID,a.friendID,a.friendPerms,b.friendPerms as ownerperms from " + m_userFriendsTableName + " as a, " + m_userFriendsTableName + " as b" +
- " where a.ownerID = ?ownerID and b.ownerID = a.friendID and b.friendID = a.ownerID",
+ "select a.ownerID,a.friendID,a.friendPerms,b.friendPerms as ownerperms from " + m_userFriendsTableName + " as a, " + m_userFriendsTableName + " as b" +
+ " where a.ownerID = ?ownerID and b.ownerID = a.friendID and b.friendID = a.ownerID",
param);
IDataReader reader = result.ExecuteReader();
-
while (reader.Read())
{
FriendListItem fli = new FriendListItem();
@@ -354,7 +347,6 @@ namespace OpenSim.Framework.Data.MySQL
m_log.Info("[USER]: Stub UpdateUserCUrrentRegion called");
}
-
public List GeneratePickerResults(LLUUID queryID, string query)
{
List returnlist = new List();
@@ -378,7 +370,6 @@ namespace OpenSim.Framework.Data.MySQL
param);
IDataReader reader = result.ExecuteReader();
-
while (reader.Read())
{
Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
@@ -413,7 +404,6 @@ namespace OpenSim.Framework.Data.MySQL
param);
IDataReader reader = result.ExecuteReader();
-
while (reader.Read())
{
Framework.AvatarPickerAvatar user = new Framework.AvatarPickerAvatar();
@@ -489,7 +479,6 @@ namespace OpenSim.Framework.Data.MySQL
public void StoreWebLoginKey(LLUUID AgentID, LLUUID WebLoginKey)
{
-
Dictionary param = new Dictionary();
param["?UUID"] = AgentID.UUID.ToString();
param["?webLoginKey"] = WebLoginKey.UUID.ToString();
@@ -500,11 +489,10 @@ namespace OpenSim.Framework.Data.MySQL
{
IDbCommand updater =
database.Query(
- "update " + m_usersTableName + " SET webLoginKey = ?webLoginKey " +
- "where UUID = ?UUID",
+ "update " + m_usersTableName + " SET webLoginKey = ?webLoginKey " +
+ "where UUID = ?UUID",
param);
updater.ExecuteNonQuery();
-
}
}
catch (Exception e)
@@ -513,10 +501,6 @@ namespace OpenSim.Framework.Data.MySQL
m_log.Error(e.ToString());
return;
}
-
-
-
-
}
///
@@ -605,11 +589,11 @@ namespace OpenSim.Framework.Data.MySQL
/// The profile data to use to update the DB
public bool UpdateUserProfile(UserProfileData user)
{
- database.updateUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt
- , user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z, user.homeLookAt.X
- , user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI
- , user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask, user.profileAboutText
- , user.profileFirstText, user.profileImage, user.profileFirstImage, user.webLoginKey);
+ database.updateUserRow(user.UUID, user.username, user.surname, user.passwordHash, user.passwordSalt,
+ user.homeRegion, user.homeLocation.X, user.homeLocation.Y, user.homeLocation.Z, user.homeLookAt.X,
+ user.homeLookAt.Y, user.homeLookAt.Z, user.created, user.lastLogin, user.userInventoryURI,
+ user.userAssetURI, user.profileCanDoMask, user.profileWantDoMask, user.profileAboutText,
+ user.profileFirstText, user.profileImage, user.profileFirstImage, user.webLoginKey);
return true;
}
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;
namespace OpenSim.Grid.UserServer
{
-
public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID,
ulong regionhandle, float positionX, float positionY, float positionZ, string firstname, string lastname);
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
}
else
{
- //Need some extra space in case we need to add proxy information to the message later
- Buffer.BlockCopy(sendbuffer, 0, ZeroOutBuffer, 0, sendbuffer.Length);
- m_networkServer.SendPacketTo(ZeroOutBuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode);
+ //Need some extra space in case we need to add proxy information to the message later
+ Buffer.BlockCopy(sendbuffer, 0, ZeroOutBuffer, 0, sendbuffer.Length);
+ m_networkServer.SendPacketTo(ZeroOutBuffer, sendbuffer.Length, SocketFlags.None, m_circuitCode);
}
-
}
catch (Exception e)
{
@@ -2749,7 +2748,6 @@ namespace OpenSim.Region.ClientStack
}
}
-
// Handle PacketAck packets
if (NewPack.Type == PacketType.PacketAck)
{
@@ -2958,7 +2956,6 @@ namespace OpenSim.Region.ClientStack
handlerRequestAvatarProperties(this, avatarProperties.AgentData.AvatarID);
}
-
break;
case PacketType.ChatFromViewer:
ChatFromViewerPacket inchatpack = (ChatFromViewerPacket)Pack;
@@ -3003,8 +3000,8 @@ namespace OpenSim.Region.ClientStack
UserProfile.profileImage = Properties.ImageID;
handlerUpdateAvatarProperties(this, UserProfile);
- }
- break;
+ }
+ break;
case PacketType.ScriptDialogReply:
ScriptDialogReplyPacket rdialog = (ScriptDialogReplyPacket)Pack;
@@ -3042,8 +3039,6 @@ namespace OpenSim.Region.ClientStack
msgpack.MessageBlock.Position, msgpack.MessageBlock.RegionID,
msgpack.MessageBlock.BinaryBucket);
}
-
-
break;
case PacketType.AcceptFriendship:
@@ -3065,10 +3060,6 @@ namespace OpenSim.Region.ClientStack
{
handlerApproveFriendRequest(this, agentID, transactionID, callingCardFolders);
}
-
-
-
-
break;
case PacketType.TerminateFriendship:
TerminateFriendshipPacket tfriendpack = (TerminateFriendshipPacket)Pack;
@@ -3080,8 +3071,6 @@ namespace OpenSim.Region.ClientStack
{
handlerTerminateFriendship(this, listOwnerAgentID, exFriendID);
}
-
-
break;
case PacketType.RezObject:
RezObjectPacket rezPacket = (RezObjectPacket)Pack;
@@ -3107,7 +3096,6 @@ namespace OpenSim.Region.ClientStack
rezPacket.RezData.RezSelected, rezPacket.RezData.RemoveItem,
rezPacket.RezData.FromTaskID);
}
-
break;
case PacketType.DeRezObject:
handlerDeRezObject = OnDeRezObject;
@@ -3115,7 +3103,6 @@ namespace OpenSim.Region.ClientStack
{
handlerDeRezObject(Pack, this);
}
-
break;
case PacketType.ModifyLand:
ModifyLandPacket modify = (ModifyLandPacket)Pack;
@@ -3124,7 +3111,6 @@ namespace OpenSim.Region.ClientStack
{
if (OnModifyTerrain != null)
{
-
for (int i = 0; i < modify.ParcelData.Length; i++)
{
handlerModifyTerrain = OnModifyTerrain;
@@ -3158,7 +3144,6 @@ namespace OpenSim.Region.ClientStack
handlerRequestWearables();
}
-
handlerRequestAvatarsData = OnRequestAvatarsData;
if (handlerRequestAvatarsData != null)
@@ -3166,7 +3151,6 @@ namespace OpenSim.Region.ClientStack
handlerRequestAvatarsData(this);
}
-
break;
case PacketType.AgentSetAppearance:
AgentSetAppearancePacket appear = (AgentSetAppearancePacket)Pack;
@@ -3196,12 +3180,9 @@ namespace OpenSim.Region.ClientStack
{
handlerAvatarNowWearing(this, wearingArgs);
}
-
-
}
break;
case PacketType.RezSingleAttachmentFromInv:
-
handlerRezSingleAttachment = OnRezSingleAttachmentFromInv;
if (handlerRezSingleAttachment != null)
{
@@ -3212,8 +3193,6 @@ namespace OpenSim.Region.ClientStack
break;
case PacketType.ObjectAttach:
-
-
if (OnObjectAttach != null)
{
ObjectAttachPacket att = (ObjectAttachPacket)Pack;
@@ -3234,11 +3213,8 @@ namespace OpenSim.Region.ClientStack
if (handlerSetAlwaysRun != null)
handlerSetAlwaysRun(this, run.AgentData.AlwaysRun);
-
-
break;
case PacketType.CompleteAgentMovement:
-
handlerCompleteMovementToRegion = OnCompleteMovementToRegion;
if (handlerCompleteMovementToRegion != null)
{
@@ -3294,7 +3270,7 @@ namespace OpenSim.Region.ClientStack
handlerAgentRequestSit = OnAgentRequestSit;
if (handlerAgentRequestSit != null)
handlerAgentRequestSit(this, agentRequestSit.AgentData.AgentID,
- agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
+ agentRequestSit.TargetObject.TargetID, agentRequestSit.TargetObject.Offset);
}
break;
case PacketType.AgentSit:
@@ -3590,7 +3566,6 @@ namespace OpenSim.Region.ClientStack
{
ObjectPermissionsPacket.ObjectDataBlock permChanges = newobjPerms.ObjectData[i];
-
byte field = permChanges.Field;
uint localID = permChanges.ObjectLocalID;
uint mask = permChanges.Mask;
@@ -3615,14 +3590,12 @@ namespace OpenSim.Region.ClientStack
// Unfortunately, we have to pass the event the packet because objData is an array
// That means multiple object perms may be updated in a single packet.
-
break;
case PacketType.RequestObjectPropertiesFamily:
//This powers the little tooltip that appears when you move your mouse over an object
RequestObjectPropertiesFamilyPacket packToolTip = (RequestObjectPropertiesFamilyPacket)Pack;
-
RequestObjectPropertiesFamilyPacket.ObjectDataBlock packObjBlock = packToolTip.ObjectData;
handlerRequestObjectPropertiesFamily = OnRequestObjectPropertiesFamily;
@@ -3682,7 +3655,6 @@ namespace OpenSim.Region.ClientStack
if (handlerAssetUploadRequest != null)
{
-
handlerAssetUploadRequest(this, temp,
request.AssetBlock.TransactionID, request.AssetBlock.Type,
request.AssetBlock.AssetData, request.AssetBlock.StoreLocal,
@@ -3723,7 +3695,6 @@ namespace OpenSim.Region.ClientStack
handlerCreateInventoryFolder = OnCreateNewInventoryFolder;
if (handlerCreateInventoryFolder != null)
{
-
handlerCreateInventoryFolder(this, invFolder.FolderData.FolderID,
(ushort)invFolder.FolderData.Type,
Util.FieldToString(invFolder.FolderData.Name),
@@ -3810,14 +3781,12 @@ namespace OpenSim.Region.ClientStack
handlerFetchInventoryDescendents = OnFetchInventoryDescendents;
if (handlerFetchInventoryDescendents != null)
{
-
handlerFetchInventoryDescendents(this, Fetch.InventoryData.FolderID, Fetch.InventoryData.OwnerID,
Fetch.InventoryData.FetchFolders, Fetch.InventoryData.FetchItems,
Fetch.InventoryData.SortOrder);
}
break;
case PacketType.PurgeInventoryDescendents:
-
PurgeInventoryDescendentsPacket Purge = (PurgeInventoryDescendentsPacket)Pack;
handlerPurgeInventoryDescendents = OnPurgeInventoryDescendents;
@@ -4092,7 +4061,6 @@ namespace OpenSim.Region.ClientStack
handlerMoneyBalanceRequest(this, moneybalancerequestpacket.AgentData.AgentID, moneybalancerequestpacket.AgentData.SessionID, moneybalancerequestpacket.MoneyData.TransactionID);
}
-
break;
case PacketType.UUIDNameRequest:
UUIDNameRequestPacket incoming = (UUIDNameRequestPacket)Pack;
@@ -4249,7 +4217,6 @@ namespace OpenSim.Region.ClientStack
}
break;
-
#endregion
#region GodPackets
@@ -4274,7 +4241,6 @@ namespace OpenSim.Region.ClientStack
GodKickUserPacket gkupack = (GodKickUserPacket)Pack;
-
if (gkupack.UserInfo.GodSessionID == SessionId && AgentId == gkupack.UserInfo.GodID)
{
handlerGodKickUser = OnGodKickUser;
@@ -4301,12 +4267,10 @@ namespace OpenSim.Region.ClientStack
//OutPacket(kupack, ThrottleOutPacketType.Task);
break;
-
#endregion
#region unimplemented handlers
-
case PacketType.StartPingCheck:
// Send the client the ping response back
// Pass the same PingID in the matching packet
@@ -4354,11 +4318,6 @@ namespace OpenSim.Region.ClientStack
// TODO: handle this packet
m_log.Warn("[CLIENT]: unhandled MuteListRequest packet");
break;
- //case PacketType.AgentDataUpdateRequest:
- // TODO: handle this packet
- //m_log.Warn("[CLIENT]: unhandled AgentDataUpdateRequest packet");
- //break;
-
case PacketType.ParcelDwellRequest:
// TODO: handle this packet
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
return new InventoryData(AgentInventoryArray, userInventory.InventoryRoot.FolderID);
}
-
}
}
}
--
cgit v1.1