aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs20
1 files changed, 17 insertions, 3 deletions
diff --git a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
index eea9853..3fd0c53 100644
--- a/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
+++ b/OpenSim/Services/Connectors/Friends/FriendsSimConnector.cs
@@ -43,8 +43,18 @@ namespace OpenSim.Services.Connectors.Friends
43 { 43 {
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 protected virtual string ServicePath()
47 {
48 return "friends";
49 }
50
46 public bool FriendshipOffered(GridRegion region, UUID userID, UUID friendID, string message) 51 public bool FriendshipOffered(GridRegion region, UUID userID, UUID friendID, string message)
47 { 52 {
53 return FriendshipOffered(region, userID, friendID, message, String.Empty);
54 }
55
56 public virtual bool FriendshipOffered(GridRegion region, UUID userID, UUID friendID, string message, string userName)
57 {
48 Dictionary<string, object> sendData = new Dictionary<string, object>(); 58 Dictionary<string, object> sendData = new Dictionary<string, object>();
49 //sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString(); 59 //sendData["VERSIONMIN"] = ProtocolVersions.ClientProtocolVersionMin.ToString();
50 //sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString(); 60 //sendData["VERSIONMAX"] = ProtocolVersions.ClientProtocolVersionMax.ToString();
@@ -53,9 +63,10 @@ namespace OpenSim.Services.Connectors.Friends
53 sendData["FromID"] = userID.ToString(); 63 sendData["FromID"] = userID.ToString();
54 sendData["ToID"] = friendID.ToString(); 64 sendData["ToID"] = friendID.ToString();
55 sendData["Message"] = message; 65 sendData["Message"] = message;
66 if (userName != String.Empty)
67 sendData["FromName"] = userName;
56 68
57 return Call(region, sendData); 69 return Call(region, sendData);
58
59 } 70 }
60 71
61 public bool FriendshipApproved(GridRegion region, UUID userID, string userName, UUID friendID) 72 public bool FriendshipApproved(GridRegion region, UUID userID, string userName, UUID friendID)
@@ -138,8 +149,11 @@ namespace OpenSim.Services.Connectors.Friends
138 if (region == null) 149 if (region == null)
139 return false; 150 return false;
140 151
141 m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: region: {0}", region.ExternalHostName + ":" + region.HttpPort); 152 string path = ServicePath();
142 string uri = "http://" + region.ExternalHostName + ":" + region.HttpPort + "/friends"; 153 if (!region.ServerURI.EndsWith("/"))
154 path = "/" + path;
155 string uri = region.ServerURI + path;
156 m_log.DebugFormat("[FRIENDS SIM CONNECTOR]: calling {0}", uri);
143 157
144 try 158 try
145 { 159 {