aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserManager.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer/UserManager.cs')
-rw-r--r--OpenSim/Grid/UserServer/UserManager.cs47
1 files changed, 47 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs
index f7e4e3c..04510b2 100644
--- a/OpenSim/Grid/UserServer/UserManager.cs
+++ b/OpenSim/Grid/UserServer/UserManager.cs
@@ -758,5 +758,52 @@ namespace OpenSim.Grid.UserServer
758 { 758 {
759 throw new Exception("The method or operation is not implemented."); 759 throw new Exception("The method or operation is not implemented.");
760 } 760 }
761
762 public void HandleAgentLocation(UUID agentID, UUID regionID, ulong regionHandle)
763 {
764 UserProfileData userProfile = GetUserProfile(agentID);
765 if (userProfile != null)
766 {
767 userProfile.CurrentAgent.Region = regionID;
768 userProfile.CurrentAgent.Handle = regionHandle;
769 CommitAgent(ref userProfile);
770 }
771 }
772
773 public void HandleAgentLeaving(UUID agentID, UUID regionID, ulong regionHandle)
774 {
775 UserProfileData userProfile = GetUserProfile(agentID);
776 if (userProfile != null)
777 {
778 if (userProfile.CurrentAgent.Region == regionID)
779 {
780 UserAgentData userAgent = userProfile.CurrentAgent;
781 if (userAgent != null && userAgent.AgentOnline)
782 {
783 userAgent.AgentOnline = false;
784 userAgent.LogoutTime = Util.UnixTimeSinceEpoch();
785 if (regionID != UUID.Zero)
786 {
787 userAgent.Region = regionID;
788 }
789 userAgent.Handle = regionHandle;
790 userProfile.LastLogin = userAgent.LogoutTime;
791
792 CommitAgent(ref userProfile);
793 }
794 }
795 }
796 }
797
798 public void HandleRegionStartup(UUID regionID)
799 {
800 LogoutUsers(regionID);
801 }
802
803 public void HandleRegionShutdown(UUID regionID)
804 {
805 LogoutUsers(regionID);
806 }
807
761 } 808 }
762} 809}