aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer/UserLoginService.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Grid/UserServer/UserLoginService.cs')
-rw-r--r--OpenSim/Grid/UserServer/UserLoginService.cs59
1 files changed, 59 insertions, 0 deletions
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs
index 628c471..d538d36 100644
--- a/OpenSim/Grid/UserServer/UserLoginService.cs
+++ b/OpenSim/Grid/UserServer/UserLoginService.cs
@@ -60,6 +60,65 @@ namespace OpenSim.Grid.UserServer
60 { 60 {
61 m_config = config; 61 m_config = config;
62 } 62 }
63 public override void LogOffUser(UserProfileData theUser, string message)
64 {
65 RegionProfileData SimInfo = null;
66 try
67 {
68 SimInfo = RegionProfileData.RequestSimProfileData(
69 theUser.CurrentAgent.Handle, m_config.GridServerURL,
70 m_config.GridSendKey, m_config.GridRecvKey);
71 if (SimInfo == null)
72 {
73 m_log.Error("[GRID]: Region user was in isn't currently logged in");
74 return;
75 }
76
77 }
78 catch (Exception)
79 {
80 m_log.Error("[GRID]: Unable to look up region to log user off");
81 return;
82 }
83 // Prepare notification
84 Hashtable SimParams = new Hashtable();
85 SimParams["agent_id"] = theUser.ID.ToString();
86 SimParams["region_secret"] = theUser.CurrentAgent.SecureSessionID.ToString();
87 //SimParams["region_secret"] = SimInfo.regionSecret;
88 //m_log.Info(SimInfo.regionSecret);
89 SimParams["regionhandle"] = theUser.CurrentAgent.Handle.ToString();
90 SimParams["message"] = message;
91 ArrayList SendParams = new ArrayList();
92 SendParams.Add(SimParams);
93
94 // Update agent with target sim
95
96 m_log.InfoFormat(
97 "[ASSUMED CRASH]: Telling region {0} @ {1},{2} ({3}) that their agent is dead: {4}",
98 SimInfo.regionName, SimInfo.regionLocX, SimInfo.regionLocY, SimInfo.httpServerURI, theUser.FirstName + " " + theUser.SurName);
99 try
100 {
101 XmlRpcRequest GridReq = new XmlRpcRequest("logoff_user", SendParams);
102 XmlRpcResponse GridResp = GridReq.Send(SimInfo.httpServerURI, 6000);
103
104 if (GridResp.IsFault)
105 {
106 m_log.ErrorFormat(
107 "[LOGIN]: XMLRPC request for {0} failed, fault code: {1}, reason: {2}, This is likely an old region revision.",
108 SimInfo.httpServerURI, GridResp.FaultCode, GridResp.FaultString);
109 }
110 }
111 catch (Exception)
112 {
113 m_log.Error("[LOGIN]: Error telling region to logout user!");
114 }
115
116 //base.LogOffUser(theUser);
117 }
118 //public override void LogOffUser(UserProfileData theUser)
119 //{
120
121 //}
63 122
64 /// <summary> 123 /// <summary>
65 /// Customises the login response and fills in missing values. 124 /// Customises the login response and fills in missing values.