aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Communications/UserManagerBase.cs
diff options
context:
space:
mode:
authorTeravus Ovares2008-01-20 23:08:50 +0000
committerTeravus Ovares2008-01-20 23:08:50 +0000
commita3851b3812aae6221714b1e61656d0853fce7124 (patch)
tree8867b4d6c433b0230f276f88a95625695fb71390 /OpenSim/Framework/Communications/UserManagerBase.cs
parentGraceful failure of teleport to unavailable regions might actually work now. (diff)
downloadopensim-SC_OLD-a3851b3812aae6221714b1e61656d0853fce7124.zip
opensim-SC_OLD-a3851b3812aae6221714b1e61656d0853fce7124.tar.gz
opensim-SC_OLD-a3851b3812aae6221714b1e61656d0853fce7124.tar.bz2
opensim-SC_OLD-a3851b3812aae6221714b1e61656d0853fce7124.tar.xz
* Added hooks for logout to all IUserService and all that implement it.
* Added a Logout message with a name on the console * Added a *fixme* message to figure out why the current agent session is null * After updating you may notice that there's a login <user> and also a logout<user>
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r--OpenSim/Framework/Communications/UserManagerBase.cs37
1 files changed, 37 insertions, 0 deletions
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();