* UserProfileData meets code conventions
parent
5a65521203
commit
ed6168b96b
|
@ -162,8 +162,8 @@ namespace OpenSim.Framework.Communications
|
||||||
if (profileData != null)
|
if (profileData != null)
|
||||||
{
|
{
|
||||||
LLUUID profileId = profileData.UUID;
|
LLUUID profileId = profileData.UUID;
|
||||||
string firstname = profileData.username;
|
string firstname = profileData.Firstname;
|
||||||
string lastname = profileData.surname;
|
string lastname = profileData.Lastname;
|
||||||
|
|
||||||
remote_client.SendNameReply(profileId, firstname, lastname);
|
remote_client.SendNameReply(profileId, firstname, lastname);
|
||||||
}
|
}
|
||||||
|
|
|
@ -72,7 +72,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
// If we already have a session...
|
// If we already have a session...
|
||||||
if (userProfile.currentAgent != null && userProfile.currentAgent.agentOnline)
|
if (userProfile.CurrentAgent != null && userProfile.CurrentAgent.agentOnline)
|
||||||
{
|
{
|
||||||
// Reject the login
|
// Reject the login
|
||||||
return logResponse.CreateAlreadyLoggedInResponse();
|
return logResponse.CreateAlreadyLoggedInResponse();
|
||||||
|
@ -93,16 +93,16 @@ namespace OpenSim.Framework.UserManagement
|
||||||
InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated();
|
InventoryRootHash["folder_id"] = inventData.RootFolderID.ToStringHyphenated();
|
||||||
ArrayList InventoryRoot = new ArrayList();
|
ArrayList InventoryRoot = new ArrayList();
|
||||||
InventoryRoot.Add(InventoryRootHash);
|
InventoryRoot.Add(InventoryRootHash);
|
||||||
userProfile.rootInventoryFolderID = inventData.RootFolderID;
|
userProfile.RootInventoryFolderId = inventData.RootFolderID;
|
||||||
|
|
||||||
// Circuit Code
|
// Circuit Code
|
||||||
uint circode = (uint)(Util.RandomClass.Next());
|
uint circode = (uint)(Util.RandomClass.Next());
|
||||||
|
|
||||||
logResponse.Lastname = userProfile.surname;
|
logResponse.Lastname = userProfile.Lastname;
|
||||||
logResponse.Firstname = userProfile.username;
|
logResponse.Firstname = userProfile.Firstname;
|
||||||
logResponse.AgentID = agentID.ToStringHyphenated();
|
logResponse.AgentID = agentID.ToStringHyphenated();
|
||||||
logResponse.SessionID = userProfile.currentAgent.sessionID.ToStringHyphenated();
|
logResponse.SessionID = userProfile.CurrentAgent.sessionID.ToStringHyphenated();
|
||||||
logResponse.SecureSessionID = userProfile.currentAgent.secureSessionID.ToStringHyphenated();
|
logResponse.SecureSessionID = userProfile.CurrentAgent.secureSessionID.ToStringHyphenated();
|
||||||
logResponse.InventoryRoot = InventoryRoot;
|
logResponse.InventoryRoot = InventoryRoot;
|
||||||
logResponse.InventorySkeleton = AgentInventoryArray;
|
logResponse.InventorySkeleton = AgentInventoryArray;
|
||||||
logResponse.InventoryLibrary = this.GetInventoryLibrary();
|
logResponse.InventoryLibrary = this.GetInventoryLibrary();
|
||||||
|
@ -172,13 +172,13 @@ namespace OpenSim.Framework.UserManagement
|
||||||
{
|
{
|
||||||
|
|
||||||
MainLog.Instance.Verbose(
|
MainLog.Instance.Verbose(
|
||||||
"Authenticating " + profile.username + " " + profile.surname);
|
"Authenticating " + profile.Firstname + " " + profile.Lastname);
|
||||||
|
|
||||||
password = password.Remove(0, 3); //remove $1$
|
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>
|
/// <summary>
|
||||||
|
|
|
@ -96,7 +96,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
UserProfileData profile = plugin.Value.GetUserByUUID(uuid);
|
UserProfileData profile = plugin.Value.GetUserByUUID(uuid);
|
||||||
profile.currentAgent = getUserAgent(profile.UUID);
|
profile.CurrentAgent = getUserAgent(profile.UUID);
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -121,7 +121,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
UserProfileData profile = plugin.Value.GetUserByName(name);
|
UserProfileData profile = plugin.Value.GetUserByName(name);
|
||||||
profile.currentAgent = getUserAgent(profile.UUID);
|
profile.CurrentAgent = getUserAgent(profile.UUID);
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
@ -148,7 +148,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
{
|
{
|
||||||
UserProfileData profile = plugin.Value.GetUserByName(fname,lname);
|
UserProfileData profile = plugin.Value.GetUserByName(fname,lname);
|
||||||
|
|
||||||
profile.currentAgent = getUserAgent(profile.UUID);
|
profile.CurrentAgent = getUserAgent(profile.UUID);
|
||||||
|
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
|
@ -233,7 +233,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
public void clearUserAgent(LLUUID agentID)
|
public void clearUserAgent(LLUUID agentID)
|
||||||
{
|
{
|
||||||
UserProfileData profile = GetUserProfile(agentID);
|
UserProfileData profile = GetUserProfile(agentID);
|
||||||
profile.currentAgent = null;
|
profile.CurrentAgent = null;
|
||||||
setUserProfile(profile);
|
setUserProfile(profile);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -292,8 +292,8 @@ namespace OpenSim.Framework.UserManagement
|
||||||
agent.UUID = profile.UUID;
|
agent.UUID = profile.UUID;
|
||||||
|
|
||||||
// Current position (from Home)
|
// Current position (from Home)
|
||||||
agent.currentHandle = profile.homeRegion;
|
agent.currentHandle = profile.HomeRegion;
|
||||||
agent.currentPos = profile.homeLocation;
|
agent.currentPos = profile.HomeLocation;
|
||||||
|
|
||||||
// If user specified additional start, use that
|
// If user specified additional start, use that
|
||||||
if (requestData.ContainsKey("start"))
|
if (requestData.ContainsKey("start"))
|
||||||
|
@ -326,7 +326,7 @@ namespace OpenSim.Framework.UserManagement
|
||||||
agent.regionID = new LLUUID(); // Fill in later
|
agent.regionID = new LLUUID(); // Fill in later
|
||||||
agent.currentRegion = new LLUUID(); // Fill in later
|
agent.currentRegion = new LLUUID(); // Fill in later
|
||||||
|
|
||||||
profile.currentAgent = agent;
|
profile.CurrentAgent = agent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
@ -349,16 +349,16 @@ namespace OpenSim.Framework.UserManagement
|
||||||
public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
|
public void AddUserProfile(string firstName, string lastName, string pass, uint regX, uint regY)
|
||||||
{
|
{
|
||||||
UserProfileData user = new UserProfileData();
|
UserProfileData user = new UserProfileData();
|
||||||
user.homeLocation = new LLVector3(128, 128, 100);
|
user.HomeLocation = new LLVector3(128, 128, 100);
|
||||||
user.UUID = LLUUID.Random();
|
user.UUID = LLUUID.Random();
|
||||||
user.username = firstName;
|
user.Firstname = firstName;
|
||||||
user.surname = lastName;
|
user.Lastname = lastName;
|
||||||
user.passwordHash = pass;
|
user.PasswordHash = pass;
|
||||||
user.passwordSalt = "";
|
user.PasswordSalt = "";
|
||||||
user.created = Util.UnixTimeSinceEpoch();
|
user.Created = Util.UnixTimeSinceEpoch();
|
||||||
user.homeLookAt = new LLVector3(100, 100, 100);
|
user.HomeLookAt = new LLVector3(100, 100, 100);
|
||||||
user.homeRegionX = regX;
|
user.HomeRegionX = regX;
|
||||||
user.homeRegionY = regY;
|
user.HomeRegionY = regY;
|
||||||
|
|
||||||
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
|
foreach (KeyValuePair<string, IUserData> plugin in _plugins)
|
||||||
{
|
{
|
||||||
|
|
|
@ -83,7 +83,7 @@ namespace OpenSim.Framework.Data.DB4o
|
||||||
{
|
{
|
||||||
foreach (UserProfileData profile in manager.userProfiles.Values)
|
foreach (UserProfileData profile in manager.userProfiles.Values)
|
||||||
{
|
{
|
||||||
if (profile.username == fname && profile.surname == lname)
|
if (profile.Firstname == fname && profile.Lastname == lname)
|
||||||
return profile;
|
return profile;
|
||||||
}
|
}
|
||||||
return null;
|
return null;
|
||||||
|
@ -98,7 +98,7 @@ namespace OpenSim.Framework.Data.DB4o
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return GetUserByUUID(uuid).currentAgent;
|
return GetUserByUUID(uuid).CurrentAgent;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
@ -126,7 +126,7 @@ namespace OpenSim.Framework.Data.DB4o
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return GetUserByName(fname,lname).currentAgent;
|
return GetUserByName(fname,lname).CurrentAgent;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
|
|
@ -313,36 +313,36 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
if (reader.Read())
|
if (reader.Read())
|
||||||
{
|
{
|
||||||
retval.UUID = new LLUUID((string)reader["UUID"]);
|
retval.UUID = new LLUUID((string)reader["UUID"]);
|
||||||
retval.username = (string)reader["username"];
|
retval.Firstname = (string)reader["username"];
|
||||||
retval.surname = (string)reader["lastname"];
|
retval.Lastname = (string)reader["lastname"];
|
||||||
|
|
||||||
retval.passwordHash = (string)reader["passwordHash"];
|
retval.PasswordHash = (string)reader["passwordHash"];
|
||||||
retval.passwordSalt = (string)reader["passwordSalt"];
|
retval.PasswordSalt = (string)reader["passwordSalt"];
|
||||||
|
|
||||||
retval.homeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
|
retval.HomeRegion = Convert.ToUInt64(reader["homeRegion"].ToString());
|
||||||
retval.homeLocation = new LLVector3(
|
retval.HomeLocation = new LLVector3(
|
||||||
Convert.ToSingle(reader["homeLocationX"].ToString()),
|
Convert.ToSingle(reader["homeLocationX"].ToString()),
|
||||||
Convert.ToSingle(reader["homeLocationY"].ToString()),
|
Convert.ToSingle(reader["homeLocationY"].ToString()),
|
||||||
Convert.ToSingle(reader["homeLocationZ"].ToString()));
|
Convert.ToSingle(reader["homeLocationZ"].ToString()));
|
||||||
retval.homeLookAt = new LLVector3(
|
retval.HomeLookAt = new LLVector3(
|
||||||
Convert.ToSingle(reader["homeLookAtX"].ToString()),
|
Convert.ToSingle(reader["homeLookAtX"].ToString()),
|
||||||
Convert.ToSingle(reader["homeLookAtY"].ToString()),
|
Convert.ToSingle(reader["homeLookAtY"].ToString()),
|
||||||
Convert.ToSingle(reader["homeLookAtZ"].ToString()));
|
Convert.ToSingle(reader["homeLookAtZ"].ToString()));
|
||||||
|
|
||||||
retval.created = Convert.ToInt32(reader["created"].ToString());
|
retval.Created = Convert.ToInt32(reader["created"].ToString());
|
||||||
retval.lastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
|
retval.LastLogin = Convert.ToInt32(reader["lastLogin"].ToString());
|
||||||
|
|
||||||
retval.userInventoryURI = (string)reader["userInventoryURI"];
|
retval.UserInventoryUri = (string)reader["userInventoryURI"];
|
||||||
retval.userAssetURI = (string)reader["userAssetURI"];
|
retval.UserAssetUri = (string)reader["userAssetURI"];
|
||||||
|
|
||||||
retval.profileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
|
retval.ProfileCanDoMask = Convert.ToUInt32(reader["profileCanDoMask"].ToString());
|
||||||
retval.profileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
|
retval.ProfileWantDoMask = Convert.ToUInt32(reader["profileWantDoMask"].ToString());
|
||||||
|
|
||||||
retval.profileAboutText = (string)reader["profileAboutText"];
|
retval.ProfileAboutText = (string)reader["profileAboutText"];
|
||||||
retval.profileFirstText = (string)reader["profileFirstText"];
|
retval.ProfileFirstText = (string)reader["profileFirstText"];
|
||||||
|
|
||||||
retval.profileImage = new LLUUID((string)reader["profileImage"]);
|
retval.ProfileImage = new LLUUID((string)reader["profileImage"]);
|
||||||
retval.profileFirstImage = new LLUUID((string)reader["profileFirstImage"]);
|
retval.ProfileFirstImage = new LLUUID((string)reader["profileFirstImage"]);
|
||||||
|
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|
|
@ -204,9 +204,9 @@ namespace OpenSim.Framework.Data.MySQL
|
||||||
{
|
{
|
||||||
lock (database)
|
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,
|
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.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.ProfileAboutText, user.ProfileFirstText, user.ProfileImage, user.ProfileFirstImage);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
catch (Exception e)
|
catch (Exception e)
|
||||||
|
|
|
@ -85,7 +85,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
UserProfileData user = buildUserProfile(row);
|
UserProfileData user = buildUserProfile(row);
|
||||||
row = ds.Tables["useragents"].Rows.Find(uuid);
|
row = ds.Tables["useragents"].Rows.Find(uuid);
|
||||||
if(row != null) {
|
if(row != null) {
|
||||||
user.currentAgent = buildUserAgent(row);
|
user.CurrentAgent = buildUserAgent(row);
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
} else {
|
} else {
|
||||||
|
@ -119,7 +119,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
UserProfileData user = buildUserProfile(rows[0]);
|
UserProfileData user = buildUserProfile(rows[0]);
|
||||||
DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID);
|
DataRow row = ds.Tables["useragents"].Rows.Find(user.UUID);
|
||||||
if(row != null) {
|
if(row != null) {
|
||||||
user.currentAgent = buildUserAgent(row);
|
user.CurrentAgent = buildUserAgent(row);
|
||||||
}
|
}
|
||||||
return user;
|
return user;
|
||||||
} else {
|
} else {
|
||||||
|
@ -137,7 +137,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return GetUserByUUID(uuid).currentAgent;
|
return GetUserByUUID(uuid).CurrentAgent;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
@ -165,7 +165,7 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
{
|
{
|
||||||
try
|
try
|
||||||
{
|
{
|
||||||
return GetUserByName(fname,lname).currentAgent;
|
return GetUserByName(fname,lname).CurrentAgent;
|
||||||
}
|
}
|
||||||
catch (Exception)
|
catch (Exception)
|
||||||
{
|
{
|
||||||
|
@ -193,18 +193,18 @@ namespace OpenSim.Framework.Data.SQLite
|
||||||
fillUserRow(row, user);
|
fillUserRow(row, user);
|
||||||
}
|
}
|
||||||
|
|
||||||
if(user.currentAgent != null) {
|
if(user.CurrentAgent != null) {
|
||||||
DataTable ua = ds.Tables["useragents"];
|
DataTable ua = ds.Tables["useragents"];
|
||||||
row = ua.Rows.Find(user.UUID);
|
row = ua.Rows.Find(user.UUID);
|
||||||
if (row == null)
|
if (row == null)
|
||||||
{
|
{
|
||||||
row = ua.NewRow();
|
row = ua.NewRow();
|
||||||
fillUserAgentRow(row, user.currentAgent);
|
fillUserAgentRow(row, user.CurrentAgent);
|
||||||
ua.Rows.Add(row);
|
ua.Rows.Add(row);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
fillUserAgentRow(row, user.currentAgent);
|
fillUserAgentRow(row, user.CurrentAgent);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
MainLog.Instance.Verbose("Syncing user database: " + ds.Tables["users"].Rows.Count + " users stored");
|
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, "userInventoryURI", typeof(System.String));
|
||||||
createCol(users, "userAssetURI", typeof(System.String));
|
createCol(users, "userAssetURI", typeof(System.String));
|
||||||
createCol(users, "profileCanDoMask", typeof(System.Int32));
|
createCol(users, "profileCanDoMask", typeof(System.Int32));
|
||||||
createCol(users, "profileWantDoMask", typeof(System.Int32));
|
createCol(users, "ProfileWantDoMask", typeof(System.Int32));
|
||||||
createCol(users, "profileAboutText", typeof(System.String));
|
createCol(users, "ProfileAboutText", typeof(System.String));
|
||||||
createCol(users, "profileFirstText", typeof(System.String));
|
createCol(users, "profileFirstText", typeof(System.String));
|
||||||
createCol(users, "profileImage", typeof(System.String));
|
createCol(users, "profileImage", typeof(System.String));
|
||||||
createCol(users, "profileFirstImage", 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.
|
// back out. Not enough time to figure it out yet.
|
||||||
UserProfileData user = new UserProfileData();
|
UserProfileData user = new UserProfileData();
|
||||||
user.UUID = new LLUUID((String)row["UUID"]);
|
user.UUID = new LLUUID((String)row["UUID"]);
|
||||||
user.username = (String)row["username"];
|
user.Firstname = (String)row["username"];
|
||||||
user.surname = (String)row["surname"];
|
user.Lastname = (String)row["surname"];
|
||||||
user.passwordHash = (String)row["passwordHash"];
|
user.PasswordHash = (String)row["passwordHash"];
|
||||||
user.passwordSalt = (String)row["passwordSalt"];
|
user.PasswordSalt = (String)row["passwordSalt"];
|
||||||
|
|
||||||
user.homeRegionX = Convert.ToUInt32(row["homeRegionX"]);
|
user.HomeRegionX = Convert.ToUInt32(row["homeRegionX"]);
|
||||||
user.homeRegionY = Convert.ToUInt32(row["homeRegionY"]);
|
user.HomeRegionY = Convert.ToUInt32(row["homeRegionY"]);
|
||||||
user.homeLocation = new LLVector3(
|
user.HomeLocation = new LLVector3(
|
||||||
Convert.ToSingle(row["homeLocationX"]),
|
Convert.ToSingle(row["homeLocationX"]),
|
||||||
Convert.ToSingle(row["homeLocationY"]),
|
Convert.ToSingle(row["homeLocationY"]),
|
||||||
Convert.ToSingle(row["homeLocationZ"])
|
Convert.ToSingle(row["homeLocationZ"])
|
||||||
);
|
);
|
||||||
user.homeLookAt = new LLVector3(
|
user.HomeLookAt = new LLVector3(
|
||||||
Convert.ToSingle(row["homeLookAtX"]),
|
Convert.ToSingle(row["homeLookAtX"]),
|
||||||
Convert.ToSingle(row["homeLookAtY"]),
|
Convert.ToSingle(row["homeLookAtY"]),
|
||||||
Convert.ToSingle(row["homeLookAtZ"])
|
Convert.ToSingle(row["homeLookAtZ"])
|
||||||
);
|
);
|
||||||
user.created = Convert.ToInt32(row["created"]);
|
user.Created = Convert.ToInt32(row["created"]);
|
||||||
user.lastLogin = Convert.ToInt32(row["lastLogin"]);
|
user.LastLogin = Convert.ToInt32(row["lastLogin"]);
|
||||||
user.rootInventoryFolderID = new LLUUID((String)row["rootInventoryFolderID"]);
|
user.RootInventoryFolderId = new LLUUID((String)row["rootInventoryFolderID"]);
|
||||||
user.userInventoryURI = (String)row["userInventoryURI"];
|
user.UserInventoryUri = (String)row["userInventoryURI"];
|
||||||
user.userAssetURI = (String)row["userAssetURI"];
|
user.UserAssetUri = (String)row["userAssetURI"];
|
||||||
user.profileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]);
|
user.ProfileCanDoMask = Convert.ToUInt32(row["profileCanDoMask"]);
|
||||||
user.profileWantDoMask = Convert.ToUInt32(row["profileWantDoMask"]);
|
user.ProfileWantDoMask = Convert.ToUInt32(row["ProfileWantDoMask"]);
|
||||||
user.profileAboutText = (String)row["profileAboutText"];
|
user.ProfileAboutText = (String)row["ProfileAboutText"];
|
||||||
user.profileFirstText = (String)row["profileFirstText"];
|
user.ProfileFirstText = (String)row["profileFirstText"];
|
||||||
user.profileImage = new LLUUID((String)row["profileImage"]);
|
user.ProfileImage = new LLUUID((String)row["profileImage"]);
|
||||||
user.profileFirstImage = new LLUUID((String)row["profileFirstImage"]);
|
user.ProfileFirstImage = new LLUUID((String)row["profileFirstImage"]);
|
||||||
return user;
|
return user;
|
||||||
}
|
}
|
||||||
|
|
||||||
private void fillUserRow(DataRow row, UserProfileData user)
|
private void fillUserRow(DataRow row, UserProfileData user)
|
||||||
{
|
{
|
||||||
row["UUID"] = user.UUID;
|
row["UUID"] = user.UUID;
|
||||||
row["username"] = user.username;
|
row["username"] = user.Firstname;
|
||||||
row["surname"] = user.surname;
|
row["surname"] = user.Lastname;
|
||||||
row["passwordHash"] = user.passwordHash;
|
row["passwordHash"] = user.PasswordHash;
|
||||||
row["passwordSalt"] = user.passwordSalt;
|
row["passwordSalt"] = user.PasswordSalt;
|
||||||
|
|
||||||
|
|
||||||
row["homeRegionX"] = user.homeRegionX;
|
row["homeRegionX"] = user.HomeRegionX;
|
||||||
row["homeRegionY"] = user.homeRegionY;
|
row["homeRegionY"] = user.HomeRegionY;
|
||||||
row["homeLocationX"] = user.homeLocation.X;
|
row["homeLocationX"] = user.HomeLocation.X;
|
||||||
row["homeLocationY"] = user.homeLocation.Y;
|
row["homeLocationY"] = user.HomeLocation.Y;
|
||||||
row["homeLocationZ"] = user.homeLocation.Z;
|
row["homeLocationZ"] = user.HomeLocation.Z;
|
||||||
row["homeLookAtX"] = user.homeLookAt.X;
|
row["homeLookAtX"] = user.HomeLookAt.X;
|
||||||
row["homeLookAtY"] = user.homeLookAt.Y;
|
row["homeLookAtY"] = user.HomeLookAt.Y;
|
||||||
row["homeLookAtZ"] = user.homeLookAt.Z;
|
row["homeLookAtZ"] = user.HomeLookAt.Z;
|
||||||
|
|
||||||
row["created"] = user.created;
|
row["created"] = user.Created;
|
||||||
row["lastLogin"] = user.lastLogin;
|
row["lastLogin"] = user.LastLogin;
|
||||||
row["rootInventoryFolderID"] = user.rootInventoryFolderID;
|
row["rootInventoryFolderID"] = user.RootInventoryFolderId;
|
||||||
row["userInventoryURI"] = user.userInventoryURI;
|
row["userInventoryURI"] = user.UserInventoryUri;
|
||||||
row["userAssetURI"] = user.userAssetURI;
|
row["userAssetURI"] = user.UserAssetUri;
|
||||||
row["profileCanDoMask"] = user.profileCanDoMask;
|
row["profileCanDoMask"] = user.ProfileCanDoMask;
|
||||||
row["profileWantDoMask"] = user.profileWantDoMask;
|
row["ProfileWantDoMask"] = user.ProfileWantDoMask;
|
||||||
row["profileAboutText"] = user.profileAboutText;
|
row["ProfileAboutText"] = user.ProfileAboutText;
|
||||||
row["profileFirstText"] = user.profileFirstText;
|
row["profileFirstText"] = user.ProfileFirstText;
|
||||||
row["profileImage"] = user.profileImage;
|
row["profileImage"] = user.ProfileImage;
|
||||||
row["profileFirstImage"] = user.profileFirstImage;
|
row["profileFirstImage"] = user.ProfileFirstImage;
|
||||||
|
|
||||||
// ADO.NET doesn't handle NULL very well
|
// ADO.NET doesn't handle NULL very well
|
||||||
foreach (DataColumn col in ds.Tables["users"].Columns) {
|
foreach (DataColumn col in ds.Tables["users"].Columns) {
|
||||||
|
|
|
@ -43,94 +43,94 @@ namespace OpenSim.Framework.Types
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The first component of a users account name
|
/// The first component of a users account name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string username;
|
public string Firstname;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The second component of a users account name
|
/// The second component of a users account name
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string surname;
|
public string Lastname;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
|
/// A salted hash containing the users password, in the format md5(md5(password) + ":" + salt)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
/// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
|
/// <remarks>This is double MD5'd because the client sends an unsalted MD5 to the loginserver</remarks>
|
||||||
public string passwordHash;
|
public string PasswordHash;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The salt used for the users hash, should be 32 bytes or longer
|
/// The salt used for the users hash, should be 32 bytes or longer
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string passwordSalt;
|
public string PasswordSalt;
|
||||||
|
|
||||||
/// <summary>
|
/// <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
|
/// 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>
|
/// </summary>
|
||||||
public ulong homeRegion
|
public ulong HomeRegion
|
||||||
{
|
{
|
||||||
get { return Helpers.UIntsToLong((homeRegionX * 256), (homeRegionY * 256)); }
|
get { return Helpers.UIntsToLong((HomeRegionX * 256), (HomeRegionY * 256)); }
|
||||||
set {
|
set {
|
||||||
homeRegionX = (uint)(value >> 40);
|
HomeRegionX = (uint)(value >> 40);
|
||||||
homeRegionY = (((uint)(value)) >> 8);
|
HomeRegionY = (((uint)(value)) >> 8);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
public uint homeRegionX;
|
public uint HomeRegionX;
|
||||||
public uint homeRegionY;
|
public uint HomeRegionY;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The coordinates inside the region of the home location
|
/// The coordinates inside the region of the home location
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LLVector3 homeLocation;
|
public LLVector3 HomeLocation;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// Where the user will be looking when they rez.
|
/// Where the user will be looking when they rez.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LLVector3 homeLookAt;
|
public LLVector3 HomeLookAt;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A UNIX Timestamp (seconds since epoch) for the users creation
|
/// A UNIX Timestamp (seconds since epoch) for the users creation
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int created;
|
public int Created;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A UNIX Timestamp for the users last login date / time
|
/// A UNIX Timestamp for the users last login date / time
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public int lastLogin;
|
public int LastLogin;
|
||||||
|
|
||||||
public LLUUID rootInventoryFolderID;
|
public LLUUID RootInventoryFolderId;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A URI to the users inventory server, used for foreigners and large grids
|
/// A URI to the users inventory server, used for foreigners and large grids
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string userInventoryURI = String.Empty;
|
public string UserInventoryUri = String.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A URI to the users asset server, used for foreigners and large grids.
|
/// A URI to the users asset server, used for foreigners and large grids.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string userAssetURI = String.Empty;
|
public string UserAssetUri = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A uint mask containing the "I can do" fields of the users profile
|
/// A uint mask containing the "I can do" fields of the users profile
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint profileCanDoMask;
|
public uint ProfileCanDoMask;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// A uint mask containing the "I want to do" part of the users profile
|
/// A uint mask containing the "I want to do" part of the users profile
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public uint profileWantDoMask; // Profile window "I want to" mask
|
public uint ProfileWantDoMask; // Profile window "I want to" mask
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The about text listed in a users profile.
|
/// The about text listed in a users profile.
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string profileAboutText = String.Empty;
|
public string ProfileAboutText = String.Empty;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The first life about text listed in a users profile
|
/// The first life about text listed in a users profile
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public string profileFirstText = String.Empty;
|
public string ProfileFirstText = String.Empty;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The profile image for an avatar stored on the asset server
|
/// The profile image for an avatar stored on the asset server
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LLUUID profileImage;
|
public LLUUID ProfileImage;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The profile image for the users first life tab
|
/// The profile image for the users first life tab
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public LLUUID profileFirstImage;
|
public LLUUID ProfileFirstImage;
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// The users last registered agent (filled in on the user server)
|
/// The users last registered agent (filled in on the user server)
|
||||||
/// </summary>
|
/// </summary>
|
||||||
public UserAgentData currentAgent;
|
public UserAgentData CurrentAgent;
|
||||||
}
|
}
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
|
|
|
@ -29,13 +29,13 @@ namespace OpenSim.Grid.UserServer
|
||||||
{
|
{
|
||||||
// Load information from the gridserver
|
// Load information from the gridserver
|
||||||
SimProfileData SimInfo = new SimProfileData();
|
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
|
// Customise the response
|
||||||
// Home Location
|
// Home Location
|
||||||
response.Home = "{'region_handle':[r" + (SimInfo.regionLocX * 256).ToString() + ",r" + (SimInfo.regionLocY * 256).ToString() + "], " +
|
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() + "], " +
|
"'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() + "]}";
|
"'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}";
|
||||||
|
|
||||||
// Destination
|
// Destination
|
||||||
Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
|
Console.WriteLine("CUSTOMISERESPONSE: Region X: " + SimInfo.regionLocX + "; Region Y: " + SimInfo.regionLocY);
|
||||||
|
@ -53,23 +53,23 @@ namespace OpenSim.Grid.UserServer
|
||||||
|
|
||||||
// Prepare notification
|
// Prepare notification
|
||||||
Hashtable SimParams = new Hashtable();
|
Hashtable SimParams = new Hashtable();
|
||||||
SimParams["session_id"] = theUser.currentAgent.sessionID.ToString();
|
SimParams["session_id"] = theUser.CurrentAgent.sessionID.ToString();
|
||||||
SimParams["secure_session_id"] = theUser.currentAgent.secureSessionID.ToString();
|
SimParams["secure_session_id"] = theUser.CurrentAgent.secureSessionID.ToString();
|
||||||
SimParams["firstname"] = theUser.username;
|
SimParams["firstname"] = theUser.Firstname;
|
||||||
SimParams["lastname"] = theUser.surname;
|
SimParams["lastname"] = theUser.Lastname;
|
||||||
SimParams["agent_id"] = theUser.UUID.ToString();
|
SimParams["agent_id"] = theUser.UUID.ToString();
|
||||||
SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
|
SimParams["circuit_code"] = (Int32)Convert.ToUInt32(response.CircuitCode);
|
||||||
SimParams["startpos_x"] = theUser.currentAgent.currentPos.X.ToString();
|
SimParams["startpos_x"] = theUser.CurrentAgent.currentPos.X.ToString();
|
||||||
SimParams["startpos_y"] = theUser.currentAgent.currentPos.Y.ToString();
|
SimParams["startpos_y"] = theUser.CurrentAgent.currentPos.Y.ToString();
|
||||||
SimParams["startpos_z"] = theUser.currentAgent.currentPos.Z.ToString();
|
SimParams["startpos_z"] = theUser.CurrentAgent.currentPos.Z.ToString();
|
||||||
SimParams["regionhandle"] = theUser.currentAgent.currentHandle.ToString();
|
SimParams["regionhandle"] = theUser.CurrentAgent.currentHandle.ToString();
|
||||||
SimParams["caps_path"] = capsPath;
|
SimParams["caps_path"] = capsPath;
|
||||||
ArrayList SendParams = new ArrayList();
|
ArrayList SendParams = new ArrayList();
|
||||||
SendParams.Add(SimParams);
|
SendParams.Add(SimParams);
|
||||||
|
|
||||||
// Update agent with target sim
|
// Update agent with target sim
|
||||||
theUser.currentAgent.currentRegion = SimInfo.UUID;
|
theUser.CurrentAgent.currentRegion = SimInfo.UUID;
|
||||||
theUser.currentAgent.currentHandle = SimInfo.regionHandle;
|
theUser.CurrentAgent.currentHandle = SimInfo.regionHandle;
|
||||||
|
|
||||||
System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI);
|
System.Console.WriteLine("Informing region --> " + SimInfo.httpServerURI);
|
||||||
// Send
|
// Send
|
||||||
|
|
|
@ -83,31 +83,31 @@ namespace OpenSim.Grid.UserServer
|
||||||
Hashtable responseData = new Hashtable();
|
Hashtable responseData = new Hashtable();
|
||||||
|
|
||||||
// Account information
|
// Account information
|
||||||
responseData["firstname"] = profile.username;
|
responseData["firstname"] = profile.Firstname;
|
||||||
responseData["lastname"] = profile.surname;
|
responseData["lastname"] = profile.Lastname;
|
||||||
responseData["uuid"] = profile.UUID.ToStringHyphenated();
|
responseData["uuid"] = profile.UUID.ToStringHyphenated();
|
||||||
// Server Information
|
// Server Information
|
||||||
responseData["server_inventory"] = profile.userInventoryURI;
|
responseData["server_inventory"] = profile.UserInventoryUri;
|
||||||
responseData["server_asset"] = profile.userAssetURI;
|
responseData["server_asset"] = profile.UserAssetUri;
|
||||||
// Profile Information
|
// Profile Information
|
||||||
responseData["profile_about"] = profile.profileAboutText;
|
responseData["profile_about"] = profile.ProfileAboutText;
|
||||||
responseData["profile_firstlife_about"] = profile.profileFirstText;
|
responseData["profile_firstlife_about"] = profile.ProfileFirstText;
|
||||||
responseData["profile_firstlife_image"] = profile.profileFirstImage.ToStringHyphenated();
|
responseData["profile_firstlife_image"] = profile.ProfileFirstImage.ToStringHyphenated();
|
||||||
responseData["profile_can_do"] = profile.profileCanDoMask.ToString();
|
responseData["profile_can_do"] = profile.ProfileCanDoMask.ToString();
|
||||||
responseData["profile_want_do"] = profile.profileWantDoMask.ToString();
|
responseData["profile_want_do"] = profile.ProfileWantDoMask.ToString();
|
||||||
responseData["profile_image"] = profile.profileImage.ToStringHyphenated();
|
responseData["profile_image"] = profile.ProfileImage.ToStringHyphenated();
|
||||||
responseData["profile_created"] = profile.created.ToString();
|
responseData["profile_created"] = profile.Created.ToString();
|
||||||
responseData["profile_lastlogin"] = profile.lastLogin.ToString();
|
responseData["profile_lastlogin"] = profile.LastLogin.ToString();
|
||||||
// Home region information
|
// Home region information
|
||||||
responseData["home_coordinates_x"] = profile.homeLocation.X.ToString();
|
responseData["home_coordinates_x"] = profile.HomeLocation.X.ToString();
|
||||||
responseData["home_coordinates_y"] = profile.homeLocation.Y.ToString();
|
responseData["home_coordinates_y"] = profile.HomeLocation.Y.ToString();
|
||||||
responseData["home_coordinates_z"] = profile.homeLocation.Z.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_x"] = profile.HomeLookAt.X.ToString();
|
||||||
responseData["home_look_y"] = profile.homeLookAt.Y.ToString();
|
responseData["home_look_y"] = profile.HomeLookAt.Y.ToString();
|
||||||
responseData["home_look_z"] = profile.homeLookAt.Z.ToString();
|
responseData["home_look_z"] = profile.HomeLookAt.Z.ToString();
|
||||||
response.Value = responseData;
|
response.Value = responseData;
|
||||||
|
|
||||||
return response;
|
return response;
|
||||||
|
|
|
@ -70,26 +70,26 @@ namespace OpenSim.Region.Communications.Local
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
Console.WriteLine("Authenticating " + profile.username + " " + profile.surname);
|
Console.WriteLine("Authenticating " + profile.Firstname + " " + profile.Lastname);
|
||||||
|
|
||||||
password = password.Remove(0, 3); //remove $1$
|
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)
|
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);
|
RegionInfo reg = m_Parent.GridService.RequestNeighbourInfo(currentRegion);
|
||||||
|
|
||||||
if (reg != null)
|
if (reg != null)
|
||||||
{
|
{
|
||||||
response.Home = "{'region_handle':[r" + (reg.RegionLocX * 256).ToString() + ",r" + (reg.RegionLocY * 256).ToString() + "], " +
|
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() + "], " +
|
"'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() + "]}";
|
"'look_at':[r" + theUser.HomeLocation.X.ToString() + ",r" + theUser.HomeLocation.Y.ToString() + ",r" + theUser.HomeLocation.Z.ToString() + "]}";
|
||||||
string capsPath = Util.GetRandomCapsPath();
|
string capsPath = Util.GetRandomCapsPath();
|
||||||
response.SimAddress = reg.ExternalEndPoint.Address.ToString();
|
response.SimAddress = reg.ExternalEndPoint.Address.ToString();
|
||||||
response.SimPort = (Int32)reg.ExternalEndPoint.Port;
|
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() + "/CAPS/" + capsPath + "0000/";
|
||||||
// response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/";
|
// response.SeedCapability = "http://" + reg.ExternalHostName + ":" + this.serversInfo.HttpListenerPort.ToString() + "/CapsSeed/" + capsPath + "0000/";
|
||||||
theUser.currentAgent.currentRegion = reg.SimUUID;
|
theUser.CurrentAgent.currentRegion = reg.SimUUID;
|
||||||
theUser.currentAgent.currentHandle = reg.RegionHandle;
|
theUser.CurrentAgent.currentHandle = reg.RegionHandle;
|
||||||
|
|
||||||
Login _login = new Login();
|
Login _login = new Login();
|
||||||
//copy data to login object
|
//copy data to login object
|
||||||
|
|
|
@ -24,26 +24,26 @@ namespace OpenSim.Region.Communications.OGS1
|
||||||
}
|
}
|
||||||
|
|
||||||
UserProfileData userData = new UserProfileData();
|
UserProfileData userData = new UserProfileData();
|
||||||
userData.username = (string)data["firstname"];
|
userData.Firstname = (string)data["firstname"];
|
||||||
userData.surname = (string)data["lastname"];
|
userData.Lastname = (string)data["lastname"];
|
||||||
userData.UUID = new LLUUID((string)data["uuid"]);
|
userData.UUID = new LLUUID((string)data["uuid"]);
|
||||||
userData.userInventoryURI = (string)data["server_inventory"];
|
userData.UserInventoryUri = (string)data["server_inventory"];
|
||||||
userData.userAssetURI = (string)data["server_asset"];
|
userData.UserAssetUri = (string)data["server_asset"];
|
||||||
userData.profileFirstText = (string)data["profile_firstlife_about"];
|
userData.ProfileFirstText = (string)data["profile_firstlife_about"];
|
||||||
userData.profileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
|
userData.ProfileFirstImage = new LLUUID((string)data["profile_firstlife_image"]);
|
||||||
userData.profileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]);
|
userData.ProfileCanDoMask = Convert.ToUInt32((string)data["profile_can_do"]);
|
||||||
userData.profileWantDoMask = Convert.ToUInt32(data["profile_want_do"]);
|
userData.ProfileWantDoMask = Convert.ToUInt32(data["profile_want_do"]);
|
||||||
userData.profileImage = new LLUUID((string)data["profile_image"]);
|
userData.ProfileImage = new LLUUID((string)data["profile_image"]);
|
||||||
userData.lastLogin = Convert.ToInt32((string)data["profile_lastlogin"]);
|
userData.LastLogin = Convert.ToInt32((string)data["profile_lastlogin"]);
|
||||||
userData.homeRegion = Convert.ToUInt64((string)data["home_region"]);
|
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.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.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;
|
return userData;
|
||||||
}
|
}
|
||||||
public UserProfileData GetUserProfile(string firstName, string lastName)
|
public UserProfileData GetUserProfile(string firstName, string lastName)
|
||||||
{
|
{
|
||||||
return GetUserProfile(firstName + " " + lastName);
|
return GetUserProfile(firstName, lastName);
|
||||||
}
|
}
|
||||||
public UserProfileData GetUserProfile(string name)
|
public UserProfileData GetUserProfile(string name)
|
||||||
{
|
{
|
||||||
|
|
Loading…
Reference in New Issue