diff options
Diffstat (limited to 'OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs')
-rw-r--r-- | OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs | 23 |
1 files changed, 22 insertions, 1 deletions
diff --git a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs index 71c3c73..9969086 100644 --- a/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs +++ b/OpenSim/Server/Handlers/Friends/FriendsServerPostHandler.cs | |||
@@ -91,6 +91,9 @@ namespace OpenSim.Server.Handlers.Friends | |||
91 | case "deletefriend": | 91 | case "deletefriend": |
92 | return DeleteFriend(request); | 92 | return DeleteFriend(request); |
93 | 93 | ||
94 | case "deletefriend_string": | ||
95 | return DeleteFriendString(request); | ||
96 | |||
94 | } | 97 | } |
95 | m_log.DebugFormat("[FRIENDS HANDLER]: unknown method {0} request {1}", method.Length, method); | 98 | m_log.DebugFormat("[FRIENDS HANDLER]: unknown method {0} request {1}", method.Length, method); |
96 | } | 99 | } |
@@ -184,7 +187,25 @@ namespace OpenSim.Server.Handlers.Friends | |||
184 | else | 187 | else |
185 | return FailureResult(); | 188 | return FailureResult(); |
186 | } | 189 | } |
187 | 190 | ||
191 | byte[] DeleteFriendString(Dictionary<string, object> request) | ||
192 | { | ||
193 | string principalID = string.Empty; | ||
194 | if (request.ContainsKey("PRINCIPALID")) | ||
195 | principalID = request["PRINCIPALID"].ToString(); | ||
196 | else | ||
197 | m_log.WarnFormat("[FRIENDS HANDLER]: no principalID in request to delete friend"); | ||
198 | string friend = string.Empty; | ||
199 | if (request.ContainsKey("FRIEND")) | ||
200 | friend = request["FRIEND"].ToString(); | ||
201 | |||
202 | bool success = m_FriendsService.Delete(principalID, friend); | ||
203 | if (success) | ||
204 | return SuccessResult(); | ||
205 | else | ||
206 | return FailureResult(); | ||
207 | } | ||
208 | |||
188 | #endregion | 209 | #endregion |
189 | 210 | ||
190 | #region Misc | 211 | #region Misc |