aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Communications/CommunicationsManager.cs13
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs37
-rw-r--r--OpenSim/Framework/Data.DB4o/DB4oUserData.cs5
-rw-r--r--OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs5
-rw-r--r--OpenSim/Framework/Data.MySQL/MySQLUserData.cs4
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs6
-rw-r--r--OpenSim/Framework/Data.SQLite/SQLiteUserData.cs4
-rw-r--r--OpenSim/Framework/IUserData.cs6
-rw-r--r--OpenSim/Framework/IUserService.cs10
9 files changed, 65 insertions, 25 deletions
diff --git a/OpenSim/Framework/Communications/CommunicationsManager.cs b/OpenSim/Framework/Communications/CommunicationsManager.cs
index a07b165..baf24f0 100644
--- a/OpenSim/Framework/Communications/CommunicationsManager.cs
+++ b/OpenSim/Framework/Communications/CommunicationsManager.cs
@@ -163,6 +163,19 @@ namespace OpenSim.Framework.Communications
163 { 163 {
164 m_userService.AddNewUserFriend(friendlistowner, friend, perms); 164 m_userService.AddNewUserFriend(friendlistowner, friend, perms);
165 } 165 }
166 /// <summary>
167 /// Logs off a user and does the appropriate communications
168 /// </summary>
169 /// <param name="userid"></param>
170 /// <param name="regionid"></param>
171 /// <param name="regionhandle"></param>
172 /// <param name="posx"></param>
173 /// <param name="posy"></param>
174 /// <param name="posz"></param>
175 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz)
176 {
177 m_userService.LogOffUser(userid, regionid, regionhandle, posx, posy, posz);
178 }
166 179
167 /// <summary> 180 /// <summary>
168 /// Delete friend on friendlistowner's friendlist. 181 /// Delete friend on friendlistowner's friendlist.
diff --git a/OpenSim/Framework/Communications/UserManagerBase.cs b/OpenSim/Framework/Communications/UserManagerBase.cs
index 4216553..8821776 100644
--- a/OpenSim/Framework/Communications/UserManagerBase.cs
+++ b/OpenSim/Framework/Communications/UserManagerBase.cs
@@ -411,7 +411,44 @@ namespace OpenSim.Framework.UserManagement
411 411
412 profile.currentAgent = agent; 412 profile.currentAgent = agent;
413 } 413 }
414 public void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz)
415 {
416 UserProfileData userProfile;
417 UserAgentData userAgent;
418 LLVector3 currentPos = new LLVector3(posx, posy, posz);
419
420 userProfile = GetUserProfile(userid);
421
422 if (userProfile != null)
423 {
424
425 userAgent = userProfile.currentAgent;
426 if (userAgent != null)
427 {
428 userAgent.agentOnline = false;
429 userAgent.logoutTime = Util.UnixTimeSinceEpoch();
430 userAgent.sessionID = LLUUID.Zero;
431 userAgent.currentRegion = regionid;
432 userAgent.currentHandle = regionhandle;
433
434 userAgent.currentPos = currentPos;
435
436 userProfile.currentAgent = userAgent;
437
414 438
439 CommitAgent(ref userProfile);
440 }
441 else
442 {
443 MainLog.Instance.Verbose("LOGOUT", "didn't save logout position, currentAgent is null *do Fix ");
444 }
445 MainLog.Instance.Verbose("LOGOUT", userProfile.username + " " + userProfile.surname);
446 }
447 else
448 {
449 MainLog.Instance.Warn("LOGOUT", "Unknown User logged out");
450 }
451 }
415 public void CreateAgent(UserProfileData profile, LLSD request) 452 public void CreateAgent(UserProfileData profile, LLSD request)
416 { 453 {
417 UserAgentData agent = new UserAgentData(); 454 UserAgentData agent = new UserAgentData();
diff --git a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
index 47521e4..6059cbe 100644
--- a/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
+++ b/OpenSim/Framework/Data.DB4o/DB4oUserData.cs
@@ -169,10 +169,7 @@ namespace OpenSim.Framework.Data.DB4o
169 //MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); 169 //MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
170 } 170 }
171 171
172 public void LogOffUser(LLUUID avatarid) 172
173 {
174 //MainLog.Instance.Verbose("USER", "Stub LogOffUser called");
175 }
176 173
177 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 174 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
178 { 175 {
diff --git a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
index 429ed39..aa0526c 100644
--- a/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
+++ b/OpenSim/Framework/Data.MSSQL/MSSQLUserData.cs
@@ -129,10 +129,7 @@ namespace OpenSim.Framework.Data.MSSQL
129 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); 129 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
130 } 130 }
131 131
132 public void LogOffUser(LLUUID avatarid) 132
133 {
134 MainLog.Instance.Verbose("USER", "Stub LogOffUser called");
135 }
136 133
137 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 134 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
138 { 135 {
diff --git a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
index f637db6..2ee20e0 100644
--- a/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
+++ b/OpenSim/Framework/Data.MySQL/MySQLUserData.cs
@@ -331,10 +331,6 @@ namespace OpenSim.Framework.Data.MySQL
331 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); 331 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
332 } 332 }
333 333
334 public void LogOffUser(LLUUID avatarid)
335 {
336 MainLog.Instance.Verbose("USER", "Stub LogOffUser called");
337 }
338 334
339 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 335 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
340 { 336 {
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
index 1364d3e..2e22f00 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteRegionData.cs
@@ -188,9 +188,9 @@ namespace OpenSim.Framework.Data.SQLite
188 } 188 }
189 else if (prim.Stopped) 189 else if (prim.Stopped)
190 { 190 {
191 MainLog.Instance.Verbose("DATASTORE", 191 //MainLog.Instance.Verbose("DATASTORE",
192 "Adding stopped obj: " + obj.UUID + " to region: " + regionUUID); 192 //"Adding stopped obj: " + obj.UUID + " to region: " + regionUUID);
193 addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID)); 193 //addPrim(prim, Util.ToRawUuidString(obj.UUID), Util.ToRawUuidString(regionUUID));
194 } 194 }
195 else 195 else
196 { 196 {
diff --git a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
index ed8275e..ac7340d 100644
--- a/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
+++ b/OpenSim/Framework/Data.SQLite/SQLiteUserData.cs
@@ -234,10 +234,6 @@ namespace OpenSim.Framework.Data.SQLite
234 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called"); 234 MainLog.Instance.Verbose("USER", "Stub UpdateUserCUrrentRegion called");
235 } 235 }
236 236
237 public void LogOffUser(LLUUID avatarid)
238 {
239 MainLog.Instance.Verbose("USER", "Stub LogOffUser called");
240 }
241 237
242 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query) 238 public List<Framework.AvatarPickerAvatar> GeneratePickerResults(LLUUID queryID, string query)
243 { 239 {
diff --git a/OpenSim/Framework/IUserData.cs b/OpenSim/Framework/IUserData.cs
index 9fd6fa8..45ba7fa 100644
--- a/OpenSim/Framework/IUserData.cs
+++ b/OpenSim/Framework/IUserData.cs
@@ -106,12 +106,6 @@ namespace OpenSim.Framework
106 void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid); 106 void UpdateUserCurrentRegion(LLUUID avatarid, LLUUID regionuuid);
107 107
108 /// <summary> 108 /// <summary>
109 /// Log User Off
110 /// </summary>
111 /// <param name="avatarid">avatar to log off</param>
112 void LogOffUser(LLUUID avatarid);
113
114 /// <summary>
115 /// Adds a new agent to the database 109 /// Adds a new agent to the database
116 /// </summary> 110 /// </summary>
117 /// <param name="agent">The agent to add</param> 111 /// <param name="agent">The agent to add</param>
diff --git a/OpenSim/Framework/IUserService.cs b/OpenSim/Framework/IUserService.cs
index 2b59c25..f1f3c81 100644
--- a/OpenSim/Framework/IUserService.cs
+++ b/OpenSim/Framework/IUserService.cs
@@ -73,6 +73,16 @@ namespace OpenSim.Framework
73 void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms); 73 void UpdateUserFriendPerms(LLUUID friendlistowner, LLUUID friend, uint perms);
74 74
75 /// <summary> 75 /// <summary>
76 /// Logs off a user on the user server
77 /// </summary>
78 /// <param name="UserID">UUID of the user</param>
79 /// <param name="regionData">UUID of the Region</param>
80 /// <param name="posx">final position x</param>
81 /// <param name="posy">final position y</param>
82 /// <param name="posz">final position z</param>
83 void LogOffUser(LLUUID userid, LLUUID regionid, ulong regionhandle, float posx, float posy, float posz);
84
85 /// <summary>
76 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner 86 /// Returns a list of FriendsListItems that describe the friends and permissions in the friend relationship for LLUUID friendslistowner
77 /// </summary> 87 /// </summary>
78 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param> 88 /// <param name="friendlistowner">The agent that we're retreiving the friends Data.</param>