diff options
Diffstat (limited to 'OpenSim/Grid')
-rw-r--r-- | OpenSim/Grid/MessagingServer/Main.cs | 2 | ||||
-rw-r--r-- | OpenSim/Grid/MessagingServer/MessageService.cs | 103 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/Main.cs | 13 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/MessageServersConnector.cs | 97 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserLoginService.cs | 12 | ||||
-rw-r--r-- | OpenSim/Grid/UserServer/UserManager.cs | 11 |
6 files changed, 191 insertions, 47 deletions
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index 5a383ef..bbf25f6 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs | |||
@@ -94,7 +94,7 @@ namespace OpenSim.Grid.MessagingServer | |||
94 | if (msgsvc.registerWithUserServer()) | 94 | if (msgsvc.registerWithUserServer()) |
95 | { | 95 | { |
96 | httpServer.AddXmlRPCHandler("login_to_simulator", msgsvc.UserLoggedOn); | 96 | httpServer.AddXmlRPCHandler("login_to_simulator", msgsvc.UserLoggedOn); |
97 | 97 | httpServer.AddXmlRPCHandler("logout_of_simulator", msgsvc.UserLoggedOff); | |
98 | //httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); | 98 | //httpServer.AddXmlRPCHandler("get_user_by_name", m_userManager.XmlRPCGetUserMethodName); |
99 | //httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID); | 99 | //httpServer.AddXmlRPCHandler("get_user_by_uuid", m_userManager.XmlRPCGetUserMethodUUID); |
100 | //httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", m_userManager.XmlRPCGetAvatarPickerAvatar); | 100 | //httpServer.AddXmlRPCHandler("get_avatar_picker_avatar", m_userManager.XmlRPCGetAvatarPickerAvatar); |
diff --git a/OpenSim/Grid/MessagingServer/MessageService.cs b/OpenSim/Grid/MessagingServer/MessageService.cs index 42277e2..d0b939b 100644 --- a/OpenSim/Grid/MessagingServer/MessageService.cs +++ b/OpenSim/Grid/MessagingServer/MessageService.cs | |||
@@ -101,22 +101,28 @@ namespace OpenSim.Grid.MessagingServer | |||
101 | /// <param name="userpresence">The Agent we're processing the friendlist subscriptions</param> | 101 | /// <param name="userpresence">The Agent we're processing the friendlist subscriptions</param> |
102 | public void ProcessFriendListSubscriptions(UserPresenceData userpresence) | 102 | public void ProcessFriendListSubscriptions(UserPresenceData userpresence) |
103 | { | 103 | { |
104 | lock (m_presences) | ||
105 | { | ||
106 | if (!m_presences.Contains(userpresence.agentData.AgentID)) | ||
107 | m_presences.Add(userpresence.agentData.AgentID, userpresence); | ||
108 | } | ||
109 | |||
104 | List<FriendListItem> uFriendList = userpresence.friendData; | 110 | List<FriendListItem> uFriendList = userpresence.friendData; |
105 | for (int i = 0; i < uFriendList.Count; i++) | 111 | for (int i = 0; i < uFriendList.Count; i++) |
106 | { | 112 | { |
107 | m_presence_BackReferences.Add(userpresence.agentData.AgentID, uFriendList[i].Friend); | 113 | //m_presence_BackReferences.Add(userpresence.agentData.AgentID, uFriendList[i].Friend); |
108 | m_presence_BackReferences.Add(uFriendList[i].Friend, userpresence.agentData.AgentID); | 114 | // m_presence_BackReferences.Add(uFriendList[i].Friend, userpresence.agentData.AgentID); |
109 | 115 | ||
110 | if (m_presences.Contains(uFriendList[i].Friend)) | 116 | if (m_presences.Contains(uFriendList[i].Friend)) |
111 | { | 117 | { |
112 | UserPresenceData friendup = (UserPresenceData)m_presences[uFriendList[i]]; | 118 | UserPresenceData friendup = (UserPresenceData)m_presences[uFriendList[i].Friend]; |
113 | // Add backreference | 119 | // Add backreference |
114 | 120 | ||
115 | SubscribeToPresenceUpdates(userpresence, friendup, uFriendList[i],i); | 121 | SubscribeToPresenceUpdates(userpresence, friendup, uFriendList[i],i); |
116 | } | 122 | } |
117 | } | 123 | } |
118 | 124 | ||
119 | m_presences.Add(userpresence.agentData.AgentID, userpresence); | 125 | |
120 | } | 126 | } |
121 | 127 | ||
122 | /// <summary> | 128 | /// <summary> |
@@ -220,23 +226,47 @@ namespace OpenSim.Grid.MessagingServer | |||
220 | /// <param name="AgentID"></param> | 226 | /// <param name="AgentID"></param> |
221 | private void ProcessLogOff(LLUUID AgentID) | 227 | private void ProcessLogOff(LLUUID AgentID) |
222 | { | 228 | { |
223 | if (m_presences.Contains(AgentID)) | 229 | UserPresenceData AgentData = null; |
230 | List<LLUUID> AgentsNeedingNotification = new List<LLUUID>(); | ||
231 | UserPresenceData friendd = null; | ||
232 | lock (m_presences) | ||
233 | { | ||
234 | if (m_presences.Contains(AgentID)) | ||
235 | { | ||
236 | AgentData = (UserPresenceData)m_presences[AgentID]; | ||
237 | } | ||
238 | } | ||
239 | |||
240 | if (AgentData != null) | ||
224 | { | 241 | { |
225 | UserPresenceData AgentData = (UserPresenceData)m_presences[AgentID]; | 242 | AgentsNeedingNotification = AgentData.subscriptionData; |
243 | //lock (m_presence_BackReferences) | ||
244 | //{ | ||
245 | //if (m_presence_BackReferences.Contains(AgentID)) | ||
246 | //{ | ||
247 | //AgentsNeedingNotification = (List<LLUUID>)m_presence_BackReferences[AgentID]; | ||
248 | //} | ||
249 | //} | ||
226 | 250 | ||
227 | if (m_presence_BackReferences.Contains(AgentID)) | 251 | |
252 | for (int i = 0; i < AgentsNeedingNotification.Count; i++) | ||
228 | { | 253 | { |
229 | List<LLUUID> AgentsNeedingNotification = (List<LLUUID>)m_presence_BackReferences[AgentID]; | 254 | // TODO: Do Region Notifications |
230 | for (int i = 0; i < AgentsNeedingNotification.Count; i++) | 255 | lock(m_presences) |
231 | { | 256 | { |
232 | // TODO: Do Region Notifications | ||
233 | if (m_presences.Contains(AgentsNeedingNotification[i])) | 257 | if (m_presences.Contains(AgentsNeedingNotification[i])) |
234 | { | 258 | { |
235 | UserPresenceData friendd = (UserPresenceData)m_presences[AgentsNeedingNotification[i]]; | 259 | friendd = (UserPresenceData)m_presences[AgentsNeedingNotification[i]]; |
236 | 260 | } | |
237 | // This might need to be enumerated and checked before we try to remove it. | 261 | } |
262 | |||
263 | // This might need to be enumerated and checked before we try to remove it. | ||
264 | if (friendd != null) | ||
265 | { | ||
266 | lock (friendd) | ||
267 | { | ||
238 | friendd.subscriptionData.Remove(AgentID); | 268 | friendd.subscriptionData.Remove(AgentID); |
239 | 269 | ||
240 | List<FriendListItem> fl = friendd.friendData; | 270 | List<FriendListItem> fl = friendd.friendData; |
241 | for (int j = 0; j < fl.Count; j++) | 271 | for (int j = 0; j < fl.Count; j++) |
242 | { | 272 | { |
@@ -247,15 +277,19 @@ namespace OpenSim.Grid.MessagingServer | |||
247 | 277 | ||
248 | } | 278 | } |
249 | friendd.friendData = fl; | 279 | friendd.friendData = fl; |
250 | 280 | m_presences[AgentsNeedingNotification[i]] = friendd; | |
251 | SendRegionPresenceUpdate(AgentData, friendd); | ||
252 | 281 | ||
253 | } | 282 | } |
254 | removeBackReference(AgentID, AgentsNeedingNotification[i]); | 283 | SendRegionPresenceUpdate(AgentData, friendd); |
284 | |||
255 | 285 | ||
286 | //removeBackReference(AgentID, AgentsNeedingNotification[i]); | ||
256 | } | 287 | } |
288 | |||
257 | } | 289 | } |
290 | |||
258 | } | 291 | } |
292 | |||
259 | } | 293 | } |
260 | 294 | ||
261 | 295 | ||
@@ -335,12 +369,24 @@ namespace OpenSim.Grid.MessagingServer | |||
335 | { | 369 | { |
336 | m_log.Info("[LOGON]: User logged on, building indexes for user"); | 370 | m_log.Info("[LOGON]: User logged on, building indexes for user"); |
337 | Hashtable requestData = (Hashtable)request.Params[0]; | 371 | Hashtable requestData = (Hashtable)request.Params[0]; |
372 | |||
373 | //requestData["sendkey"] = serv.sendkey; | ||
374 | //requestData["agentid"] = agentID.ToString(); | ||
375 | //requestData["sessionid"] = sessionID.ToString(); | ||
376 | //requestData["regionid"] = RegionID.ToString(); | ||
377 | //requestData["regionhandle"] = regionhandle.ToString(); | ||
378 | //requestData["positionx"] = positionX.ToString(); | ||
379 | //requestData["positiony"] = positionY.ToString(); | ||
380 | //requestData["positionz"] = positionZ.ToString(); | ||
381 | //requestData["firstname"] = firstname; | ||
382 | //requestData["lastname"] = lastname; | ||
383 | |||
338 | AgentCircuitData agentData = new AgentCircuitData(); | 384 | AgentCircuitData agentData = new AgentCircuitData(); |
339 | agentData.SessionID = new LLUUID((string)requestData["session_id"]); | 385 | agentData.SessionID = new LLUUID((string)requestData["sessionid"]); |
340 | agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); | 386 | agentData.SecureSessionID = new LLUUID((string)requestData["secure_session_id"]); |
341 | agentData.firstname = (string)requestData["firstname"]; | 387 | agentData.firstname = (string)requestData["firstname"]; |
342 | agentData.lastname = (string)requestData["lastname"]; | 388 | agentData.lastname = (string)requestData["lastname"]; |
343 | agentData.AgentID = new LLUUID((string)requestData["agent_id"]); | 389 | agentData.AgentID = new LLUUID((string)requestData["agentid"]); |
344 | agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); | 390 | agentData.circuitcode = Convert.ToUInt32(requestData["circuit_code"]); |
345 | agentData.CapsPath = (string)requestData["caps_path"]; | 391 | agentData.CapsPath = (string)requestData["caps_path"]; |
346 | 392 | ||
@@ -351,9 +397,9 @@ namespace OpenSim.Grid.MessagingServer | |||
351 | else | 397 | else |
352 | { | 398 | { |
353 | agentData.startpos = | 399 | agentData.startpos = |
354 | new LLVector3(Convert.ToUInt32(requestData["startpos_x"]), | 400 | new LLVector3(Convert.ToUInt32(requestData["positionx"]), |
355 | Convert.ToUInt32(requestData["startpos_y"]), | 401 | Convert.ToUInt32(requestData["positiony"]), |
356 | Convert.ToUInt32(requestData["startpos_z"])); | 402 | Convert.ToUInt32(requestData["positionz"])); |
357 | agentData.child = false; | 403 | agentData.child = false; |
358 | } | 404 | } |
359 | 405 | ||
@@ -383,10 +429,10 @@ namespace OpenSim.Grid.MessagingServer | |||
383 | 429 | ||
384 | Hashtable requestData = (Hashtable)request.Params[0]; | 430 | Hashtable requestData = (Hashtable)request.Params[0]; |
385 | 431 | ||
386 | LLUUID AgentID = new LLUUID((string)requestData["agent_id"]); | 432 | LLUUID AgentID = new LLUUID((string)requestData["agentid"]); |
387 | 433 | ||
388 | 434 | ||
389 | //ProcessLogOff(AgentID); | 435 | ProcessLogOff(AgentID); |
390 | 436 | ||
391 | 437 | ||
392 | return new XmlRpcResponse(); | 438 | return new XmlRpcResponse(); |
@@ -458,8 +504,13 @@ namespace OpenSim.Grid.MessagingServer | |||
458 | regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); | 504 | regionProfile.remotingPort = Convert.ToUInt32((string)responseData["remoting_port"]); |
459 | regionProfile.UUID = new LLUUID((string)responseData["region_UUID"]); | 505 | regionProfile.UUID = new LLUUID((string)responseData["region_UUID"]); |
460 | regionProfile.regionName = (string)responseData["region_name"]; | 506 | regionProfile.regionName = (string)responseData["region_name"]; |
461 | 507 | lock (m_regionInfoCache) | |
462 | m_regionInfoCache.Add(regionHandle, regionProfile); | 508 | { |
509 | if (!m_regionInfoCache.Contains(regionHandle)) | ||
510 | { | ||
511 | m_regionInfoCache.Add(regionHandle, regionProfile); | ||
512 | } | ||
513 | } | ||
463 | } | 514 | } |
464 | catch (WebException) | 515 | catch (WebException) |
465 | { | 516 | { |
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs index 3a3b8b6..fcf9de6 100644 --- a/OpenSim/Grid/UserServer/Main.cs +++ b/OpenSim/Grid/UserServer/Main.cs | |||
@@ -98,6 +98,7 @@ namespace OpenSim.Grid.UserServer | |||
98 | m_messagesService = new MessageServersConnector(); | 98 | m_messagesService = new MessageServersConnector(); |
99 | 99 | ||
100 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; | 100 | m_loginService.OnUserLoggedInAtLocation += NotifyMessageServersUserLoggedInToLocation; |
101 | m_userManager.OnLogOffUser += NotifyMessageServersUserLoggOff; | ||
101 | 102 | ||
102 | m_log.Info("[REGION]: Starting HTTP process"); | 103 | m_log.Info("[REGION]: Starting HTTP process"); |
103 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); | 104 | BaseHttpServer httpServer = new BaseHttpServer(Cfg.HttpPort); |
@@ -225,10 +226,18 @@ namespace OpenSim.Grid.UserServer | |||
225 | m_console.Notice("response got"); | 226 | m_console.Notice("response got"); |
226 | } | 227 | } |
227 | 228 | ||
228 | public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position) | 229 | public void NotifyMessageServersUserLoggOff(LLUUID agentID) |
230 | { | ||
231 | m_messagesService.TellMessageServersAboutUserLogoff(agentID); | ||
232 | } | ||
233 | |||
234 | public void NotifyMessageServersUserLoggedInToLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, | ||
235 | ulong regionhandle, float positionX, float positionY, | ||
236 | float positionZ, string firstname, string lastname) | ||
229 | { | 237 | { |
230 | 238 | ||
231 | m_messagesService.TellMessageServersAboutUser(agentID, sessionID, RegionID, regionhandle, Position); | 239 | m_messagesService.TellMessageServersAboutUser( agentID, sessionID, RegionID, regionhandle, positionX, |
240 | positionY, positionZ, firstname, lastname); | ||
232 | } | 241 | } |
233 | 242 | ||
234 | /*private void ConfigDB(IGenericConfig configData) | 243 | /*private void ConfigDB(IGenericConfig configData) |
diff --git a/OpenSim/Grid/UserServer/MessageServersConnector.cs b/OpenSim/Grid/UserServer/MessageServersConnector.cs index 6535247..79d1147 100644 --- a/OpenSim/Grid/UserServer/MessageServersConnector.cs +++ b/OpenSim/Grid/UserServer/MessageServersConnector.cs | |||
@@ -52,12 +52,20 @@ namespace OpenSim.Grid.UserServer | |||
52 | 52 | ||
53 | public void RegisterMessageServer(string URI, MessageServerInfo serverData) | 53 | public void RegisterMessageServer(string URI, MessageServerInfo serverData) |
54 | { | 54 | { |
55 | MessageServers.Add(URI, serverData); | 55 | lock (MessageServers) |
56 | { | ||
57 | if (!MessageServers.ContainsKey(URI)) | ||
58 | MessageServers.Add(URI, serverData); | ||
59 | } | ||
56 | } | 60 | } |
57 | 61 | ||
58 | public void DeRegisterMessageServer(string URI) | 62 | public void DeRegisterMessageServer(string URI) |
59 | { | 63 | { |
60 | MessageServers.Remove(URI); | 64 | lock (MessageServers) |
65 | { | ||
66 | if (MessageServers.ContainsKey(URI)) | ||
67 | MessageServers.Remove(URI); | ||
68 | } | ||
61 | } | 69 | } |
62 | 70 | ||
63 | public void AddResponsibleRegion(string URI, ulong regionhandle) | 71 | public void AddResponsibleRegion(string URI, ulong regionhandle) |
@@ -150,24 +158,73 @@ namespace OpenSim.Grid.UserServer | |||
150 | return response; | 158 | return response; |
151 | } | 159 | } |
152 | 160 | ||
153 | public void TellMessageServersAboutUser(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position) | 161 | public void TellMessageServersAboutUser(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, |
162 | ulong regionhandle, float positionX, float positionY, | ||
163 | float positionZ, string firstname, string lastname) | ||
154 | { | 164 | { |
155 | // Loop over registered Message Servers ( AND THERE WILL BE MORE THEN ONE :D ) | 165 | // Loop over registered Message Servers ( AND THERE WILL BE MORE THEN ONE :D ) |
156 | if (MessageServers.Count > 0) | 166 | lock (MessageServers) |
157 | { | 167 | { |
158 | m_log.Info("[MSGCONNECTOR]: Sending login notice to registered message servers"); | 168 | if (MessageServers.Count > 0) |
169 | { | ||
170 | m_log.Info("[MSGCONNECTOR]: Sending login notice to registered message servers"); | ||
171 | } | ||
172 | else | ||
173 | { | ||
174 | m_log.Info("[MSGCONNECTOR]: No Message Servers registered, ignoring"); | ||
175 | } | ||
176 | foreach (MessageServerInfo serv in MessageServers.Values) | ||
177 | { | ||
178 | NotifyMessageServerAboutUser(serv, agentID, sessionID, RegionID, | ||
179 | regionhandle, positionX, positionY, positionZ, | ||
180 | firstname, lastname); | ||
181 | } | ||
159 | } | 182 | } |
160 | else | 183 | } |
184 | |||
185 | public void TellMessageServersAboutUserLogoff(LLUUID agentID) | ||
186 | { | ||
187 | lock (MessageServers) | ||
188 | { | ||
189 | if (MessageServers.Count > 0) | ||
190 | { | ||
191 | m_log.Info("[MSGCONNECTOR]: Sending login notice to registered message servers"); | ||
192 | } | ||
193 | else | ||
194 | { | ||
195 | m_log.Info("[MSGCONNECTOR]: No Message Servers registered, ignoring"); | ||
196 | } | ||
197 | foreach (MessageServerInfo serv in MessageServers.Values) | ||
198 | { | ||
199 | NotifyMessageServerAboutUserLogoff(serv,agentID); | ||
200 | } | ||
201 | } | ||
202 | } | ||
203 | |||
204 | private void NotifyMessageServerAboutUserLogoff(MessageServerInfo serv, LLUUID agentID) | ||
205 | { | ||
206 | Hashtable reqparams = new Hashtable(); | ||
207 | reqparams["sendkey"] = serv.sendkey; | ||
208 | reqparams["agentid"] = agentID.ToString(); | ||
209 | ArrayList SendParams = new ArrayList(); | ||
210 | SendParams.Add(reqparams); | ||
211 | |||
212 | XmlRpcRequest GridReq = new XmlRpcRequest("logout_of_simulator", SendParams); | ||
213 | try | ||
161 | { | 214 | { |
162 | m_log.Info("[MSGCONNECTOR]: No Message Servers registered, ignoring"); | 215 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); |
163 | } | 216 | } |
164 | foreach (MessageServerInfo serv in MessageServers.Values) | 217 | catch (System.Net.WebException) |
165 | { | 218 | { |
166 | NotifyMessageServerAboutUser(serv, agentID, sessionID, RegionID, regionhandle, Position); | 219 | m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about log out. Other users might still think this user is online"); |
167 | } | 220 | } |
221 | m_log.Info("[LOGOUT]: Notified : " + serv.URI + " about user logout"); | ||
168 | } | 222 | } |
169 | 223 | ||
170 | private void NotifyMessageServerAboutUser(MessageServerInfo serv, LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position) | 224 | private void NotifyMessageServerAboutUser(MessageServerInfo serv, |
225 | LLUUID agentID, LLUUID sessionID, LLUUID RegionID, | ||
226 | ulong regionhandle, float positionX, float positionY, float positionZ, | ||
227 | string firstname, string lastname) | ||
171 | { | 228 | { |
172 | Hashtable reqparams = new Hashtable(); | 229 | Hashtable reqparams = new Hashtable(); |
173 | reqparams["sendkey"] = serv.sendkey; | 230 | reqparams["sendkey"] = serv.sendkey; |
@@ -175,14 +232,28 @@ namespace OpenSim.Grid.UserServer | |||
175 | reqparams["sessionid"] = sessionID.ToString(); | 232 | reqparams["sessionid"] = sessionID.ToString(); |
176 | reqparams["regionid"] = RegionID.ToString(); | 233 | reqparams["regionid"] = RegionID.ToString(); |
177 | reqparams["regionhandle"] = regionhandle.ToString(); | 234 | reqparams["regionhandle"] = regionhandle.ToString(); |
178 | reqparams["position"] = Position.ToString(); | 235 | reqparams["positionx"] = positionX.ToString(); |
236 | reqparams["positiony"] = positionY.ToString(); | ||
237 | reqparams["positionz"] = positionZ.ToString(); | ||
238 | reqparams["firstname"] = firstname; | ||
239 | reqparams["lastname"] = lastname; | ||
240 | |||
241 | //reqparams["position"] = Position.ToString(); | ||
179 | 242 | ||
180 | ArrayList SendParams = new ArrayList(); | 243 | ArrayList SendParams = new ArrayList(); |
181 | SendParams.Add(reqparams); | 244 | SendParams.Add(reqparams); |
182 | 245 | ||
183 | XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); | 246 | XmlRpcRequest GridReq = new XmlRpcRequest("login_to_simulator", SendParams); |
184 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); | 247 | try |
185 | m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); | 248 | { |
249 | XmlRpcResponse GridResp = GridReq.Send(serv.URI, 6000); | ||
250 | m_log.Info("[LOGIN]: Notified : " + serv.URI + " about user login"); | ||
251 | } | ||
252 | catch (System.Net.WebException) | ||
253 | { | ||
254 | m_log.Warn("[MSGCONNECTOR]: Unable to notify Message Server about login. Presence might be borked for this user"); | ||
255 | } | ||
256 | |||
186 | } | 257 | } |
187 | } | 258 | } |
188 | } | 259 | } |
diff --git a/OpenSim/Grid/UserServer/UserLoginService.cs b/OpenSim/Grid/UserServer/UserLoginService.cs index a82b978..143c990 100644 --- a/OpenSim/Grid/UserServer/UserLoginService.cs +++ b/OpenSim/Grid/UserServer/UserLoginService.cs | |||
@@ -44,7 +44,9 @@ using InventoryFolder=OpenSim.Framework.InventoryFolder; | |||
44 | 44 | ||
45 | namespace OpenSim.Grid.UserServer | 45 | namespace OpenSim.Grid.UserServer |
46 | { | 46 | { |
47 | public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, ulong regionhandle, LLVector3 Position); | 47 | |
48 | public delegate void UserLoggedInAtLocation(LLUUID agentID, LLUUID sessionID, LLUUID RegionID, | ||
49 | ulong regionhandle, float positionX, float positionY, float positionZ, string firstname, string lastname); | ||
48 | 50 | ||
49 | public class UserLoginService : LoginService | 51 | public class UserLoginService : LoginService |
50 | { | 52 | { |
@@ -149,7 +151,9 @@ namespace OpenSim.Grid.UserServer | |||
149 | if (handler001 != null) | 151 | if (handler001 != null) |
150 | { | 152 | { |
151 | m_log.Info("[LOGIN]: Letting other objects know about login"); | 153 | m_log.Info("[LOGIN]: Letting other objects know about login"); |
152 | handler001(theUser.UUID, theUser.currentAgent.sessionID, theUser.currentAgent.currentRegion, theUser.currentAgent.currentHandle, theUser.currentAgent.currentPos); | 154 | handler001(theUser.UUID, theUser.currentAgent.sessionID, theUser.currentAgent.currentRegion, |
155 | theUser.currentAgent.currentHandle, theUser.currentAgent.currentPos.X,theUser.currentAgent.currentPos.Y,theUser.currentAgent.currentPos.Z, | ||
156 | theUser.username,theUser.surname); | ||
153 | } | 157 | } |
154 | } | 158 | } |
155 | catch (Exception) | 159 | catch (Exception) |
@@ -226,7 +230,9 @@ namespace OpenSim.Grid.UserServer | |||
226 | if (handler001 != null) | 230 | if (handler001 != null) |
227 | { | 231 | { |
228 | m_log.Info("[LOGIN]: Letting other objects know about login"); | 232 | m_log.Info("[LOGIN]: Letting other objects know about login"); |
229 | handler001(theUser.UUID, theUser.currentAgent.sessionID, theUser.currentAgent.currentRegion, theUser.currentAgent.currentHandle, theUser.currentAgent.currentPos); | 233 | handler001(theUser.UUID, theUser.currentAgent.sessionID, theUser.currentAgent.currentRegion, |
234 | theUser.currentAgent.currentHandle, theUser.currentAgent.currentPos.X, theUser.currentAgent.currentPos.Y, theUser.currentAgent.currentPos.Z, | ||
235 | theUser.username, theUser.surname); | ||
230 | } | 236 | } |
231 | } | 237 | } |
232 | 238 | ||
diff --git a/OpenSim/Grid/UserServer/UserManager.cs b/OpenSim/Grid/UserServer/UserManager.cs index 8f2d83c..5806f5f 100644 --- a/OpenSim/Grid/UserServer/UserManager.cs +++ b/OpenSim/Grid/UserServer/UserManager.cs | |||
@@ -37,10 +37,13 @@ using OpenSim.Framework.UserManagement; | |||
37 | 37 | ||
38 | namespace OpenSim.Grid.UserServer | 38 | namespace OpenSim.Grid.UserServer |
39 | { | 39 | { |
40 | public delegate void logOffUser(LLUUID AgentID); | ||
41 | |||
40 | public class UserManager : UserManagerBase | 42 | public class UserManager : UserManagerBase |
41 | { | 43 | { |
42 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); | 44 | private static readonly log4net.ILog m_log = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType); |
43 | 45 | public event logOffUser OnLogOffUser; | |
46 | private logOffUser handler001 = null; | ||
44 | /// <summary> | 47 | /// <summary> |
45 | /// Deletes an active agent session | 48 | /// Deletes an active agent session |
46 | /// </summary> | 49 | /// </summary> |
@@ -327,7 +330,11 @@ namespace OpenSim.Grid.UserServer | |||
327 | float posx = (float)Convert.ToDecimal((string)requestData["region_pos_x"]); | 330 | float posx = (float)Convert.ToDecimal((string)requestData["region_pos_x"]); |
328 | float posy = (float)Convert.ToDecimal((string)requestData["region_pos_y"]); | 331 | float posy = (float)Convert.ToDecimal((string)requestData["region_pos_y"]); |
329 | float posz = (float)Convert.ToDecimal((string)requestData["region_pos_z"]); | 332 | float posz = (float)Convert.ToDecimal((string)requestData["region_pos_z"]); |
330 | 333 | ||
334 | handler001 = OnLogOffUser; | ||
335 | if (handler001 != null) | ||
336 | handler001(userUUID); | ||
337 | |||
331 | LogOffUser(userUUID, RegionID, regionhandle, posx, posy, posz); | 338 | LogOffUser(userUUID, RegionID, regionhandle, posx, posy, posz); |
332 | } | 339 | } |
333 | catch (FormatException) | 340 | catch (FormatException) |