aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Server
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs57
-rw-r--r--OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs1
-rw-r--r--OpenSim/Server/Handlers/Login/LLLoginHandlers.cs12
-rw-r--r--OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs1
4 files changed, 69 insertions, 2 deletions
diff --git a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
index ca566f2..8ef03e7 100644
--- a/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/HGFriendsServerPostHandler.cs
@@ -105,6 +105,9 @@ namespace OpenSim.Server.Handlers.Hypergrid
105 105
106 case "validate_friendship_offered": 106 case "validate_friendship_offered":
107 return ValidateFriendshipOffered(request); 107 return ValidateFriendshipOffered(request);
108
109 case "statusnotification":
110 return StatusNotification(request);
108 /* 111 /*
109 case "friendship_approved": 112 case "friendship_approved":
110 return FriendshipApproved(request); 113 return FriendshipApproved(request);
@@ -197,7 +200,6 @@ namespace OpenSim.Server.Handlers.Hypergrid
197 string message = string.Empty; 200 string message = string.Empty;
198 string name = string.Empty; 201 string name = string.Empty;
199 202
200 m_log.DebugFormat("[HGFRIENDS HANDLER]: Friendship offered");
201 if (!request.ContainsKey("FromID") || !request.ContainsKey("ToID")) 203 if (!request.ContainsKey("FromID") || !request.ContainsKey("ToID"))
202 return BoolResult(false); 204 return BoolResult(false);
203 205
@@ -229,6 +231,59 @@ namespace OpenSim.Server.Handlers.Hypergrid
229 return BoolResult(success); 231 return BoolResult(success);
230 } 232 }
231 233
234 byte[] StatusNotification(Dictionary<string, object> request)
235 {
236 UUID principalID = UUID.Zero;
237 if (request.ContainsKey("userID"))
238 UUID.TryParse(request["userID"].ToString(), out principalID);
239 else
240 {
241 m_log.WarnFormat("[HGFRIENDS HANDLER]: no userID in request to notify");
242 return FailureResult();
243 }
244
245 bool online = true;
246 if (request.ContainsKey("online"))
247 Boolean.TryParse(request["online"].ToString(), out online);
248 else
249 {
250 m_log.WarnFormat("[HGFRIENDS HANDLER]: no online in request to notify");
251 return FailureResult();
252 }
253
254 List<string> friends = new List<string>();
255 int i = 0;
256 foreach (KeyValuePair<string, object> kvp in request)
257 {
258 if (kvp.Key.Equals("friend_" + i.ToString()))
259 {
260 friends.Add(kvp.Value.ToString());
261 i++;
262 }
263 }
264
265 List<UUID> onlineFriends = m_TheService.StatusNotification(friends, principalID, online);
266
267 Dictionary<string, object> result = new Dictionary<string, object>();
268 if ((onlineFriends == null) || ((onlineFriends != null) && (onlineFriends.Count == 0)))
269 result["RESULT"] = "NULL";
270 else
271 {
272 i = 0;
273 foreach (UUID f in onlineFriends)
274 {
275 result["friend_" + i] = f.ToString();
276 i++;
277 }
278 }
279
280 string xmlString = ServerUtils.BuildXmlResponse(result);
281 //m_log.DebugFormat("[GRID HANDLER]: resp string: {0}", xmlString);
282 UTF8Encoding encoding = new UTF8Encoding();
283 return encoding.GetBytes(xmlString);
284
285 }
286
232 287
233 #endregion 288 #endregion
234 289
diff --git a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
index 9a0e27e..db62aaa 100644
--- a/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
+++ b/OpenSim/Server/Handlers/Hypergrid/UserAgentServerConnector.cs
@@ -222,6 +222,7 @@ namespace OpenSim.Server.Handlers.Hypergrid
222 222
223 } 223 }
224 224
225 [Obsolete]
225 public XmlRpcResponse StatusNotification(XmlRpcRequest request, IPEndPoint remoteClient) 226 public XmlRpcResponse StatusNotification(XmlRpcRequest request, IPEndPoint remoteClient)
226 { 227 {
227 Hashtable hash = new Hashtable(); 228 Hashtable hash = new Hashtable();
diff --git a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs
index 8048f86..ed62f95 100644
--- a/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs
+++ b/OpenSim/Server/Handlers/Login/LLLoginHandlers.cs
@@ -73,6 +73,18 @@ namespace OpenSim.Server.Handlers.Login
73 73
74 if (requestData != null) 74 if (requestData != null)
75 { 75 {
76 foreach (string key in requestData.Keys)
77 {
78 object value = requestData[key];
79 Console.WriteLine("{0}:{1}", key, value);
80 if (value is ArrayList)
81 {
82 ICollection col = value as ICollection;
83 foreach (object item in col)
84 Console.WriteLine(" {0}", item);
85 }
86 }
87
76 if (requestData.ContainsKey("first") && requestData["first"] != null && 88 if (requestData.ContainsKey("first") && requestData["first"] != null &&
77 requestData.ContainsKey("last") && requestData["last"] != null && ( 89 requestData.ContainsKey("last") && requestData["last"] != null && (
78 (requestData.ContainsKey("passwd") && requestData["passwd"] != null) || 90 (requestData.ContainsKey("passwd") && requestData["passwd"] != null) ||
diff --git a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
index 16c93c8..9a7ad34 100644
--- a/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
+++ b/OpenSim/Server/Handlers/Login/LLLoginServiceInConnector.cs
@@ -94,6 +94,5 @@ namespace OpenSim.Server.Handlers.Login
94 server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false); 94 server.AddXmlRPCHandler("set_login_level", loginHandlers.HandleXMLRPCSetLoginLevel, false);
95 server.SetDefaultLLSDHandler(loginHandlers.HandleLLSDLogin); 95 server.SetDefaultLLSDHandler(loginHandlers.HandleLLSDLogin);
96 } 96 }
97
98 } 97 }
99} 98}