* UserProfileData meets code conventions

afrisby
lbsa71 2007-10-05 11:27:46 +00:00
parent 5a65521203
commit ed6168b96b
12 changed files with 456 additions and 456 deletions

View File

@ -162,8 +162,8 @@ namespace OpenSim.Framework.Communications
if (profileData != null)
{
LLUUID profileId = profileData.UUID;
string firstname = profileData.username;
string lastname = profileData.surname;
string firstname = profileData.Firstname;
string lastname = profileData.Lastname;
remote_client.SendNameReply(profileId, firstname, lastname);
}

View File

@ -72,7 +72,7 @@ namespace OpenSim.Framework.UserManagement
else
{
// If we already have a session...
if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline)
if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.agentOnline)
{
// Reject the login
return logResponse.CreateAlreadyLoggedInResponse();
@ -93,16 +93,16 @@ namespace OpenSim.Framework.UserManagement
InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated();
ArrayList InventoryRoot = new ArrayList();
InventoryRoot.Add(InventoryRootHash);
userProfile.rootInventoryFolderID = inventData.RootFolderID;
userProfile.RootInventoryFolderId = inventData.RootFolderID;
// Circuit Code
uint circode = (uint)(Util.RandomClass.Next());
logResponse.Lastname = userProfile.surname;
logResponse.Firstname = userProfile.username;
logResponse.Lastname = userProfile.Lastname;
logResponse.Firstname = userProfile.Firstname;
logResponse.AgentID = agentID.ToStringHyphenated();
logResponse.SessionID = userProfile.currentAgent.sessionID.ToStringHyphenated();
logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToStringHyphenated();
logResponse.SessionID = userProfile.CurrentAgent.sessionID.ToStringHyphenated();
logResponse.SecureSessionID = userProfile.CurrentAgent.secureSessionID.ToStringHyphenated();
logResponse.InventoryRoot = InventoryRoot;
logResponse.InventorySkeleton = AgentInventoryArray;
logResponse.InventoryLibrary = this.GetInventoryLibrary();
@ -172,13 +172,13 @@ namespace OpenSim.Framework.UserManagement
{
MainLog.Instance.Verbose(
"Authenticating " + profile.username + " " + profile.surname);
"Authenticating " + profile.Firstname + " " + profile.Lastname);
password = password.Remove(0, 3); //remove $1$
string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
string s = Util.Md5Hash(password + ":" + profile.PasswordSalt);
return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
return profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
}
/// <summary>

View File

@ -96,7 +96,7 @@ namespace OpenSim.Framework.UserManagement
try
{
UserProfileData profile = plugin.Value.GetUserByUUID(uuid);
profile.currentAgent = getUserAgent(profile.UUID);
profile.CurrentAgent = getUserAgent(profile.UUID);
return profile;
}
catch (Exception e)
@ -121,7 +121,7 @@ namespace OpenSim.Framework.UserManagement
try
{
UserProfileData profile = plugin.Value.GetUserByName(name);
profile.currentAgent = getUserAgent(profile.UUID);
profile.CurrentAgent = getUserAgent(profile.UUID);
return profile;
}
catch (Exception e)
@ -148,7 +148,7 @@ namespace OpenSim.Framework.UserManagement
{
UserProfileData profile = plugin.Value.GetUserByName(fname,lname);
profile.currentAgent = getUserAgent(profile.UUID);
profile.CurrentAgent = getUserAgent(profile.UUID);
return profile;
}
@ -233,7 +233,7 @@ namespace OpenSim.Framework.UserManagement
public void clearUserAgent(LLUUID agentID)
{
UserProfileData profile = GetUserProfile(agentID);
profile.currentAgent = null;
profile.CurrentAgent = null;
setUserProfile(profile);
}
@ -292,8 +292,8 @@ namespace OpenSim.Framework.UserManagement
agent.UUID = profile.UUID;
// Current position (from Home)
agent.currentHandle = profile.homeRegion;
agent.currentPos = profile.homeLocation;
agent.currentHandle = profile.HomeRegion;
agent.currentPos = profile.HomeLocation;
// If user specified additional start, use that
if (requestData.ContainsKey("start"))
@ -326,7 +326,7 @@ namespace OpenSim.Framework.UserManagement
agent.regionID = new LLUUID(); // Fill in later
agent.currentRegion = new LLUUID(); // Fill in later
profile.currentAgent = agent;
profile.CurrentAgent = agent;
}
/// <summary>
@ -349,16 +349,16 @@ namespace OpenSim.Framework.UserManagement
public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
{
UserProfileData user = new UserProfileData();
user.homeLocation = new LLVector3(128, 128, 100);
user.HomeLocation = new LLVector3(128, 128, 100);
user.UUID = LLUUID.Random();
user.username = firstName;
user.surname = lastName;
user.passwordHash = pass;
user.passwordSalt = "";
user.created = Util.UnixTimeSinceEpoch();
user.homeLookAt = new LLVector3(100, 100, 100);
user.homeRegionX = regX;
user.homeRegionY = regY;
user.Firstname = firstName;
user.Lastname = lastName;
user.PasswordHash = pass;
user.PasswordSalt = "";
user.Created = Util.UnixTimeSinceEpoch();
user.HomeLookAt = new LLVector3(100, 100, 100);
user.HomeRegionX = regX;
user.HomeRegionY = regY;
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
{

View File

@ -83,7 +83,7 @@ namespace OpenSim.Framework.Data.DB4o
{
foreach (UserProfileData profile in manager.userProfiles.Values)
{
if (profile.username == fname && profile.surname == lname)
if (profile.Firstname == fname && profile.Lastname == lname)
return profile;
}
return null;
@ -98,7 +98,7 @@ namespace OpenSim.Framework.Data.DB4o
{
try
{
return GetUserByUUID(uuid).currentAgent;
return GetUserByUUID(uuid).CurrentAgent;
}
catch (Exception)
{
@ -126,7 +126,7 @@ namespace OpenSim.Framework.Data.DB4o
{
try
{
return GetUserByName(fname,lname).currentAgent;
return GetUserByName(fname,lname).CurrentAgent;
}
catch (Exception)
{

View File

@ -313,36 +313,36 @@ namespace OpenSim.Framework.Data.MySQL
if (reader.Read())
{
retval.UUID = new LLUUID((string)reader["UUID"]);
retval.username = (string)reader["username"];
retval.surname = (string)reader["lastname"];
retval.Firstname = (string)reader["username"];
retval.Lastname = (string)reader["lastname"];
retval.passwordHash = (string)reader["passwordHash"];
retval.passwordSalt = (string)reader["passwordSalt"];
retval.PasswordHash = (string)reader["passwordHash"];
retval.PasswordSalt = (string)reader["passwordSalt"];
retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
retval.homeLocation = new LLVector3(
retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
retval.HomeLocation = new LLVector3(
Convert.ToSingle(reader["homeLocationX"].ToString()),
Convert.ToSingle(reader["homeLocationY"].ToString()),
Convert.ToSingle(reader["homeLocationZ"].ToString()));
retval.homeLookAt = new LLVector3(
retval.HomeLookAt = new LLVector3(
Convert.ToSingle(reader["homeLookAtX"].ToString()),
Convert.ToSingle(reader["homeLookAtY"].ToString()),
Convert.ToSingle(reader["homeLookAtZ"].ToString()));
retval.created = Convert.ToInt32(reader["created"].ToString());
retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
retval.Created = Convert.ToInt32(reader["created"].ToString());
retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
retval.userInventoryURI = (string)reader["userInventoryURI"];
retval.userAssetURI = (string)reader["userAssetURI"];
retval.UserInventoryUri = (string)reader["userInventoryURI"];
retval.UserAssetUri = (string)reader["userAssetURI"];
retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
retval.ProfileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
retval.ProfileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
retval.profileAboutText = (string)reader["profileAboutText"];
retval.profileFirstText = (string)reader["profileFirstText"];
retval.ProfileAboutText = (string)reader["profileAboutText"];
retval.ProfileFirstText = (string)reader["profileFirstText"];
retval.profileImage = new LLUUID((string)reader["profileImage"]);
retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]);
retval.ProfileImage = new LLUUID((string)reader["profileImage"]);
retval.ProfileFirstImage = new LLUUID((string)reader["profileFirstImage"]);
}
else

View File

@ -204,9 +204,9 @@ namespace OpenSim.Framework.Data.MySQL
{
lock (database)
{
database.insertUserRow(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);
database.insertUserRow(user.UUID, user.Firstname, user.Lastname, 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);
}
}
catch (Exception e)

View File

@ -85,7 +85,7 @@ namespace OpenSim.Framework.Data.SQLite
UserProfileData user = buildUserProfile(row);
row = ds.Tables["useragents"].Rows.Find(uuid);
if(row != null) {
user.currentAgent = buildUserAgent(row);
user.CurrentAgent = buildUserAgent(row);
}
return user;
} else {
@ -119,7 +119,7 @@ namespace OpenSim.Framework.Data.SQLite
UserProfileData user = buildUserProfile(rows[0]);
DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID);
if(row != null) {
user.currentAgent = buildUserAgent(row);
user.CurrentAgent = buildUserAgent(row);
}
return user;
} else {
@ -137,7 +137,7 @@ namespace OpenSim.Framework.Data.SQLite
{
try
{
return GetUserByUUID(uuid).currentAgent;
return GetUserByUUID(uuid).CurrentAgent;
}
catch (Exception)
{
@ -165,7 +165,7 @@ namespace OpenSim.Framework.Data.SQLite
{
try
{
return GetUserByName(fname,lname).currentAgent;
return GetUserByName(fname,lname).CurrentAgent;
}
catch (Exception)
{
@ -193,18 +193,18 @@ namespace OpenSim.Framework.Data.SQLite
fillUserRow(row, user);
}
if(user.currentAgent != null) {
if(user.CurrentAgent != null) {
DataTable ua = ds.Tables["useragents"];
row = ua.Rows.Find(user.UUID);
if (row == null)
{
row = ua.NewRow();
fillUserAgentRow(row, user.currentAgent);
fillUserAgentRow(row, user.CurrentAgent);
ua.Rows.Add(row);
}
else
{
fillUserAgentRow(row, user.currentAgent);
fillUserAgentRow(row, user.CurrentAgent);
}
}
MainLog.Instance.Verbose("Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored");
@ -317,8 +317,8 @@ namespace OpenSim.Framework.Data.SQLite
createCol(users, "userInventoryURI", typeof(System.String));
createCol(users, "userAssetURI", typeof(System.String));
createCol(users, "profileCanDoMask", typeof(System.Int32));
createCol(users, "profileWantDoMask", typeof(System.Int32));
createCol(users, "profileAboutText", typeof(System.String));
createCol(users, "ProfileWantDoMask", typeof(System.Int32));
createCol(users, "ProfileAboutText", typeof(System.String));
createCol(users, "profileFirstText", typeof(System.String));
createCol(users, "profileImage", typeof(System.String));
createCol(users, "profileFirstImage", typeof(System.String));
@ -367,66 +367,66 @@ namespace OpenSim.Framework.Data.SQLite
// back out. Not enough time to figure it out yet.
UserProfileData user = new UserProfileData();
user.UUID = new LLUUID((String)row["UUID"]);
user.username = (String)row["username"];
user.surname = (String)row["surname"];
user.passwordHash = (String)row["passwordHash"];
user.passwordSalt = (String)row["passwordSalt"];
user.Firstname = (String)row["username"];
user.Lastname = (String)row["surname"];
user.PasswordHash = (String)row["passwordHash"];
user.PasswordSalt = (String)row["passwordSalt"];
user.homeRegionX = Convert.ToUInt32(row["homeRegionX"]);
user.homeRegionY = Convert.ToUInt32(row["homeRegionY"]);
user.homeLocation = new LLVector3(
user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]);
user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]);
user.HomeLocation = new LLVector3(
Convert.ToSingle(row["homeLocationX"]),
Convert.ToSingle(row["homeLocationY"]),
Convert.ToSingle(row["homeLocationZ"])
);
user.homeLookAt = new LLVector3(
user.HomeLookAt = new LLVector3(
Convert.ToSingle(row["homeLookAtX"]),
Convert.ToSingle(row["homeLookAtY"]),
Convert.ToSingle(row["homeLookAtZ"])
);
user.created = Convert.ToInt32(row["created"]);
user.lastLogin = Convert.ToInt32(row["lastLogin"]);
user.rootInventoryFolderID = new LLUUID((String)row["rootInventoryFolderID"]);
user.userInventoryURI = (String)row["userInventoryURI"];
user.userAssetURI = (String)row["userAssetURI"];
user.profileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]);
user.profileWantDoMask = Convert.ToUInt32(row["profileWantDoMask"]);
user.profileAboutText = (String)row["profileAboutText"];
user.profileFirstText = (String)row["profileFirstText"];
user.profileImage = new LLUUID((String)row["profileImage"]);
user.profileFirstImage = new LLUUID((String)row["profileFirstImage"]);
user.Created = Convert.ToInt32(row["created"]);
user.LastLogin = Convert.ToInt32(row["lastLogin"]);
user.RootInventoryFolderId = new LLUUID((String)row["rootInventoryFolderID"]);
user.UserInventoryUri = (String)row["userInventoryURI"];
user.UserAssetUri = (String)row["userAssetURI"];
user.ProfileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]);
user.ProfileWantDoMask = Convert.ToUInt32(row["ProfileWantDoMask"]);
user.ProfileAboutText = (String)row["ProfileAboutText"];
user.ProfileFirstText = (String)row["profileFirstText"];
user.ProfileImage = new LLUUID((String)row["profileImage"]);
user.ProfileFirstImage = new LLUUID((String)row["profileFirstImage"]);
return user;
}
private void fillUserRow(DataRow row, UserProfileData user)
{
row["UUID"] = user.UUID;
row["username"] = user.username;
row["surname"] = user.surname;
row["passwordHash"] = user.passwordHash;
row["passwordSalt"] = user.passwordSalt;
row["username"] = user.Firstname;
row["surname"] = user.Lastname;
row["passwordHash"] = user.PasswordHash;
row["passwordSalt"] = user.PasswordSalt;
row["homeRegionX"] = user.homeRegionX;
row["homeRegionY"] = user.homeRegionY;
row["homeLocationX"] = user.homeLocation.X;
row["homeLocationY"] = user.homeLocation.Y;
row["homeLocationZ"] = user.homeLocation.Z;
row["homeLookAtX"] = user.homeLookAt.X;
row["homeLookAtY"] = user.homeLookAt.Y;
row["homeLookAtZ"] = user.homeLookAt.Z;
row["homeRegionX"] = user.HomeRegionX;
row["homeRegionY"] = user.HomeRegionY;
row["homeLocationX"] = user.HomeLocation.X;
row["homeLocationY"] = user.HomeLocation.Y;
row["homeLocationZ"] = user.HomeLocation.Z;
row["homeLookAtX"] = user.HomeLookAt.X;
row["homeLookAtY"] = user.HomeLookAt.Y;
row["homeLookAtZ"] = user.HomeLookAt.Z;
row["created"] = user.created;
row["lastLogin"] = user.lastLogin;
row["rootInventoryFolderID"] = user.rootInventoryFolderID;
row["userInventoryURI"] = user.userInventoryURI;
row["userAssetURI"] = user.userAssetURI;
row["profileCanDoMask"] = user.profileCanDoMask;
row["profileWantDoMask"] = user.profileWantDoMask;
row["profileAboutText"] = user.profileAboutText;
row["profileFirstText"] = user.profileFirstText;
row["profileImage"] = user.profileImage;
row["profileFirstImage"] = user.profileFirstImage;
row["created"] = user.Created;
row["lastLogin"] = user.LastLogin;
row["rootInventoryFolderID"] = user.RootInventoryFolderId;
row["userInventoryURI"] = user.UserInventoryUri;
row["userAssetURI"] = user.UserAssetUri;
row["profileCanDoMask"] = user.ProfileCanDoMask;
row["ProfileWantDoMask"] = user.ProfileWantDoMask;
row["ProfileAboutText"] = user.ProfileAboutText;
row["profileFirstText"] = user.ProfileFirstText;
row["profileImage"] = user.ProfileImage;
row["profileFirstImage"] = user.ProfileFirstImage;
// ADO.NET doesn't handle NULL very well
foreach (DataColumn col in ds.Tables["users"].Columns) {

View File

@ -43,94 +43,94 @@ namespace OpenSim.Framework.Types
/// <summary>
/// The first component of a users account name
/// </summary>
public string username;
public string Firstname;
/// <summary>
/// The second component of a users account name
/// </summary>
public string surname;
public string Lastname;
/// <summary>
/// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
/// </summary>
/// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
public string passwordHash;
public string PasswordHash;
/// <summary>
/// The salt used for the users hash, should be 32 bytes or longer
/// </summary>
public string passwordSalt;
public string PasswordSalt;
/// <summary>
/// The regionhandle of the users preffered home region. If multiple sims occupy the same spot, the grid may decide which region the user logs into
/// </summary>
public ulong homeRegion
public ulong HomeRegion
{
get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); }
get { return Helpers.UIntsToLong((HomeRegionX * 256), (HomeRegionY * 256)); }
set {
homeRegionX = (uint)(value >> 40);
homeRegionY = (((uint)(value)) >> 8);
HomeRegionX = (uint)(value >> 40);
HomeRegionY = (((uint)(value)) >> 8);
}
}
public uint homeRegionX;
public uint homeRegionY;
public uint HomeRegionX;
public uint HomeRegionY;
/// <summary>
/// The coordinates inside the region of the home location
/// </summary>
public LLVector3 homeLocation;
public LLVector3 HomeLocation;
/// <summary>
/// Where the user will be looking when they rez.
/// </summary>
public LLVector3 homeLookAt;
public LLVector3 HomeLookAt;
/// <summary>
/// A UNIX Timestamp (seconds since epoch) for the users creation
/// </summary>
public int created;
public int Created;
/// <summary>
/// A UNIX Timestamp for the users last login date / time
/// </summary>
public int lastLogin;
public int LastLogin;
public LLUUID rootInventoryFolderID;
public LLUUID RootInventoryFolderId;
/// <summary>
/// A URI to the users inventory server, used for foreigners and large grids
/// </summary>
public string userInventoryURI = String.Empty;
public string UserInventoryUri = String.Empty;
/// <summary>
/// A URI to the users asset server, used for foreigners and large grids.
/// </summary>
public string userAssetURI = String.Empty;
public string UserAssetUri = String.Empty;
/// <summary>
/// A uint mask containing the "I can do" fields of the users profile
/// </summary>
public uint profileCanDoMask;
public uint ProfileCanDoMask;
/// <summary>
/// A uint mask containing the "I want to do" part of the users profile
/// </summary>
public uint profileWantDoMask; // Profile window "I want to" mask
public uint ProfileWantDoMask; // Profile window "I want to" mask
/// <summary>
/// The about text listed in a users profile.
/// </summary>
public string profileAboutText = String.Empty;
public string ProfileAboutText = String.Empty;
/// <summary>
/// The first life about text listed in a users profile
/// </summary>
public string profileFirstText = String.Empty;
public string ProfileFirstText = String.Empty;
/// <summary>
/// The profile image for an avatar stored on the asset server
/// </summary>
public LLUUID profileImage;
public LLUUID ProfileImage;
/// <summary>
/// The profile image for the users first life tab
/// </summary>
public LLUUID profileFirstImage;
public LLUUID ProfileFirstImage;
/// <summary>
/// The users last registered agent (filled in on the user server)
/// </summary>
public UserAgentData currentAgent;
public UserAgentData CurrentAgent;
}
/// <summary>

View File

@ -29,13 +29,13 @@ namespace OpenSim.Grid.UserServer
{
// Load information from the gridserver
SimProfileData SimInfo = new SimProfileData();
SimInfo = SimInfo.RequestSimProfileData(theUser.currentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
SimInfo = SimInfo.RequestSimProfileData(theUser.CurrentAgent.currentHandle, m_config.GridServerURL, m_config.GridSendKey, m_config.GridRecvKey);
// Customise the response
// Home Location
response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " +
"'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
"'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
"'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " +
"'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}";
// Destination
Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
@ -53,23 +53,23 @@ namespace OpenSim.Grid.UserServer
// Prepare notification
Hashtable SimParams = new Hashtable();
SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
SimParams["firstname"] = theUser.username;
SimParams["lastname"] = theUser.surname;
SimParams["session_id"] = theUser.CurrentAgent.sessionID.ToString();
SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString();
SimParams["firstname"] = theUser.Firstname;
SimParams["lastname"] = theUser.Lastname;
SimParams["agent_id"] = theUser.UUID.ToString();
SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString();
SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString();
SimParams["startpos_z"] = theUser.CurrentAgent.currentPos.Z.ToString();
SimParams["regionhandle"] = theUser.CurrentAgent.currentHandle.ToString();
SimParams["caps_path"] = capsPath;
ArrayList SendParams = new ArrayList();
SendParams.Add(SimParams);
// Update agent with target sim
theUser.currentAgent.currentRegion = SimInfo.UUID;
theUser.currentAgent.currentHandle = SimInfo.regionHandle;
theUser.CurrentAgent.currentRegion = SimInfo.UUID;
theUser.CurrentAgent.currentHandle = SimInfo.regionHandle;
System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI);
// Send

View File

@ -83,31 +83,31 @@ namespace OpenSim.Grid.UserServer
Hashtable responseData = new Hashtable();
// Account information
responseData["firstname"] = profile.username;
responseData["lastname"] = profile.surname;
responseData["firstname"] = profile.Firstname;
responseData["lastname"] = profile.Lastname;
responseData["uuid"] = profile.UUID.ToStringHyphenated();
// Server Information
responseData["server_inventory"] = profile.userInventoryURI;
responseData["server_asset"] = profile.userAssetURI;
responseData["server_inventory"] = profile.UserInventoryUri;
responseData["server_asset"] = profile.UserAssetUri;
// Profile Information
responseData["profile_about"] = profile.profileAboutText;
responseData["profile_firstlife_about"] = profile.profileFirstText;
responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated();
responseData["profile_can_do"] = profile.profileCanDoMask.ToString();
responseData["profile_want_do"] = profile.profileWantDoMask.ToString();
responseData["profile_image"] = profile.profileImage.ToStringHyphenated();
responseData["profile_created"] = profile.created.ToString();
responseData["profile_lastlogin"] = profile.lastLogin.ToString();
responseData["profile_about"] = profile.ProfileAboutText;
responseData["profile_firstlife_about"] = profile.ProfileFirstText;
responseData["profile_firstlife_image"] = profile.ProfileFirstImage.ToStringHyphenated();
responseData["profile_can_do"] = profile.ProfileCanDoMask.ToString();
responseData["profile_want_do"] = profile.ProfileWantDoMask.ToString();
responseData["profile_image"] = profile.ProfileImage.ToStringHyphenated();
responseData["profile_created"] = profile.Created.ToString();
responseData["profile_lastlogin"] = profile.LastLogin.ToString();
// Home region information
responseData["home_coordinates_x"] = profile.homeLocation.X.ToString();
responseData["home_coordinates_y"] = profile.homeLocation.Y.ToString();
responseData["home_coordinates_z"] = profile.homeLocation.Z.ToString();
responseData["home_coordinates_x"] = profile.HomeLocation.X.ToString();
responseData["home_coordinates_y"] = profile.HomeLocation.Y.ToString();
responseData["home_coordinates_z"] = profile.HomeLocation.Z.ToString();
responseData["home_region"] = profile.homeRegion.ToString();
responseData["home_region"] = profile.HomeRegion.ToString();
responseData["home_look_x"] = profile.homeLookAt.X.ToString();
responseData["home_look_y"] = profile.homeLookAt.Y.ToString();
responseData["home_look_z"] = profile.homeLookAt.Z.ToString();
responseData["home_look_x"] = profile.HomeLookAt.X.ToString();
responseData["home_look_y"] = profile.HomeLookAt.Y.ToString();
responseData["home_look_z"] = profile.HomeLookAt.Z.ToString();
response.Value = responseData;
return response;

View File

@ -70,26 +70,26 @@ namespace OpenSim.Region.Communications.Local
}
else
{
Console.WriteLine("Authenticating " + profile.username + " " + profile.surname);
Console.WriteLine("Authenticating " + profile.Firstname + " " + profile.Lastname);
password = password.Remove(0, 3); //remove $1$
string s = Util.Md5Hash(password + ":" + profile.passwordSalt);
string s = Util.Md5Hash(password + ":" + profile.PasswordSalt);
return profile.passwordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
return profile.PasswordHash.Equals(s.ToString(), StringComparison.InvariantCultureIgnoreCase);
}
}
public override void CustomiseResponse(LoginResponse response, UserProfileData theUser)
{
ulong currentRegion = theUser.currentAgent.currentHandle;
ulong currentRegion = theUser.CurrentAgent.currentHandle;
RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion);
if (reg != null)
{
response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " +
"'position':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "], " +
"'look_at':[r" + theUser.homeLocation.X.ToString() + ",r" + theUser.homeLocation.Y.ToString() + ",r" + theUser.homeLocation.Z.ToString() + "]}";
"'position':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "], " +
"'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}";
string capsPath = Util.GetRandomCapsPath();
response.SimAddress = reg.ExternalEndPoint.Address.ToString();
response.SimPort = (Int32)reg.ExternalEndPoint.Port;
@ -98,8 +98,8 @@ namespace OpenSim.Region.Communications.Local
response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CAPS/" + capsPath + "0000/";
// response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/";
theUser.currentAgent.currentRegion = reg.SimUUID;
theUser.currentAgent.currentHandle = reg.RegionHandle;
theUser.CurrentAgent.currentRegion = reg.SimUUID;
theUser.CurrentAgent.currentHandle = reg.RegionHandle;
Login _login = new Login();
//copy data to login object

View File

@ -24,26 +24,26 @@ namespace OpenSim.Region.Communications.OGS1
}
UserProfileData userData = new UserProfileData();
userData.username = (string)data["firstname"];
userData.surname = (string)data["lastname"];
userData.Firstname = (string)data["firstname"];
userData.Lastname = (string)data["lastname"];
userData.UUID = new LLUUID((string)data["uuid"]);
userData.userInventoryURI = (string)data["server_inventory"];
userData.userAssetURI = (string)data["server_asset"];
userData.profileFirstText = (string)data["profile_firstlife_about"];
userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
userData.profileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]);
userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]);
userData.profileImage = new LLUUID((string)data["profile_image"]);
userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]);
userData.homeRegion = Convert.ToUInt64((string)data["home_region"]);
userData.homeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"]));
userData.homeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"]));
userData.UserInventoryUri = (string)data["server_inventory"];
userData.UserAssetUri = (string)data["server_asset"];
userData.ProfileFirstText = (string)data["profile_firstlife_about"];
userData.ProfileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
userData.ProfileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]);
userData.ProfileWantDoMask = Convert.ToUInt32(data["profile_want_do"]);
userData.ProfileImage = new LLUUID((string)data["profile_image"]);
userData.LastLogin = Convert.ToInt32((string)data["profile_lastlogin"]);
userData.HomeRegion = Convert.ToUInt64((string)data["home_region"]);
userData.HomeLocation = new LLVector3((float)Convert.ToDecimal((string)data["home_coordinates_x"]), (float)Convert.ToDecimal((string)data["home_coordinates_y"]), (float)Convert.ToDecimal((string)data["home_coordinates_z"]));
userData.HomeLookAt = new LLVector3((float)Convert.ToDecimal((string)data["home_look_x"]), (float)Convert.ToDecimal((string)data["home_look_y"]), (float)Convert.ToDecimal((string)data["home_look_z"]));
return userData;
}
public UserProfileData GetUserProfile(string firstName, string lastName)
{
return GetUserProfile(firstName + " " + lastName);
return GetUserProfile(firstName, lastName);
}
public UserProfileData GetUserProfile(string name)
{