diff options
Diffstat (limited to 'OpenSim/Framework/Communications/UserManagerBase.cs')
-rw-r--r-- | OpenSim/Framework/Communications/UserManagerBase.cs | 37 |
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(); |