diff options
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar')
11 files changed, 247 insertions, 249 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs index 5df3f52..9433cf6 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/AvatarFactory/AvatarFactoryModule.cs | |||
@@ -29,7 +29,7 @@ | |||
29 | using System; | 29 | using System; |
30 | using System.Collections.Generic; | 30 | using System.Collections.Generic; |
31 | using System.Threading; | 31 | using System.Threading; |
32 | using libsecondlife; | 32 | using OpenMetaverse; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
35 | using OpenSim.Framework.Communications.Cache; | 35 | using OpenSim.Framework.Communications.Cache; |
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules | |||
43 | public class AvatarFactoryModule : IAvatarFactory | 43 | public class AvatarFactoryModule : IAvatarFactory |
44 | { | 44 | { |
45 | private Scene m_scene = null; | 45 | private Scene m_scene = null; |
46 | private readonly Dictionary<LLUUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<LLUUID, AvatarAppearance>(); | 46 | private readonly Dictionary<UUID, AvatarAppearance> m_avatarsAppearance = new Dictionary<UUID, AvatarAppearance>(); |
47 | 47 | ||
48 | private bool m_enablePersist = false; | 48 | private bool m_enablePersist = false; |
49 | private string m_connectionString; | 49 | private string m_connectionString; |
@@ -51,10 +51,10 @@ namespace OpenSim.Region.Environment.Modules | |||
51 | private BaseDatabaseConnector m_databaseMapper; | 51 | private BaseDatabaseConnector m_databaseMapper; |
52 | private AppearanceTableMapper m_appearanceMapper; | 52 | private AppearanceTableMapper m_appearanceMapper; |
53 | 53 | ||
54 | private Dictionary<LLUUID, EventWaitHandle> m_fetchesInProgress = new Dictionary<LLUUID, EventWaitHandle>(); | 54 | private Dictionary<UUID, EventWaitHandle> m_fetchesInProgress = new Dictionary<UUID, EventWaitHandle>(); |
55 | private object m_syncLock = new object(); | 55 | private object m_syncLock = new object(); |
56 | 56 | ||
57 | public bool TryGetAvatarAppearance(LLUUID avatarId, out AvatarAppearance appearance) | 57 | public bool TryGetAvatarAppearance(UUID avatarId, out AvatarAppearance appearance) |
58 | { | 58 | { |
59 | 59 | ||
60 | //should only let one thread at a time do this part | 60 | //should only let one thread at a time do this part |
@@ -163,7 +163,7 @@ namespace OpenSim.Region.Environment.Modules | |||
163 | } | 163 | } |
164 | } | 164 | } |
165 | 165 | ||
166 | private AvatarAppearance CreateDefault(LLUUID avatarId) | 166 | private AvatarAppearance CreateDefault(UUID avatarId) |
167 | { | 167 | { |
168 | AvatarAppearance appearance = null; | 168 | AvatarAppearance appearance = null; |
169 | AvatarWearable[] wearables; | 169 | AvatarWearable[] wearables; |
@@ -174,7 +174,7 @@ namespace OpenSim.Region.Environment.Modules | |||
174 | return appearance; | 174 | return appearance; |
175 | } | 175 | } |
176 | 176 | ||
177 | private AvatarAppearance CheckDatabase(LLUUID avatarId) | 177 | private AvatarAppearance CheckDatabase(UUID avatarId) |
178 | { | 178 | { |
179 | AvatarAppearance appearance = null; | 179 | AvatarAppearance appearance = null; |
180 | if (m_enablePersist) | 180 | if (m_enablePersist) |
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules | |||
192 | return appearance; | 192 | return appearance; |
193 | } | 193 | } |
194 | 194 | ||
195 | private AvatarAppearance CheckCache(LLUUID avatarId) | 195 | private AvatarAppearance CheckCache(UUID avatarId) |
196 | { | 196 | { |
197 | AvatarAppearance appearance = null; | 197 | AvatarAppearance appearance = null; |
198 | lock (m_avatarsAppearance) | 198 | lock (m_avatarsAppearance) |
@@ -282,16 +282,16 @@ namespace OpenSim.Region.Environment.Modules | |||
282 | { | 282 | { |
283 | if (wear.Type < 13) | 283 | if (wear.Type < 13) |
284 | { | 284 | { |
285 | if (wear.ItemID == LLUUID.Zero) | 285 | if (wear.ItemID == UUID.Zero) |
286 | { | 286 | { |
287 | avatAppearance.Wearables[wear.Type].ItemID = LLUUID.Zero; | 287 | avatAppearance.Wearables[wear.Type].ItemID = UUID.Zero; |
288 | avatAppearance.Wearables[wear.Type].AssetID = LLUUID.Zero; | 288 | avatAppearance.Wearables[wear.Type].AssetID = UUID.Zero; |
289 | 289 | ||
290 | UpdateDatabase(clientView.AgentId, avatAppearance); | 290 | UpdateDatabase(clientView.AgentId, avatAppearance); |
291 | } | 291 | } |
292 | else | 292 | else |
293 | { | 293 | { |
294 | LLUUID assetId; | 294 | UUID assetId; |
295 | 295 | ||
296 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); | 296 | InventoryItemBase baseItem = profile.RootFolder.FindItem(wear.ItemID); |
297 | if (baseItem != null) | 297 | if (baseItem != null) |
@@ -310,11 +310,11 @@ namespace OpenSim.Region.Environment.Modules | |||
310 | } | 310 | } |
311 | } | 311 | } |
312 | 312 | ||
313 | public void UpdateDatabase(LLUUID userID, AvatarAppearance avatAppearance) | 313 | public void UpdateDatabase(UUID userID, AvatarAppearance avatAppearance) |
314 | { | 314 | { |
315 | if (m_enablePersist) | 315 | if (m_enablePersist) |
316 | { | 316 | { |
317 | m_appearanceMapper.Update(userID.UUID, avatAppearance); | 317 | m_appearanceMapper.Update(userID.Guid, avatAppearance); |
318 | } | 318 | } |
319 | } | 319 | } |
320 | 320 | ||
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs index 1493e32..e1599a8 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/ChatModule.cs | |||
@@ -32,7 +32,7 @@ using System.Net.Sockets; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Text.RegularExpressions; | 33 | using System.Text.RegularExpressions; |
34 | using System.Threading; | 34 | using System.Threading; |
35 | using libsecondlife; | 35 | using OpenMetaverse; |
36 | using log4net; | 36 | using log4net; |
37 | using Nini.Config; | 37 | using Nini.Config; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
115 | 115 | ||
116 | // chat works by redistributing every incoming chat | 116 | // chat works by redistributing every incoming chat |
117 | // message to each avatar in the scene | 117 | // message to each avatar in the scene |
118 | LLVector3 pos = new LLVector3(128, 128, 30); | 118 | Vector3 pos = new Vector3(128, 128, 30); |
119 | ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence) | 119 | ((Scene)c.Scene).ForEachScenePresence(delegate(ScenePresence presence) |
120 | { | 120 | { |
121 | if (presence.IsChildAgent) return; | 121 | if (presence.IsChildAgent) return; |
@@ -129,12 +129,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
129 | 129 | ||
130 | if (null == c.SenderObject) | 130 | if (null == c.SenderObject) |
131 | client.SendChatMessage(c.Message, (byte)c.Type, | 131 | client.SendChatMessage(c.Message, (byte)c.Type, |
132 | pos, c.From, LLUUID.Zero, | 132 | pos, c.From, UUID.Zero, |
133 | (byte)ChatSourceType.Agent, | 133 | (byte)ChatSourceType.Agent, |
134 | (byte)ChatAudibleLevel.Fully); | 134 | (byte)ChatAudibleLevel.Fully); |
135 | else | 135 | else |
136 | client.SendChatMessage(c.Message, (byte)c.Type, | 136 | client.SendChatMessage(c.Message, (byte)c.Type, |
137 | pos, c.From, LLUUID.Zero, | 137 | pos, c.From, UUID.Zero, |
138 | (byte)ChatSourceType.Object, | 138 | (byte)ChatSourceType.Object, |
139 | (byte)ChatAudibleLevel.Fully); | 139 | (byte)ChatAudibleLevel.Fully); |
140 | }); | 140 | }); |
@@ -153,13 +153,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
153 | scene = m_scenes[0]; | 153 | scene = m_scenes[0]; |
154 | 154 | ||
155 | // Filled in since it's easier than rewriting right now. | 155 | // Filled in since it's easier than rewriting right now. |
156 | LLVector3 fromPos = e.Position; | 156 | Vector3 fromPos = e.Position; |
157 | LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, | 157 | Vector3 regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, |
158 | scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); | 158 | scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); |
159 | 159 | ||
160 | string fromName = e.From; | 160 | string fromName = e.From; |
161 | string message = e.Message; | 161 | string message = e.Message; |
162 | LLUUID fromID = e.SenderUUID; | 162 | UUID fromID = e.SenderUUID; |
163 | 163 | ||
164 | if(message.Length >= 1000) // libomv limit | 164 | if(message.Length >= 1000) // libomv limit |
165 | message = message.Substring(0, 1000); | 165 | message = message.Substring(0, 1000); |
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
172 | if (avatar != null) | 172 | if (avatar != null) |
173 | { | 173 | { |
174 | fromPos = avatar.AbsolutePosition; | 174 | fromPos = avatar.AbsolutePosition; |
175 | regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, | 175 | regionPos = new Vector3(scene.RegionInfo.RegionLocX * Constants.RegionSize, |
176 | scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); | 176 | scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); |
177 | fromName = avatar.Firstname + " " + avatar.Lastname; | 177 | fromName = avatar.Firstname + " " + avatar.Lastname; |
178 | fromID = e.Sender.AgentId; | 178 | fromID = e.Sender.AgentId; |
@@ -217,16 +217,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
217 | } | 217 | } |
218 | } | 218 | } |
219 | 219 | ||
220 | private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos, | 220 | private void TrySendChatMessage(ScenePresence presence, Vector3 fromPos, Vector3 regionPos, |
221 | LLUUID fromAgentID, string fromName, ChatTypeEnum type, | 221 | UUID fromAgentID, string fromName, ChatTypeEnum type, |
222 | string message, ChatSourceType src) | 222 | string message, ChatSourceType src) |
223 | { | 223 | { |
224 | // don't send stuff to child agents | 224 | // don't send stuff to child agents |
225 | if (presence.IsChildAgent) return; | 225 | if (presence.IsChildAgent) return; |
226 | 226 | ||
227 | LLVector3 fromRegionPos = fromPos + regionPos; | 227 | Vector3 fromRegionPos = fromPos + regionPos; |
228 | LLVector3 toRegionPos = presence.AbsolutePosition + | 228 | Vector3 toRegionPos = presence.AbsolutePosition + |
229 | new LLVector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, | 229 | new Vector3(presence.Scene.RegionInfo.RegionLocX * Constants.RegionSize, |
230 | presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); | 230 | presence.Scene.RegionInfo.RegionLocY * Constants.RegionSize, 0); |
231 | 231 | ||
232 | int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); | 232 | int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos)); |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs index 9df05e0..8fe5080 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCBridgeModule.cs | |||
@@ -32,7 +32,7 @@ using System.Net.Sockets; | |||
32 | using System.Reflection; | 32 | using System.Reflection; |
33 | using System.Text.RegularExpressions; | 33 | using System.Text.RegularExpressions; |
34 | using System.Threading; | 34 | using System.Threading; |
35 | using libsecondlife; | 35 | using OpenMetaverse; |
36 | using log4net; | 36 | using log4net; |
37 | using Nini.Config; | 37 | using Nini.Config; |
38 | using OpenSim.Framework; | 38 | using OpenSim.Framework; |
@@ -617,7 +617,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
617 | public void ListenerRun() | 617 | public void ListenerRun() |
618 | { | 618 | { |
619 | string inputLine; | 619 | string inputLine; |
620 | LLVector3 pos = new LLVector3(128, 128, 20); | 620 | Vector3 pos = new Vector3(128, 128, 20); |
621 | while (m_enabled) | 621 | while (m_enabled) |
622 | { | 622 | { |
623 | try | 623 | try |
@@ -638,7 +638,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
638 | c.Position = pos; | 638 | c.Position = pos; |
639 | c.From = data["nick"]; | 639 | c.From = data["nick"]; |
640 | c.Sender = null; | 640 | c.Sender = null; |
641 | c.SenderUUID = LLUUID.Zero; | 641 | c.SenderUUID = UUID.Zero; |
642 | 642 | ||
643 | // is message "\001ACTION foo | 643 | // is message "\001ACTION foo |
644 | // bar\001"? -> "/me foo bar" | 644 | // bar\001"? -> "/me foo bar" |
@@ -684,9 +684,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat | |||
684 | c.Message = String.Format(format, args); | 684 | c.Message = String.Format(format, args); |
685 | c.Type = ChatTypeEnum.Say; | 685 | c.Type = ChatTypeEnum.Say; |
686 | c.Channel = 0; | 686 | c.Channel = 0; |
687 | c.Position = new LLVector3(128, 128, 20); | 687 | c.Position = new Vector3(128, 128, 20); |
688 | c.Sender = null; | 688 | c.Sender = null; |
689 | c.SenderUUID = LLUUID.Zero; | 689 | c.SenderUUID = UUID.Zero; |
690 | 690 | ||
691 | foreach (Scene m_scene in m_scenes) | 691 | foreach (Scene m_scene in m_scenes) |
692 | { | 692 | { |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs index 2a0bba4..19c193f 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Currency/SampleMoney/SampleMoneyModule.cs | |||
@@ -32,7 +32,7 @@ using System.Net; | |||
32 | using System.Net.Sockets; | 32 | using System.Net.Sockets; |
33 | using System.Reflection; | 33 | using System.Reflection; |
34 | using System.Xml; | 34 | using System.Xml; |
35 | using libsecondlife; | 35 | using OpenMetaverse; |
36 | using log4net; | 36 | using log4net; |
37 | using Nini.Config; | 37 | using Nini.Config; |
38 | using Nwc.XmlRpc; | 38 | using Nwc.XmlRpc; |
@@ -62,7 +62,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
62 | /// <summary> | 62 | /// <summary> |
63 | /// Where Stipends come from and Fees go to. | 63 | /// Where Stipends come from and Fees go to. |
64 | /// </summary> | 64 | /// </summary> |
65 | // private LLUUID EconomyBaseAccount = LLUUID.Zero; | 65 | // private UUID EconomyBaseAccount = UUID.Zero; |
66 | 66 | ||
67 | private float EnergyEfficiency = 0f; | 67 | private float EnergyEfficiency = 0f; |
68 | private bool gridmode = false; | 68 | private bool gridmode = false; |
@@ -72,7 +72,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
72 | private IConfigSource m_gConfig; | 72 | private IConfigSource m_gConfig; |
73 | 73 | ||
74 | private bool m_keepMoneyAcrossLogins = true; | 74 | private bool m_keepMoneyAcrossLogins = true; |
75 | private Dictionary<LLUUID, int> m_KnownClientFunds = new Dictionary<LLUUID, int>(); | 75 | private Dictionary<UUID, int> m_KnownClientFunds = new Dictionary<UUID, int>(); |
76 | // private string m_LandAddress = String.Empty; | 76 | // private string m_LandAddress = String.Empty; |
77 | 77 | ||
78 | private int m_minFundsBeforeRefresh = 100; | 78 | private int m_minFundsBeforeRefresh = 100; |
@@ -81,7 +81,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
81 | /// <summary> | 81 | /// <summary> |
82 | /// Region UUIDS indexed by AgentID | 82 | /// Region UUIDS indexed by AgentID |
83 | /// </summary> | 83 | /// </summary> |
84 | private Dictionary<LLUUID, LLUUID> m_rootAgents = new Dictionary<LLUUID, LLUUID>(); | 84 | private Dictionary<UUID, UUID> m_rootAgents = new Dictionary<UUID, UUID>(); |
85 | 85 | ||
86 | /// <summary> | 86 | /// <summary> |
87 | /// Scenes by Region Handle | 87 | /// Scenes by Region Handle |
@@ -184,11 +184,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
184 | } | 184 | } |
185 | } | 185 | } |
186 | 186 | ||
187 | public void ApplyUploadCharge(LLUUID agentID) | 187 | public void ApplyUploadCharge(UUID agentID) |
188 | { | 188 | { |
189 | } | 189 | } |
190 | 190 | ||
191 | public bool ObjectGiveMoney(LLUUID objectID, LLUUID fromID, LLUUID toID, int amount) | 191 | public bool ObjectGiveMoney(UUID objectID, UUID fromID, UUID toID, int amount) |
192 | { | 192 | { |
193 | string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); | 193 | string description = String.Format("Object {0} pays {1}", resolveObjectName(objectID), resolveAgentName(toID)); |
194 | 194 | ||
@@ -252,7 +252,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
252 | PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10); | 252 | PriceObjectScaleFactor = startupConfig.GetFloat("PriceObjectScaleFactor", 10); |
253 | PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1); | 253 | PriceParcelRent = startupConfig.GetInt("PriceParcelRent", 1); |
254 | PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1); | 254 | PriceGroupCreate = startupConfig.GetInt("PriceGroupCreate", -1); |
255 | // string EBA = startupConfig.GetString("EconomyBaseAccount", LLUUID.Zero.ToString()); | 255 | // string EBA = startupConfig.GetString("EconomyBaseAccount", UUID.Zero.ToString()); |
256 | // Helpers.TryParse(EBA, out EconomyBaseAccount); | 256 | // Helpers.TryParse(EBA, out EconomyBaseAccount); |
257 | 257 | ||
258 | // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1); | 258 | // UserLevelPaysFees = startupConfig.GetInt("UserLevelPaysFees", -1); |
@@ -294,7 +294,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
294 | if (s != null && agent != null && childYN == false) | 294 | if (s != null && agent != null && childYN == false) |
295 | { | 295 | { |
296 | //s.RegionInfo.RegionHandle; | 296 | //s.RegionInfo.RegionHandle; |
297 | LLUUID agentID = LLUUID.Zero; | 297 | UUID agentID = UUID.Zero; |
298 | int funds = 0; | 298 | int funds = 0; |
299 | 299 | ||
300 | Hashtable hbinfo = | 300 | Hashtable hbinfo = |
@@ -302,7 +302,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
302 | s.RegionInfo.regionSecret); | 302 | s.RegionInfo.regionSecret); |
303 | if ((bool) hbinfo["success"] == true) | 303 | if ((bool) hbinfo["success"] == true) |
304 | { | 304 | { |
305 | Helpers.TryParse((string) hbinfo["agentId"], out agentID); | 305 | UUID.TryParse((string)hbinfo["agentId"], out agentID); |
306 | try | 306 | try |
307 | { | 307 | { |
308 | funds = (Int32) hbinfo["funds"]; | 308 | funds = (Int32) hbinfo["funds"]; |
@@ -331,7 +331,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
331 | (string) hbinfo["errorMessage"]); | 331 | (string) hbinfo["errorMessage"]); |
332 | client.SendAlertMessage((string) hbinfo["errorMessage"]); | 332 | client.SendAlertMessage((string) hbinfo["errorMessage"]); |
333 | } | 333 | } |
334 | SendMoneyBalance(client, agentID, client.SessionId, LLUUID.Zero); | 334 | SendMoneyBalance(client, agentID, client.SessionId, UUID.Zero); |
335 | } | 335 | } |
336 | } | 336 | } |
337 | } | 337 | } |
@@ -365,7 +365,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
365 | /// <param name="Receiver"></param> | 365 | /// <param name="Receiver"></param> |
366 | /// <param name="amount"></param> | 366 | /// <param name="amount"></param> |
367 | /// <returns></returns> | 367 | /// <returns></returns> |
368 | private bool doMoneyTransfer(LLUUID Sender, LLUUID Receiver, int amount, int transactiontype, string description) | 368 | private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description) |
369 | { | 369 | { |
370 | bool result = false; | 370 | bool result = false; |
371 | if (amount >= 0) | 371 | if (amount >= 0) |
@@ -425,7 +425,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
425 | /// <param name="agentID"></param> | 425 | /// <param name="agentID"></param> |
426 | /// <param name="SessionID"></param> | 426 | /// <param name="SessionID"></param> |
427 | /// <param name="TransactionID"></param> | 427 | /// <param name="TransactionID"></param> |
428 | public void SendMoneyBalance(IClientAPI client, LLUUID agentID, LLUUID SessionID, LLUUID TransactionID) | 428 | public void SendMoneyBalance(IClientAPI client, UUID agentID, UUID SessionID, UUID TransactionID) |
429 | { | 429 | { |
430 | if (client.AgentId == agentID && client.SessionId == SessionID) | 430 | if (client.AgentId == agentID && client.SessionId == SessionID) |
431 | { | 431 | { |
@@ -456,7 +456,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
456 | /// <param name="regionId"></param> | 456 | /// <param name="regionId"></param> |
457 | /// <param name="regionSecret"></param> | 457 | /// <param name="regionSecret"></param> |
458 | /// <returns></returns> | 458 | /// <returns></returns> |
459 | public Hashtable GetBalanceForUserFromMoneyServer(LLUUID agentId, LLUUID secureSessionID, LLUUID regionId, string regionSecret) | 459 | public Hashtable GetBalanceForUserFromMoneyServer(UUID agentId, UUID secureSessionID, UUID regionId, string regionSecret) |
460 | { | 460 | { |
461 | Hashtable MoneyBalanceRequestParams = new Hashtable(); | 461 | Hashtable MoneyBalanceRequestParams = new Hashtable(); |
462 | MoneyBalanceRequestParams["agentId"] = agentId.ToString(); | 462 | MoneyBalanceRequestParams["agentId"] = agentId.ToString(); |
@@ -551,7 +551,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
551 | /// <param name="regionId"></param> | 551 | /// <param name="regionId"></param> |
552 | /// <param name="regionSecret"></param> | 552 | /// <param name="regionSecret"></param> |
553 | /// <returns></returns> | 553 | /// <returns></returns> |
554 | public Hashtable claim_user(LLUUID agentId, LLUUID secureSessionID, LLUUID regionId, string regionSecret) | 554 | public Hashtable claim_user(UUID agentId, UUID secureSessionID, UUID regionId, string regionSecret) |
555 | { | 555 | { |
556 | Hashtable MoneyBalanceRequestParams = new Hashtable(); | 556 | Hashtable MoneyBalanceRequestParams = new Hashtable(); |
557 | MoneyBalanceRequestParams["agentId"] = agentId.ToString(); | 557 | MoneyBalanceRequestParams["agentId"] = agentId.ToString(); |
@@ -563,12 +563,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
563 | IClientAPI sendMoneyBal = LocateClientObject(agentId); | 563 | IClientAPI sendMoneyBal = LocateClientObject(agentId); |
564 | if (sendMoneyBal != null) | 564 | if (sendMoneyBal != null) |
565 | { | 565 | { |
566 | SendMoneyBalance(sendMoneyBal, agentId, sendMoneyBal.SessionId, LLUUID.Zero); | 566 | SendMoneyBalance(sendMoneyBal, agentId, sendMoneyBal.SessionId, UUID.Zero); |
567 | } | 567 | } |
568 | return MoneyRespData; | 568 | return MoneyRespData; |
569 | } | 569 | } |
570 | 570 | ||
571 | private SceneObjectPart findPrim(LLUUID objectID) | 571 | private SceneObjectPart findPrim(UUID objectID) |
572 | { | 572 | { |
573 | lock (m_scenel) | 573 | lock (m_scenel) |
574 | { | 574 | { |
@@ -584,7 +584,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
584 | return null; | 584 | return null; |
585 | } | 585 | } |
586 | 586 | ||
587 | private string resolveObjectName(LLUUID objectID) | 587 | private string resolveObjectName(UUID objectID) |
588 | { | 588 | { |
589 | SceneObjectPart part = findPrim(objectID); | 589 | SceneObjectPart part = findPrim(objectID); |
590 | if (part != null) | 590 | if (part != null) |
@@ -594,7 +594,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
594 | return String.Empty; | 594 | return String.Empty; |
595 | } | 595 | } |
596 | 596 | ||
597 | private string resolveAgentName(LLUUID agentID) | 597 | private string resolveAgentName(UUID agentID) |
598 | { | 598 | { |
599 | // try avatar username surname | 599 | // try avatar username surname |
600 | Scene scene = GetRandomScene(); | 600 | Scene scene = GetRandomScene(); |
@@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
607 | return String.Empty; | 607 | return String.Empty; |
608 | } | 608 | } |
609 | 609 | ||
610 | private void BalanceUpdate(LLUUID senderID, LLUUID receiverID, bool transactionresult, string description) | 610 | private void BalanceUpdate(UUID senderID, UUID receiverID, bool transactionresult, string description) |
611 | { | 611 | { |
612 | IClientAPI sender = LocateClientObject(senderID); | 612 | IClientAPI sender = LocateClientObject(senderID); |
613 | IClientAPI receiver = LocateClientObject(receiverID); | 613 | IClientAPI receiver = LocateClientObject(receiverID); |
@@ -616,12 +616,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
616 | { | 616 | { |
617 | if (sender != null) | 617 | if (sender != null) |
618 | { | 618 | { |
619 | sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(senderID)); | 619 | sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(senderID)); |
620 | } | 620 | } |
621 | 621 | ||
622 | if (receiver != null) | 622 | if (receiver != null) |
623 | { | 623 | { |
624 | receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(description), GetFundsForAgentID(receiverID)); | 624 | receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(description), GetFundsForAgentID(receiverID)); |
625 | } | 625 | } |
626 | } | 626 | } |
627 | } | 627 | } |
@@ -633,7 +633,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
633 | /// <param name="destId"></param> | 633 | /// <param name="destId"></param> |
634 | /// <param name="amount"></param> | 634 | /// <param name="amount"></param> |
635 | /// <returns></returns> | 635 | /// <returns></returns> |
636 | public bool TransferMoneyonMoneyServer(LLUUID sourceId, LLUUID destId, int amount, int transactiontype, string description) | 636 | public bool TransferMoneyonMoneyServer(UUID sourceId, UUID destId, int amount, int transactiontype, string description) |
637 | { | 637 | { |
638 | int aggregatePermInventory = 0; | 638 | int aggregatePermInventory = 0; |
639 | int aggregatePermNextOwner = 0; | 639 | int aggregatePermNextOwner = 0; |
@@ -709,7 +709,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
709 | return rvalue; | 709 | return rvalue; |
710 | } | 710 | } |
711 | 711 | ||
712 | public int GetRemoteBalance(LLUUID agentId) | 712 | public int GetRemoteBalance(UUID agentId) |
713 | { | 713 | { |
714 | int funds = 0; | 714 | int funds = 0; |
715 | 715 | ||
@@ -755,7 +755,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
755 | } | 755 | } |
756 | 756 | ||
757 | SetLocalFundsForAgentID(agentId, funds); | 757 | SetLocalFundsForAgentID(agentId, funds); |
758 | SendMoneyBalance(aClient, agentId, aClient.SessionId, LLUUID.Zero); | 758 | SendMoneyBalance(aClient, agentId, aClient.SessionId, UUID.Zero); |
759 | } | 759 | } |
760 | else | 760 | else |
761 | { | 761 | { |
@@ -776,10 +776,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
776 | 776 | ||
777 | if (requestData.ContainsKey("agentId")) | 777 | if (requestData.ContainsKey("agentId")) |
778 | { | 778 | { |
779 | LLUUID agentId = LLUUID.Zero; | 779 | UUID agentId = UUID.Zero; |
780 | 780 | ||
781 | Helpers.TryParse((string) requestData["agentId"], out agentId); | 781 | UUID.TryParse((string) requestData["agentId"], out agentId); |
782 | if (agentId != LLUUID.Zero) | 782 | if (agentId != UUID.Zero) |
783 | { | 783 | { |
784 | GetRemoteBalance(agentId); | 784 | GetRemoteBalance(agentId); |
785 | } | 785 | } |
@@ -809,13 +809,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
809 | Hashtable retparam = new Hashtable(); | 809 | Hashtable retparam = new Hashtable(); |
810 | Hashtable requestData = (Hashtable) request.Params[0]; | 810 | Hashtable requestData = (Hashtable) request.Params[0]; |
811 | 811 | ||
812 | LLUUID agentId = LLUUID.Zero; | 812 | UUID agentId = UUID.Zero; |
813 | LLUUID soundId = LLUUID.Zero; | 813 | UUID soundId = UUID.Zero; |
814 | LLUUID regionId = LLUUID.Zero; | 814 | UUID regionId = UUID.Zero; |
815 | 815 | ||
816 | Helpers.TryParse((string) requestData["agentId"], out agentId); | 816 | UUID.TryParse((string) requestData["agentId"], out agentId); |
817 | Helpers.TryParse((string) requestData["soundId"], out soundId); | 817 | UUID.TryParse((string) requestData["soundId"], out soundId); |
818 | Helpers.TryParse((string) requestData["regionId"], out regionId); | 818 | UUID.TryParse((string) requestData["regionId"], out regionId); |
819 | string text = (string) requestData["text"]; | 819 | string text = (string) requestData["text"]; |
820 | string secret = (string) requestData["secret"]; | 820 | string secret = (string) requestData["secret"]; |
821 | 821 | ||
@@ -828,9 +828,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
828 | IClientAPI client = LocateClientObject(agentId); | 828 | IClientAPI client = LocateClientObject(agentId); |
829 | if (client != null) | 829 | if (client != null) |
830 | { | 830 | { |
831 | if (soundId != LLUUID.Zero) | 831 | |
832 | client.SendPlayAttachedSound(soundId, LLUUID.Zero, LLUUID.Zero, 1.0f, 0); | 832 | if (soundId != UUID.Zero) |
833 | client.SendBlueBoxMessage(LLUUID.Zero, LLUUID.Zero, "", text); | 833 | client.SendPlayAttachedSound(soundId, UUID.Zero, UUID.Zero, 1.0f, 0); |
834 | |||
835 | client.SendBlueBoxMessage(UUID.Zero, UUID.Zero, "", text); | ||
836 | |||
834 | retparam.Add("success", true); | 837 | retparam.Add("success", true); |
835 | } | 838 | } |
836 | else | 839 | else |
@@ -843,10 +846,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
843 | retparam.Add("success", false); | 846 | retparam.Add("success", false); |
844 | } | 847 | } |
845 | } | 848 | } |
846 | else | 849 | |
847 | { | ||
848 | retparam.Add("success", false); | ||
849 | } | ||
850 | ret.Value = retparam; | 850 | ret.Value = retparam; |
851 | return ret; | 851 | return ret; |
852 | } | 852 | } |
@@ -856,14 +856,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
856 | public XmlRpcResponse quote_func(XmlRpcRequest request) | 856 | public XmlRpcResponse quote_func(XmlRpcRequest request) |
857 | { | 857 | { |
858 | Hashtable requestData = (Hashtable) request.Params[0]; | 858 | Hashtable requestData = (Hashtable) request.Params[0]; |
859 | LLUUID agentId = LLUUID.Zero; | 859 | UUID agentId = UUID.Zero; |
860 | int amount = 0; | 860 | int amount = 0; |
861 | Hashtable quoteResponse = new Hashtable(); | 861 | Hashtable quoteResponse = new Hashtable(); |
862 | XmlRpcResponse returnval = new XmlRpcResponse(); | 862 | XmlRpcResponse returnval = new XmlRpcResponse(); |
863 | 863 | ||
864 | if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) | 864 | if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) |
865 | { | 865 | { |
866 | Helpers.TryParse((string) requestData["agentId"], out agentId); | 866 | UUID.TryParse((string) requestData["agentId"], out agentId); |
867 | try | 867 | try |
868 | { | 868 | { |
869 | amount = (Int32) requestData["currencyBuy"]; | 869 | amount = (Int32) requestData["currencyBuy"]; |
@@ -894,11 +894,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
894 | public XmlRpcResponse buy_func(XmlRpcRequest request) | 894 | public XmlRpcResponse buy_func(XmlRpcRequest request) |
895 | { | 895 | { |
896 | Hashtable requestData = (Hashtable) request.Params[0]; | 896 | Hashtable requestData = (Hashtable) request.Params[0]; |
897 | LLUUID agentId = LLUUID.Zero; | 897 | UUID agentId = UUID.Zero; |
898 | int amount = 0; | 898 | int amount = 0; |
899 | if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) | 899 | if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) |
900 | { | 900 | { |
901 | Helpers.TryParse((string) requestData["agentId"], out agentId); | 901 | UUID.TryParse((string) requestData["agentId"], out agentId); |
902 | try | 902 | try |
903 | { | 903 | { |
904 | amount = (Int32) requestData["currencyBuy"]; | 904 | amount = (Int32) requestData["currencyBuy"]; |
@@ -906,7 +906,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
906 | catch (InvalidCastException) | 906 | catch (InvalidCastException) |
907 | { | 907 | { |
908 | } | 908 | } |
909 | if (agentId != LLUUID.Zero) | 909 | if (agentId != UUID.Zero) |
910 | { | 910 | { |
911 | lock (m_KnownClientFunds) | 911 | lock (m_KnownClientFunds) |
912 | { | 912 | { |
@@ -922,7 +922,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
922 | IClientAPI client = LocateClientObject(agentId); | 922 | IClientAPI client = LocateClientObject(agentId); |
923 | if (client != null) | 923 | if (client != null) |
924 | { | 924 | { |
925 | SendMoneyBalance(client, agentId, client.SessionId, LLUUID.Zero); | 925 | SendMoneyBalance(client, agentId, client.SessionId, UUID.Zero); |
926 | } | 926 | } |
927 | } | 927 | } |
928 | } | 928 | } |
@@ -974,11 +974,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
974 | Hashtable retparam = new Hashtable(); | 974 | Hashtable retparam = new Hashtable(); |
975 | Hashtable requestData = (Hashtable) request.Params[0]; | 975 | Hashtable requestData = (Hashtable) request.Params[0]; |
976 | 976 | ||
977 | LLUUID agentId = LLUUID.Zero; | 977 | UUID agentId = UUID.Zero; |
978 | int amount = 0; | 978 | int amount = 0; |
979 | if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) | 979 | if (requestData.ContainsKey("agentId") && requestData.ContainsKey("currencyBuy")) |
980 | { | 980 | { |
981 | Helpers.TryParse((string) requestData["agentId"], out agentId); | 981 | UUID.TryParse((string) requestData["agentId"], out agentId); |
982 | try | 982 | try |
983 | { | 983 | { |
984 | amount = (Int32) requestData["currencyBuy"]; | 984 | amount = (Int32) requestData["currencyBuy"]; |
@@ -986,7 +986,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
986 | catch (InvalidCastException) | 986 | catch (InvalidCastException) |
987 | { | 987 | { |
988 | } | 988 | } |
989 | if (agentId != LLUUID.Zero) | 989 | if (agentId != UUID.Zero) |
990 | { | 990 | { |
991 | lock (m_KnownClientFunds) | 991 | lock (m_KnownClientFunds) |
992 | { | 992 | { |
@@ -1002,7 +1002,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1002 | IClientAPI client = LocateClientObject(agentId); | 1002 | IClientAPI client = LocateClientObject(agentId); |
1003 | if (client != null) | 1003 | if (client != null) |
1004 | { | 1004 | { |
1005 | SendMoneyBalance(client, agentId, client.SessionId, LLUUID.Zero); | 1005 | SendMoneyBalance(client, agentId, client.SessionId, UUID.Zero); |
1006 | } | 1006 | } |
1007 | } | 1007 | } |
1008 | } | 1008 | } |
@@ -1020,7 +1020,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1020 | /// Ensures that the agent accounting data is set up in this instance. | 1020 | /// Ensures that the agent accounting data is set up in this instance. |
1021 | /// </summary> | 1021 | /// </summary> |
1022 | /// <param name="agentID"></param> | 1022 | /// <param name="agentID"></param> |
1023 | private void CheckExistAndRefreshFunds(LLUUID agentID) | 1023 | private void CheckExistAndRefreshFunds(UUID agentID) |
1024 | { | 1024 | { |
1025 | lock (m_KnownClientFunds) | 1025 | lock (m_KnownClientFunds) |
1026 | { | 1026 | { |
@@ -1043,7 +1043,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1043 | /// </summary> | 1043 | /// </summary> |
1044 | /// <param name="AgentID"></param> | 1044 | /// <param name="AgentID"></param> |
1045 | /// <returns></returns> | 1045 | /// <returns></returns> |
1046 | private int GetFundsForAgentID(LLUUID AgentID) | 1046 | private int GetFundsForAgentID(UUID AgentID) |
1047 | { | 1047 | { |
1048 | int returnfunds = 0; | 1048 | int returnfunds = 0; |
1049 | lock (m_KnownClientFunds) | 1049 | lock (m_KnownClientFunds) |
@@ -1060,7 +1060,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1060 | return returnfunds; | 1060 | return returnfunds; |
1061 | } | 1061 | } |
1062 | 1062 | ||
1063 | private void SetLocalFundsForAgentID(LLUUID AgentID, int amount) | 1063 | private void SetLocalFundsForAgentID(UUID AgentID, int amount) |
1064 | { | 1064 | { |
1065 | lock (m_KnownClientFunds) | 1065 | lock (m_KnownClientFunds) |
1066 | { | 1066 | { |
@@ -1084,7 +1084,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1084 | /// </summary> | 1084 | /// </summary> |
1085 | /// <param name="AgentID"></param> | 1085 | /// <param name="AgentID"></param> |
1086 | /// <returns></returns> | 1086 | /// <returns></returns> |
1087 | private IClientAPI LocateClientObject(LLUUID AgentID) | 1087 | private IClientAPI LocateClientObject(UUID AgentID) |
1088 | { | 1088 | { |
1089 | ScenePresence tPresence = null; | 1089 | ScenePresence tPresence = null; |
1090 | IClientAPI rclient = null; | 1090 | IClientAPI rclient = null; |
@@ -1110,7 +1110,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1110 | return null; | 1110 | return null; |
1111 | } | 1111 | } |
1112 | 1112 | ||
1113 | private Scene LocateSceneClientIn(LLUUID AgentId) | 1113 | private Scene LocateSceneClientIn(UUID AgentId) |
1114 | { | 1114 | { |
1115 | lock (m_scenel) | 1115 | lock (m_scenel) |
1116 | { | 1116 | { |
@@ -1148,7 +1148,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1148 | /// </summary> | 1148 | /// </summary> |
1149 | /// <param name="RegionID"></param> | 1149 | /// <param name="RegionID"></param> |
1150 | /// <returns></returns> | 1150 | /// <returns></returns> |
1151 | public Scene GetSceneByUUID(LLUUID RegionID) | 1151 | public Scene GetSceneByUUID(UUID RegionID) |
1152 | { | 1152 | { |
1153 | lock (m_scenel) | 1153 | lock (m_scenel) |
1154 | { | 1154 | { |
@@ -1167,7 +1167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1167 | 1167 | ||
1168 | #region event Handlers | 1168 | #region event Handlers |
1169 | 1169 | ||
1170 | public void requestPayPrice(IClientAPI client, LLUUID objectID) | 1170 | public void requestPayPrice(IClientAPI client, UUID objectID) |
1171 | { | 1171 | { |
1172 | Scene scene = LocateSceneClientIn(client.AgentId); | 1172 | Scene scene = LocateSceneClientIn(client.AgentId); |
1173 | if (scene == null) | 1173 | if (scene == null) |
@@ -1186,7 +1186,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1186 | /// When the client closes the connection we remove their accounting info from memory to free up resources. | 1186 | /// When the client closes the connection we remove their accounting info from memory to free up resources. |
1187 | /// </summary> | 1187 | /// </summary> |
1188 | /// <param name="AgentID"></param> | 1188 | /// <param name="AgentID"></param> |
1189 | public void ClientClosed(LLUUID AgentID) | 1189 | public void ClientClosed(UUID AgentID) |
1190 | { | 1190 | { |
1191 | lock (m_KnownClientFunds) | 1191 | lock (m_KnownClientFunds) |
1192 | { | 1192 | { |
@@ -1204,7 +1204,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1204 | /// Event called Economy Data Request handler. | 1204 | /// Event called Economy Data Request handler. |
1205 | /// </summary> | 1205 | /// </summary> |
1206 | /// <param name="agentId"></param> | 1206 | /// <param name="agentId"></param> |
1207 | public void EconomyDataRequestHandler(LLUUID agentId) | 1207 | public void EconomyDataRequestHandler(UUID agentId) |
1208 | { | 1208 | { |
1209 | IClientAPI user = LocateClientObject(agentId); | 1209 | IClientAPI user = LocateClientObject(agentId); |
1210 | 1210 | ||
@@ -1309,11 +1309,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1309 | 1309 | ||
1310 | if (e.sender != e.receiver) | 1310 | if (e.sender != e.receiver) |
1311 | { | 1311 | { |
1312 | sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); | 1312 | sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.sender)); |
1313 | } | 1313 | } |
1314 | if (receiver != null) | 1314 | if (receiver != null) |
1315 | { | 1315 | { |
1316 | receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(part.OwnerID)); | 1316 | receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(part.OwnerID)); |
1317 | } | 1317 | } |
1318 | } | 1318 | } |
1319 | return; | 1319 | return; |
@@ -1330,13 +1330,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1330 | { | 1330 | { |
1331 | if (sender != null) | 1331 | if (sender != null) |
1332 | { | 1332 | { |
1333 | sender.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.sender)); | 1333 | sender.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.sender)); |
1334 | } | 1334 | } |
1335 | } | 1335 | } |
1336 | 1336 | ||
1337 | if (receiver != null) | 1337 | if (receiver != null) |
1338 | { | 1338 | { |
1339 | receiver.SendMoneyBalance(LLUUID.Random(), transactionresult, Helpers.StringToField(e.description), GetFundsForAgentID(e.receiver)); | 1339 | receiver.SendMoneyBalance(UUID.Random(), transactionresult, Utils.StringToBytes(e.description), GetFundsForAgentID(e.receiver)); |
1340 | } | 1340 | } |
1341 | } | 1341 | } |
1342 | else | 1342 | else |
@@ -1369,7 +1369,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1369 | /// Event Handler for when the client logs out. | 1369 | /// Event Handler for when the client logs out. |
1370 | /// </summary> | 1370 | /// </summary> |
1371 | /// <param name="AgentId"></param> | 1371 | /// <param name="AgentId"></param> |
1372 | private void ClientLoggedOut(LLUUID AgentId) | 1372 | private void ClientLoggedOut(UUID AgentId) |
1373 | { | 1373 | { |
1374 | lock (m_rootAgents) | 1374 | lock (m_rootAgents) |
1375 | { | 1375 | { |
@@ -1396,7 +1396,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1396 | /// <param name="avatar"></param> | 1396 | /// <param name="avatar"></param> |
1397 | /// <param name="localLandID"></param> | 1397 | /// <param name="localLandID"></param> |
1398 | /// <param name="regionID"></param> | 1398 | /// <param name="regionID"></param> |
1399 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) | 1399 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) |
1400 | { | 1400 | { |
1401 | lock (m_rootAgents) | 1401 | lock (m_rootAgents) |
1402 | { | 1402 | { |
@@ -1404,8 +1404,6 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1404 | { | 1404 | { |
1405 | if (avatar.Scene.RegionInfo.originRegionID != m_rootAgents[avatar.UUID]) | 1405 | if (avatar.Scene.RegionInfo.originRegionID != m_rootAgents[avatar.UUID]) |
1406 | { | 1406 | { |
1407 | |||
1408 | |||
1409 | m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID; | 1407 | m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID; |
1410 | 1408 | ||
1411 | 1409 | ||
@@ -1527,7 +1525,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1527 | else | 1525 | else |
1528 | { | 1526 | { |
1529 | string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID); | 1527 | string killer = DeadAvatar.Scene.CommsManager.UUIDNameRequestString(part.OwnerID); |
1530 | DeadAvatar.ControllingClient.SendAgentAlertMessage("You impailed yourself on " + part.Name + " owned by " + killer +"!", true); | 1528 | DeadAvatar.ControllingClient.SendAgentAlertMessage("You impaled yourself on " + part.Name + " owned by " + killer +"!", true); |
1531 | } | 1529 | } |
1532 | //DeadAvatar.Scene. part.ObjectOwner | 1530 | //DeadAvatar.Scene. part.ObjectOwner |
1533 | } | 1531 | } |
@@ -1564,8 +1562,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney | |||
1564 | 1562 | ||
1565 | #endregion | 1563 | #endregion |
1566 | 1564 | ||
1567 | public void ObjectBuy(IClientAPI remoteClient, LLUUID agentID, | 1565 | public void ObjectBuy(IClientAPI remoteClient, UUID agentID, |
1568 | LLUUID sessionID, LLUUID groupID, LLUUID categoryID, | 1566 | UUID sessionID, UUID groupID, UUID categoryID, |
1569 | uint localID, byte saleType, int salePrice) | 1567 | uint localID, byte saleType, int salePrice) |
1570 | { | 1568 | { |
1571 | GetClientFunds(remoteClient); | 1569 | GetClientFunds(remoteClient); |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs index 4a98622..0be540d 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Friends/FriendsModule.cs | |||
@@ -28,8 +28,8 @@ using System; | |||
28 | using System.Collections; | 28 | using System.Collections; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using libsecondlife.Packets; | 32 | using OpenMetaverse.Packets; |
33 | using log4net; | 33 | using log4net; |
34 | using Nini.Config; | 34 | using Nini.Config; |
35 | using Nwc.XmlRpc; | 35 | using Nwc.XmlRpc; |
@@ -43,10 +43,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.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 | private Dictionary<LLUUID, List<FriendListItem>> FriendLists = new Dictionary<LLUUID, List<FriendListItem>>(); | 46 | private Dictionary<UUID, List<FriendListItem>> FriendLists = new Dictionary<UUID, List<FriendListItem>>(); |
47 | private Dictionary<LLUUID, LLUUID> m_pendingFriendRequests = new Dictionary<LLUUID, LLUUID>(); | 47 | private Dictionary<UUID, UUID> m_pendingFriendRequests = new Dictionary<UUID, UUID>(); |
48 | private Dictionary<LLUUID, ulong> m_rootAgents = new Dictionary<LLUUID, ulong>(); | 48 | private Dictionary<UUID, ulong> m_rootAgents = new Dictionary<UUID, ulong>(); |
49 | private Dictionary<LLUUID, List<StoredFriendListUpdate>> StoredFriendListUpdates = new Dictionary<LLUUID, List<StoredFriendListUpdate>>(); | 49 | private Dictionary<UUID, List<StoredFriendListUpdate>> StoredFriendListUpdates = new Dictionary<UUID, List<StoredFriendListUpdate>>(); |
50 | 50 | ||
51 | private List<Scene> m_scene = new List<Scene>(); | 51 | private List<Scene> m_scene = new List<Scene>(); |
52 | 52 | ||
@@ -98,16 +98,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
98 | 98 | ||
99 | if (requestData.ContainsKey("agent_id") && requestData.ContainsKey("notify_id") && requestData.ContainsKey("status")) | 99 | if (requestData.ContainsKey("agent_id") && requestData.ContainsKey("notify_id") && requestData.ContainsKey("status")) |
100 | { | 100 | { |
101 | LLUUID notifyAgentId = LLUUID.Zero; | 101 | UUID notifyAgentId = UUID.Zero; |
102 | LLUUID notifyAboutAgentId = LLUUID.Zero; | 102 | UUID notifyAboutAgentId = UUID.Zero; |
103 | bool notifyOnlineStatus = false; | 103 | bool notifyOnlineStatus = false; |
104 | 104 | ||
105 | if ((string)requestData["status"] == "TRUE") | 105 | if ((string)requestData["status"] == "TRUE") |
106 | notifyOnlineStatus = true; | 106 | notifyOnlineStatus = true; |
107 | 107 | ||
108 | Helpers.TryParse((string)requestData["notify_id"], out notifyAgentId); | 108 | UUID.TryParse((string)requestData["notify_id"], out notifyAgentId); |
109 | 109 | ||
110 | Helpers.TryParse((string)requestData["agent_id"], out notifyAboutAgentId); | 110 | UUID.TryParse((string)requestData["agent_id"], out notifyAboutAgentId); |
111 | m_log.InfoFormat("[PRESENCE]: Got presence update for {0}, and we're telling {1}, with a status {2}", notifyAboutAgentId.ToString(), notifyAgentId.ToString(), notifyOnlineStatus.ToString()); | 111 | m_log.InfoFormat("[PRESENCE]: Got presence update for {0}, and we're telling {1}, with a status {2}", notifyAboutAgentId.ToString(), notifyAgentId.ToString(), notifyOnlineStatus.ToString()); |
112 | ScenePresence avatar = GetPresenceFromAgentID(notifyAgentId); | 112 | ScenePresence avatar = GetPresenceFromAgentID(notifyAgentId); |
113 | if (avatar != null) | 113 | if (avatar != null) |
@@ -189,7 +189,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
189 | 189 | ||
190 | } | 190 | } |
191 | 191 | ||
192 | private void doFriendListUpdateOnline(LLUUID AgentId) | 192 | private void doFriendListUpdateOnline(UUID AgentId) |
193 | { | 193 | { |
194 | List<FriendListItem> fl = new List<FriendListItem>(); | 194 | List<FriendListItem> fl = new List<FriendListItem>(); |
195 | 195 | ||
@@ -213,7 +213,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
213 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||
216 | List<LLUUID> UpdateUsers = new List<LLUUID>(); | 216 | List<UUID> UpdateUsers = new List<UUID>(); |
217 | 217 | ||
218 | foreach (FriendListItem f in fl) | 218 | foreach (FriendListItem f in fl) |
219 | { | 219 | { |
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
226 | } | 226 | } |
227 | } | 227 | } |
228 | } | 228 | } |
229 | foreach (LLUUID user in UpdateUsers) | 229 | foreach (UUID user in UpdateUsers) |
230 | { | 230 | { |
231 | ScenePresence av = GetPresenceFromAgentID(user); | 231 | ScenePresence av = GetPresenceFromAgentID(user); |
232 | if (av != null) | 232 | if (av != null) |
@@ -245,7 +245,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
245 | if (fli.Friend == AgentId) | 245 | if (fli.Friend == AgentId) |
246 | { | 246 | { |
247 | fli.onlinestatus = true; | 247 | fli.onlinestatus = true; |
248 | LLUUID[] Agents = new LLUUID[1]; | 248 | UUID[] Agents = new UUID[1]; |
249 | Agents[0] = AgentId; | 249 | Agents[0] = AgentId; |
250 | av.ControllingClient.SendAgentOnline(Agents); | 250 | av.ControllingClient.SendAgentOnline(Agents); |
251 | 251 | ||
@@ -266,7 +266,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
266 | } | 266 | } |
267 | } | 267 | } |
268 | 268 | ||
269 | private void ClientLoggedOut(LLUUID AgentId) | 269 | private void ClientLoggedOut(UUID AgentId) |
270 | { | 270 | { |
271 | lock (m_rootAgents) | 271 | lock (m_rootAgents) |
272 | { | 272 | { |
@@ -284,7 +284,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
284 | lfli = FriendLists[AgentId]; | 284 | lfli = FriendLists[AgentId]; |
285 | } | 285 | } |
286 | } | 286 | } |
287 | List<LLUUID> updateUsers = new List<LLUUID>(); | 287 | List<UUID> updateUsers = new List<UUID>(); |
288 | foreach (FriendListItem fli in lfli) | 288 | foreach (FriendListItem fli in lfli) |
289 | { | 289 | { |
290 | if (fli.onlinestatus == true) | 290 | if (fli.onlinestatus == true) |
@@ -352,7 +352,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
352 | ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); | 352 | ScenePresence av = GetPresenceFromAgentID(updateUsers[i]); |
353 | if (av != null) | 353 | if (av != null) |
354 | { | 354 | { |
355 | LLUUID[] agents = new LLUUID[1]; | 355 | UUID[] agents = new UUID[1]; |
356 | agents[0] = AgentId; | 356 | agents[0] = AgentId; |
357 | av.ControllingClient.SendAgentOffline(agents); | 357 | av.ControllingClient.SendAgentOffline(agents); |
358 | } | 358 | } |
@@ -364,7 +364,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
364 | } | 364 | } |
365 | } | 365 | } |
366 | 366 | ||
367 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, LLUUID regionID) | 367 | private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID) |
368 | { | 368 | { |
369 | lock (m_rootAgents) | 369 | lock (m_rootAgents) |
370 | { | 370 | { |
@@ -427,7 +427,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
427 | } | 427 | } |
428 | } | 428 | } |
429 | 429 | ||
430 | private ScenePresence GetPresenceFromAgentID(LLUUID AgentID) | 430 | private ScenePresence GetPresenceFromAgentID(UUID AgentID) |
431 | { | 431 | { |
432 | ScenePresence returnAgent = null; | 432 | ScenePresence returnAgent = null; |
433 | lock (m_scene) | 433 | lock (m_scene) |
@@ -451,11 +451,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
451 | 451 | ||
452 | #region FriendRequestHandling | 452 | #region FriendRequestHandling |
453 | 453 | ||
454 | private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, | 454 | private void OnInstantMessage(IClientAPI client, UUID fromAgentID, |
455 | LLUUID fromAgentSession, LLUUID toAgentID, | 455 | UUID fromAgentSession, UUID toAgentID, |
456 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 456 | UUID imSessionID, uint timestamp, string fromAgentName, |
457 | string message, byte dialog, bool fromGroup, byte offline, | 457 | string message, byte dialog, bool fromGroup, byte offline, |
458 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 458 | uint ParentEstateID, Vector3 Position, UUID RegionID, |
459 | byte[] binaryBucket) | 459 | byte[] binaryBucket) |
460 | { | 460 | { |
461 | // Friend Requests go by Instant Message.. using the dialog param | 461 | // Friend Requests go by Instant Message.. using the dialog param |
@@ -464,17 +464,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
464 | // 38 == Offer friendship | 464 | // 38 == Offer friendship |
465 | if (dialog == (byte) 38) | 465 | if (dialog == (byte) 38) |
466 | { | 466 | { |
467 | LLUUID friendTransactionID = LLUUID.Random(); | 467 | UUID friendTransactionID = UUID.Random(); |
468 | 468 | ||
469 | m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); | 469 | m_pendingFriendRequests.Add(friendTransactionID, fromAgentID); |
470 | 470 | ||
471 | m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + | 471 | m_log.Info("[FRIEND]: 38 - From:" + fromAgentID.ToString() + " To: " + toAgentID.ToString() + " Session:" + imSessionID.ToString() + " Message:" + |
472 | message); | 472 | message); |
473 | GridInstantMessage msg = new GridInstantMessage(); | 473 | GridInstantMessage msg = new GridInstantMessage(); |
474 | msg.fromAgentID = fromAgentID.UUID; | 474 | msg.fromAgentID = fromAgentID.Guid; |
475 | msg.fromAgentSession = fromAgentSession.UUID; | 475 | msg.fromAgentSession = fromAgentSession.Guid; |
476 | msg.toAgentID = toAgentID.UUID; | 476 | msg.toAgentID = toAgentID.Guid; |
477 | msg.imSessionID = friendTransactionID.UUID; // This is the item we're mucking with here | 477 | msg.imSessionID = friendTransactionID.Guid; // This is the item we're mucking with here |
478 | m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString()); | 478 | m_log.Info("[FRIEND]: Filling Session: " + msg.imSessionID.ToString()); |
479 | msg.timestamp = timestamp; | 479 | msg.timestamp = timestamp; |
480 | if (client != null) | 480 | if (client != null) |
@@ -490,8 +490,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
490 | msg.fromGroup = fromGroup; | 490 | msg.fromGroup = fromGroup; |
491 | msg.offline = offline; | 491 | msg.offline = offline; |
492 | msg.ParentEstateID = ParentEstateID; | 492 | msg.ParentEstateID = ParentEstateID; |
493 | msg.Position = new sLLVector3(Position); | 493 | msg.Position = Position; |
494 | msg.RegionID = RegionID.UUID; | 494 | msg.RegionID = RegionID.Guid; |
495 | msg.binaryBucket = binaryBucket; | 495 | msg.binaryBucket = binaryBucket; |
496 | // We don't really care which scene we pipe it through. | 496 | // We don't really care which scene we pipe it through. |
497 | m_scene[0].TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 497 | m_scene[0].TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
@@ -512,7 +512,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
512 | } | 512 | } |
513 | } | 513 | } |
514 | 514 | ||
515 | private void OnApprovedFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) | 515 | private void OnApprovedFriendRequest(IClientAPI client, UUID agentID, UUID transactionID, List<UUID> callingCardFolders) |
516 | { | 516 | { |
517 | if (m_pendingFriendRequests.ContainsKey(transactionID)) | 517 | if (m_pendingFriendRequests.ContainsKey(transactionID)) |
518 | { | 518 | { |
@@ -528,18 +528,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
528 | 528 | ||
529 | // Compose response to other agent. | 529 | // Compose response to other agent. |
530 | GridInstantMessage msg = new GridInstantMessage(); | 530 | GridInstantMessage msg = new GridInstantMessage(); |
531 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; | 531 | msg.toAgentID = m_pendingFriendRequests[transactionID].Guid; |
532 | msg.fromAgentID = agentID.UUID; | 532 | msg.fromAgentID = agentID.Guid; |
533 | msg.fromAgentName = client.Name; | 533 | msg.fromAgentName = client.Name; |
534 | msg.fromAgentSession = client.SessionId.UUID; | 534 | msg.fromAgentSession = client.SessionId.Guid; |
535 | msg.fromGroup = false; | 535 | msg.fromGroup = false; |
536 | msg.imSessionID = transactionID.UUID; | 536 | msg.imSessionID = transactionID.Guid; |
537 | msg.message = agentID.UUID.ToString(); | 537 | msg.message = agentID.Guid.ToString(); |
538 | msg.ParentEstateID = 0; | 538 | msg.ParentEstateID = 0; |
539 | msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); | 539 | msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); |
540 | msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; | 540 | msg.RegionID = SceneAgentIn.RegionInfo.RegionID.Guid; |
541 | msg.dialog = (byte) 39; // Approved friend request | 541 | msg.dialog = (byte) 39; // Approved friend request |
542 | msg.Position = new sLLVector3(); | 542 | msg.Position = Vector3.Zero; |
543 | msg.offline = (byte) 0; | 543 | msg.offline = (byte) 0; |
544 | msg.binaryBucket = new byte[0]; | 544 | msg.binaryBucket = new byte[0]; |
545 | // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database | 545 | // We don't really care which scene we pipe it through, it goes to the shared IM Module and/or the database |
@@ -548,7 +548,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
548 | SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1); | 548 | SceneAgentIn.StoreAddFriendship(m_pendingFriendRequests[transactionID], agentID, (uint) 1); |
549 | 549 | ||
550 | 550 | ||
551 | //LLUUID[] Agents = new LLUUID[1]; | 551 | //UUID[] Agents = new UUID[1]; |
552 | //Agents[0] = msg.toAgentID; | 552 | //Agents[0] = msg.toAgentID; |
553 | //av.ControllingClient.SendAgentOnline(Agents); | 553 | //av.ControllingClient.SendAgentOnline(Agents); |
554 | 554 | ||
@@ -557,7 +557,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
557 | } | 557 | } |
558 | } | 558 | } |
559 | 559 | ||
560 | private void OnDenyFriendRequest(IClientAPI client, LLUUID agentID, LLUUID transactionID, List<LLUUID> callingCardFolders) | 560 | private void OnDenyFriendRequest(IClientAPI client, UUID agentID, UUID transactionID, List<UUID> callingCardFolders) |
561 | { | 561 | { |
562 | if (m_pendingFriendRequests.ContainsKey(transactionID)) | 562 | if (m_pendingFriendRequests.ContainsKey(transactionID)) |
563 | { | 563 | { |
@@ -571,18 +571,18 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
571 | } | 571 | } |
572 | // Compose response to other agent. | 572 | // Compose response to other agent. |
573 | GridInstantMessage msg = new GridInstantMessage(); | 573 | GridInstantMessage msg = new GridInstantMessage(); |
574 | msg.toAgentID = m_pendingFriendRequests[transactionID].UUID; | 574 | msg.toAgentID = m_pendingFriendRequests[transactionID].Guid; |
575 | msg.fromAgentID = agentID.UUID; | 575 | msg.fromAgentID = agentID.Guid; |
576 | msg.fromAgentName = client.Name; | 576 | msg.fromAgentName = client.Name; |
577 | msg.fromAgentSession = client.SessionId.UUID; | 577 | msg.fromAgentSession = client.SessionId.Guid; |
578 | msg.fromGroup = false; | 578 | msg.fromGroup = false; |
579 | msg.imSessionID = transactionID.UUID; | 579 | msg.imSessionID = transactionID.Guid; |
580 | msg.message = agentID.UUID.ToString(); | 580 | msg.message = agentID.Guid.ToString(); |
581 | msg.ParentEstateID = 0; | 581 | msg.ParentEstateID = 0; |
582 | msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); | 582 | msg.timestamp = (uint) Util.UnixTimeSinceEpoch(); |
583 | msg.RegionID = SceneAgentIn.RegionInfo.RegionID.UUID; | 583 | msg.RegionID = SceneAgentIn.RegionInfo.RegionID.Guid; |
584 | msg.dialog = (byte) 40; // Deny friend request | 584 | msg.dialog = (byte) 40; // Deny friend request |
585 | msg.Position = new sLLVector3(); | 585 | msg.Position = Vector3.Zero; |
586 | msg.offline = (byte) 0; | 586 | msg.offline = (byte) 0; |
587 | msg.binaryBucket = new byte[0]; | 587 | msg.binaryBucket = new byte[0]; |
588 | SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); | 588 | SceneAgentIn.TriggerGridInstantMessage(msg, InstantMessageReceiver.IMModule); |
@@ -590,7 +590,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
590 | } | 590 | } |
591 | } | 591 | } |
592 | 592 | ||
593 | private void OnTerminateFriendship(IClientAPI client, LLUUID agent, LLUUID exfriendID) | 593 | private void OnTerminateFriendship(IClientAPI client, UUID agent, UUID exfriendID) |
594 | { | 594 | { |
595 | m_scene[0].StoreRemoveFriendship(agent, exfriendID); | 595 | m_scene[0].StoreRemoveFriendship(agent, exfriendID); |
596 | // TODO: Inform the client that the ExFriend is offline | 596 | // TODO: Inform the client that the ExFriend is offline |
@@ -599,10 +599,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
599 | private void OnGridInstantMessage(GridInstantMessage msg) | 599 | private void OnGridInstantMessage(GridInstantMessage msg) |
600 | { | 600 | { |
601 | // Trigger the above event handler | 601 | // Trigger the above event handler |
602 | OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), | 602 | OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession), |
603 | new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, | 603 | new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, |
604 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, | 604 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, |
605 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), | 605 | new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID), |
606 | msg.binaryBucket); | 606 | msg.binaryBucket); |
607 | } | 607 | } |
608 | 608 | ||
@@ -611,8 +611,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends | |||
611 | 611 | ||
612 | public struct StoredFriendListUpdate | 612 | public struct StoredFriendListUpdate |
613 | { | 613 | { |
614 | public LLUUID storedFor; | 614 | public UUID storedFor; |
615 | public LLUUID storedAbout; | 615 | public UUID storedAbout; |
616 | public bool OnlineYN; | 616 | public bool OnlineYN; |
617 | } | 617 | } |
618 | } | 618 | } |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs index eaa5013..ad0cac0 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections.Generic; | 29 | using System.Collections.Generic; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using log4net; | 32 | using log4net; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
@@ -41,11 +41,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
41 | { | 41 | { |
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
44 | private Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>(); | 44 | private Dictionary<UUID, GroupList> m_grouplistmap = new Dictionary<UUID, GroupList>(); |
45 | private Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>(); | 45 | private Dictionary<UUID, GroupData> m_groupmap = new Dictionary<UUID, GroupData>(); |
46 | private Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>(); | 46 | private Dictionary<UUID, IClientAPI> m_iclientmap = new Dictionary<UUID, IClientAPI>(); |
47 | private Dictionary<LLUUID, GroupData> m_groupUUIDGroup = new Dictionary<LLUUID, GroupData>(); | 47 | private Dictionary<UUID, GroupData> m_groupUUIDGroup = new Dictionary<UUID, GroupData>(); |
48 | private LLUUID opensimulatorGroupID = new LLUUID("00000000-68f9-1111-024e-222222111123"); | 48 | private UUID opensimulatorGroupID = new UUID("00000000-68f9-1111-024e-222222111123"); |
49 | 49 | ||
50 | private List<Scene> m_scene = new List<Scene>(); | 50 | private List<Scene> m_scene = new List<Scene>(); |
51 | 51 | ||
@@ -161,13 +161,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
161 | client.SendGroupMembership(updateGroups); | 161 | client.SendGroupMembership(updateGroups); |
162 | } | 162 | } |
163 | 163 | ||
164 | private void OnAgentDataUpdateRequest(IClientAPI remoteClient, LLUUID AgentID, LLUUID SessionID) | 164 | private void OnAgentDataUpdateRequest(IClientAPI remoteClient, UUID AgentID, UUID SessionID) |
165 | { | 165 | { |
166 | // Adam, this is one of those impossible to refactor items without resorting to .Split hackery | 166 | // Adam, this is one of those impossible to refactor items without resorting to .Split hackery |
167 | string firstname = remoteClient.FirstName; | 167 | string firstname = remoteClient.FirstName; |
168 | string lastname = remoteClient.LastName; | 168 | string lastname = remoteClient.LastName; |
169 | 169 | ||
170 | LLUUID ActiveGroupID = LLUUID.Zero; | 170 | UUID ActiveGroupID = UUID.Zero; |
171 | uint ActiveGroupPowers = 0; | 171 | uint ActiveGroupPowers = 0; |
172 | string ActiveGroupName = "OpenSimulator Tester"; | 172 | string ActiveGroupName = "OpenSimulator Tester"; |
173 | string ActiveGroupTitle = "I IZ N0T"; | 173 | string ActiveGroupTitle = "I IZ N0T"; |
@@ -202,11 +202,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
202 | } | 202 | } |
203 | } | 203 | } |
204 | 204 | ||
205 | private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, | 205 | private void OnInstantMessage(IClientAPI client, UUID fromAgentID, |
206 | LLUUID fromAgentSession, LLUUID toAgentID, | 206 | UUID fromAgentSession, UUID toAgentID, |
207 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 207 | UUID imSessionID, uint timestamp, string fromAgentName, |
208 | string message, byte dialog, bool fromGroup, byte offline, | 208 | string message, byte dialog, bool fromGroup, byte offline, |
209 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 209 | uint ParentEstateID, Vector3 Position, UUID RegionID, |
210 | byte[] binaryBucket) | 210 | byte[] binaryBucket) |
211 | { | 211 | { |
212 | } | 212 | } |
@@ -214,16 +214,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
214 | private void OnGridInstantMessage(GridInstantMessage msg) | 214 | private void OnGridInstantMessage(GridInstantMessage msg) |
215 | { | 215 | { |
216 | // Trigger the above event handler | 216 | // Trigger the above event handler |
217 | OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), | 217 | OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession), |
218 | new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, | 218 | new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, |
219 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, | 219 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, |
220 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), | 220 | new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID), |
221 | msg.binaryBucket); | 221 | msg.binaryBucket); |
222 | } | 222 | } |
223 | private void HandleUUIDGroupNameRequest(LLUUID id,IClientAPI remote_client) | 223 | private void HandleUUIDGroupNameRequest(UUID id,IClientAPI remote_client) |
224 | { | 224 | { |
225 | string groupnamereply = "Unknown"; | 225 | string groupnamereply = "Unknown"; |
226 | LLUUID groupUUID = LLUUID.Zero; | 226 | UUID groupUUID = UUID.Zero; |
227 | 227 | ||
228 | lock (m_groupUUIDGroup) | 228 | lock (m_groupUUIDGroup) |
229 | { | 229 | { |
@@ -236,7 +236,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
236 | } | 236 | } |
237 | remote_client.SendGroupNameReply(groupUUID, groupnamereply); | 237 | remote_client.SendGroupNameReply(groupUUID, groupnamereply); |
238 | } | 238 | } |
239 | private void OnClientClosed(LLUUID agentID) | 239 | private void OnClientClosed(UUID agentID) |
240 | { | 240 | { |
241 | lock (m_iclientmap) | 241 | lock (m_iclientmap) |
242 | { | 242 | { |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs index bb3303f..6b2de80 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/InstantMessage/InstantMessageModule.cs | |||
@@ -30,7 +30,7 @@ using System.Collections.Generic; | |||
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using System.Net; | 31 | using System.Net; |
32 | using System.Threading; | 32 | using System.Threading; |
33 | using libsecondlife; | 33 | using OpenMetaverse; |
34 | using log4net; | 34 | using log4net; |
35 | using Nini.Config; | 35 | using Nini.Config; |
36 | using Nwc.XmlRpc; | 36 | using Nwc.XmlRpc; |
@@ -45,7 +45,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 45 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
46 | 46 | ||
47 | private readonly List<Scene> m_scenes = new List<Scene>(); | 47 | private readonly List<Scene> m_scenes = new List<Scene>(); |
48 | private Dictionary<LLUUID, ulong> m_userRegionMap = new Dictionary<LLUUID, ulong>(); | 48 | private Dictionary<UUID, ulong> m_userRegionMap = new Dictionary<UUID, ulong>(); |
49 | 49 | ||
50 | #region IRegionModule Members | 50 | #region IRegionModule Members |
51 | 51 | ||
@@ -106,11 +106,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
106 | client.OnInstantMessage += OnInstantMessage; | 106 | client.OnInstantMessage += OnInstantMessage; |
107 | } | 107 | } |
108 | 108 | ||
109 | private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, | 109 | private void OnInstantMessage(IClientAPI client, UUID fromAgentID, |
110 | LLUUID fromAgentSession, LLUUID toAgentID, | 110 | UUID fromAgentSession, UUID toAgentID, |
111 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 111 | UUID imSessionID, uint timestamp, string fromAgentName, |
112 | string message, byte dialog, bool fromGroup, byte offline, | 112 | string message, byte dialog, bool fromGroup, byte offline, |
113 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 113 | uint ParentEstateID, Vector3 Position, UUID RegionID, |
114 | byte[] binaryBucket) | 114 | byte[] binaryBucket) |
115 | { | 115 | { |
116 | bool dialogHandledElsewhere | 116 | bool dialogHandledElsewhere |
@@ -122,8 +122,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
122 | // IM dialogs need to be pre-processed and have their sessionID filled by the server | 122 | // IM dialogs need to be pre-processed and have their sessionID filled by the server |
123 | // so the sim can match the transaction on the return packet. | 123 | // so the sim can match the transaction on the return packet. |
124 | 124 | ||
125 | // Don't send a Friend Dialog IM with a LLUUID.Zero session. | 125 | // Don't send a Friend Dialog IM with a UUID.Zero session. |
126 | if (!(dialogHandledElsewhere && imSessionID == LLUUID.Zero)) | 126 | if (!(dialogHandledElsewhere && imSessionID == UUID.Zero)) |
127 | { | 127 | { |
128 | // Try root avatar only first | 128 | // Try root avatar only first |
129 | foreach (Scene scene in m_scenes) | 129 | foreach (Scene scene in m_scenes) |
@@ -195,10 +195,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
195 | private void OnGridInstantMessage(GridInstantMessage msg) | 195 | private void OnGridInstantMessage(GridInstantMessage msg) |
196 | { | 196 | { |
197 | // Trigger the above event handler | 197 | // Trigger the above event handler |
198 | OnInstantMessage(null, new LLUUID(msg.fromAgentID), new LLUUID(msg.fromAgentSession), | 198 | OnInstantMessage(null, new UUID(msg.fromAgentID), new UUID(msg.fromAgentSession), |
199 | new LLUUID(msg.toAgentID), new LLUUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, | 199 | new UUID(msg.toAgentID), new UUID(msg.imSessionID), msg.timestamp, msg.fromAgentName, |
200 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, | 200 | msg.message, msg.dialog, msg.fromGroup, msg.offline, msg.ParentEstateID, |
201 | new LLVector3(msg.Position.x, msg.Position.y, msg.Position.z), new LLUUID(msg.RegionID), | 201 | new Vector3(msg.Position.X, msg.Position.Y, msg.Position.Z), new UUID(msg.RegionID), |
202 | msg.binaryBucket); | 202 | msg.binaryBucket); |
203 | } | 203 | } |
204 | 204 | ||
@@ -214,10 +214,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
214 | { | 214 | { |
215 | bool successful = false; | 215 | bool successful = false; |
216 | // various rational defaults | 216 | // various rational defaults |
217 | LLUUID fromAgentID = LLUUID.Zero; | 217 | UUID fromAgentID = UUID.Zero; |
218 | LLUUID fromAgentSession = LLUUID.Zero; | 218 | UUID fromAgentSession = UUID.Zero; |
219 | LLUUID toAgentID = LLUUID.Zero; | 219 | UUID toAgentID = UUID.Zero; |
220 | LLUUID imSessionID = LLUUID.Zero; | 220 | UUID imSessionID = UUID.Zero; |
221 | uint timestamp = 0; | 221 | uint timestamp = 0; |
222 | string fromAgentName = ""; | 222 | string fromAgentName = ""; |
223 | string message = ""; | 223 | string message = ""; |
@@ -225,8 +225,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
225 | bool fromGroup = false; | 225 | bool fromGroup = false; |
226 | byte offline = (byte)0; | 226 | byte offline = (byte)0; |
227 | uint ParentEstateID=0; | 227 | uint ParentEstateID=0; |
228 | LLVector3 Position = LLVector3.Zero; | 228 | Vector3 Position = Vector3.Zero; |
229 | LLUUID RegionID = LLUUID.Zero ; | 229 | UUID RegionID = UUID.Zero ; |
230 | byte[] binaryBucket = new byte[0]; | 230 | byte[] binaryBucket = new byte[0]; |
231 | 231 | ||
232 | float pos_x = 0; | 232 | float pos_x = 0; |
@@ -248,11 +248,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
248 | && requestData.ContainsKey("binary_bucket") && requestData.ContainsKey("region_handle")) | 248 | && requestData.ContainsKey("binary_bucket") && requestData.ContainsKey("region_handle")) |
249 | { | 249 | { |
250 | // Do the easy way of validating the UUIDs | 250 | // Do the easy way of validating the UUIDs |
251 | Helpers.TryParse((string)requestData["from_agent_id"], out fromAgentID); | 251 | UUID.TryParse((string)requestData["from_agent_id"], out fromAgentID); |
252 | Helpers.TryParse((string)requestData["from_agent_session"], out fromAgentSession); | 252 | UUID.TryParse((string)requestData["from_agent_session"], out fromAgentSession); |
253 | Helpers.TryParse((string)requestData["to_agent_id"], out toAgentID); | 253 | UUID.TryParse((string)requestData["to_agent_id"], out toAgentID); |
254 | Helpers.TryParse((string)requestData["im_session_id"], out imSessionID); | 254 | UUID.TryParse((string)requestData["im_session_id"], out imSessionID); |
255 | Helpers.TryParse((string)requestData["region_id"], out RegionID); | 255 | UUID.TryParse((string)requestData["region_id"], out RegionID); |
256 | 256 | ||
257 | # region timestamp | 257 | # region timestamp |
258 | try | 258 | try |
@@ -345,24 +345,24 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
345 | } | 345 | } |
346 | # endregion | 346 | # endregion |
347 | 347 | ||
348 | Position = new LLVector3(pos_x, pos_y, pos_z); | 348 | Position = new Vector3(pos_x, pos_y, pos_z); |
349 | binaryBucket = Convert.FromBase64String((string)requestData["binary_bucket"]); | 349 | binaryBucket = Convert.FromBase64String((string)requestData["binary_bucket"]); |
350 | 350 | ||
351 | // Create a New GridInstantMessageObject the the data | 351 | // Create a New GridInstantMessageObject the the data |
352 | GridInstantMessage gim = new GridInstantMessage(); | 352 | GridInstantMessage gim = new GridInstantMessage(); |
353 | gim.fromAgentID = fromAgentID.UUID; | 353 | gim.fromAgentID = fromAgentID.Guid; |
354 | gim.fromAgentName = fromAgentName; | 354 | gim.fromAgentName = fromAgentName; |
355 | gim.fromAgentSession = fromAgentSession.UUID; | 355 | gim.fromAgentSession = fromAgentSession.Guid; |
356 | gim.fromGroup = fromGroup; | 356 | gim.fromGroup = fromGroup; |
357 | gim.imSessionID = imSessionID.UUID; | 357 | gim.imSessionID = imSessionID.Guid; |
358 | gim.RegionID = RegionID.UUID; | 358 | gim.RegionID = RegionID.Guid; |
359 | gim.timestamp = timestamp; | 359 | gim.timestamp = timestamp; |
360 | gim.toAgentID = toAgentID.UUID; | 360 | gim.toAgentID = toAgentID.Guid; |
361 | gim.message = message; | 361 | gim.message = message; |
362 | gim.dialog = dialog; | 362 | gim.dialog = dialog; |
363 | gim.offline = offline; | 363 | gim.offline = offline; |
364 | gim.ParentEstateID = ParentEstateID; | 364 | gim.ParentEstateID = ParentEstateID; |
365 | gim.Position = new sLLVector3(Position); | 365 | gim.Position = Position; |
366 | gim.binaryBucket = binaryBucket; | 366 | gim.binaryBucket = binaryBucket; |
367 | 367 | ||
368 | 368 | ||
@@ -418,11 +418,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
418 | /// <param name="binaryBucket"></param> | 418 | /// <param name="binaryBucket"></param> |
419 | /// <param name="regionhandle"></param> | 419 | /// <param name="regionhandle"></param> |
420 | /// <param name="prevRegionHandle"></param> | 420 | /// <param name="prevRegionHandle"></param> |
421 | public delegate void GridInstantMessageDelegate(IClientAPI client, LLUUID fromAgentID, | 421 | public delegate void GridInstantMessageDelegate(IClientAPI client, UUID fromAgentID, |
422 | LLUUID fromAgentSession, LLUUID toAgentID, | 422 | UUID fromAgentSession, UUID toAgentID, |
423 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 423 | UUID imSessionID, uint timestamp, string fromAgentName, |
424 | string message, byte dialog, bool fromGroup, byte offline, | 424 | string message, byte dialog, bool fromGroup, byte offline, |
425 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 425 | uint ParentEstateID, Vector3 Position, UUID RegionID, |
426 | byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle); | 426 | byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle); |
427 | 427 | ||
428 | private void GridInstantMessageCompleted(IAsyncResult iar) | 428 | private void GridInstantMessageCompleted(IAsyncResult iar) |
@@ -432,11 +432,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
432 | } | 432 | } |
433 | 433 | ||
434 | 434 | ||
435 | protected virtual void SendGridInstantMessageViaXMLRPC(IClientAPI client, LLUUID fromAgentID, | 435 | protected virtual void SendGridInstantMessageViaXMLRPC(IClientAPI client, UUID fromAgentID, |
436 | LLUUID fromAgentSession, LLUUID toAgentID, | 436 | UUID fromAgentSession, UUID toAgentID, |
437 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 437 | UUID imSessionID, uint timestamp, string fromAgentName, |
438 | string message, byte dialog, bool fromGroup, byte offline, | 438 | string message, byte dialog, bool fromGroup, byte offline, |
439 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 439 | uint ParentEstateID, Vector3 Position, UUID RegionID, |
440 | byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) | 440 | byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) |
441 | { | 441 | { |
442 | GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync; | 442 | GridInstantMessageDelegate d = SendGridInstantMessageViaXMLRPCAsync; |
@@ -459,11 +459,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
459 | /// if it's the same as the user's looked up region handle, then we end the recursive loop | 459 | /// if it's the same as the user's looked up region handle, then we end the recursive loop |
460 | /// </summary> | 460 | /// </summary> |
461 | /// <param name="prevRegionHandle"></param> | 461 | /// <param name="prevRegionHandle"></param> |
462 | protected virtual void SendGridInstantMessageViaXMLRPCAsync(IClientAPI client, LLUUID fromAgentID, | 462 | protected virtual void SendGridInstantMessageViaXMLRPCAsync(IClientAPI client, UUID fromAgentID, |
463 | LLUUID fromAgentSession, LLUUID toAgentID, | 463 | UUID fromAgentSession, UUID toAgentID, |
464 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 464 | UUID imSessionID, uint timestamp, string fromAgentName, |
465 | string message, byte dialog, bool fromGroup, byte offline, | 465 | string message, byte dialog, bool fromGroup, byte offline, |
466 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 466 | uint ParentEstateID, Vector3 Position, UUID RegionID, |
467 | byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) | 467 | byte[] binaryBucket, ulong regionhandle, ulong prevRegionHandle) |
468 | { | 468 | { |
469 | UserAgentData upd = null; | 469 | UserAgentData upd = null; |
@@ -527,10 +527,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
527 | if (reginfo != null) | 527 | if (reginfo != null) |
528 | { | 528 | { |
529 | GridInstantMessage msg = new GridInstantMessage(); | 529 | GridInstantMessage msg = new GridInstantMessage(); |
530 | msg.fromAgentID = fromAgentID.UUID; | 530 | msg.fromAgentID = fromAgentID.Guid; |
531 | msg.fromAgentSession = fromAgentSession.UUID; | 531 | msg.fromAgentSession = fromAgentSession.Guid; |
532 | msg.toAgentID = toAgentID.UUID; | 532 | msg.toAgentID = toAgentID.Guid; |
533 | msg.imSessionID = imSessionID.UUID; | 533 | msg.imSessionID = imSessionID.Guid; |
534 | msg.timestamp = timestamp; | 534 | msg.timestamp = timestamp; |
535 | msg.fromAgentName = fromAgentName; | 535 | msg.fromAgentName = fromAgentName; |
536 | msg.message = message; | 536 | msg.message = message; |
@@ -538,8 +538,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
538 | msg.fromGroup = fromGroup; | 538 | msg.fromGroup = fromGroup; |
539 | msg.offline = offline; | 539 | msg.offline = offline; |
540 | msg.ParentEstateID = ParentEstateID; | 540 | msg.ParentEstateID = ParentEstateID; |
541 | msg.Position = new sLLVector3(Position); | 541 | msg.Position = Position; |
542 | msg.RegionID = RegionID.UUID; | 542 | msg.RegionID = RegionID.Guid; |
543 | msg.binaryBucket = binaryBucket; | 543 | msg.binaryBucket = binaryBucket; |
544 | 544 | ||
545 | Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(msg); | 545 | Hashtable msgdata = ConvertGridInstantMessageToXMLRPC(msg); |
@@ -649,7 +649,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
649 | /// </summary> | 649 | /// </summary> |
650 | /// <param name="regionID">UUID of region to get the region handle for</param> | 650 | /// <param name="regionID">UUID of region to get the region handle for</param> |
651 | /// <returns></returns> | 651 | /// <returns></returns> |
652 | private ulong getLocalRegionHandleFromUUID(LLUUID regionID) | 652 | private ulong getLocalRegionHandleFromUUID(UUID regionID) |
653 | { | 653 | { |
654 | ulong returnhandle = 0; | 654 | ulong returnhandle = 0; |
655 | 655 | ||
@@ -692,13 +692,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.InstantMessage | |||
692 | byte[] offlinedata = new byte[1]; offlinedata[0] = msg.offline; | 692 | byte[] offlinedata = new byte[1]; offlinedata[0] = msg.offline; |
693 | gim["offline"] = Convert.ToBase64String(offlinedata, Base64FormattingOptions.None); | 693 | gim["offline"] = Convert.ToBase64String(offlinedata, Base64FormattingOptions.None); |
694 | gim["parent_estate_id"] = msg.ParentEstateID.ToString(); | 694 | gim["parent_estate_id"] = msg.ParentEstateID.ToString(); |
695 | gim["position_x"] = msg.Position.x.ToString(); | 695 | gim["position_x"] = msg.Position.X.ToString(); |
696 | gim["position_y"] = msg.Position.y.ToString(); | 696 | gim["position_y"] = msg.Position.Y.ToString(); |
697 | gim["position_z"] = msg.Position.z.ToString(); | 697 | gim["position_z"] = msg.Position.Z.ToString(); |
698 | gim["region_id"] = msg.RegionID.ToString(); | 698 | gim["region_id"] = msg.RegionID.ToString(); |
699 | gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket,Base64FormattingOptions.None); | 699 | gim["binary_bucket"] = Convert.ToBase64String(msg.binaryBucket,Base64FormattingOptions.None); |
700 | return gim; | 700 | return gim; |
701 | } | 701 | } |
702 | 702 | ||
703 | } | 703 | } |
704 | } \ No newline at end of file | 704 | } |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs index d036dbb..344cb5e 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Inventory/InventoryModule.cs | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | using System.Collections.Generic; | 28 | using System.Collections.Generic; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using libsecondlife; | 30 | using OpenMetaverse; |
31 | using log4net; | 31 | using log4net; |
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -46,10 +46,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
46 | /// occurs in the initial offer message, not the accept message. So this dictionary links | 46 | /// occurs in the initial offer message, not the accept message. So this dictionary links |
47 | /// IM Session Ids to ItemIds | 47 | /// IM Session Ids to ItemIds |
48 | /// </summary> | 48 | /// </summary> |
49 | private IDictionary<LLUUID, LLUUID> m_pendingOffers = new Dictionary<LLUUID, LLUUID>(); | 49 | private IDictionary<UUID, UUID> m_pendingOffers = new Dictionary<UUID, UUID>(); |
50 | 50 | ||
51 | private List<Scene> m_Scenelist = new List<Scene>(); | 51 | private List<Scene> m_Scenelist = new List<Scene>(); |
52 | private Dictionary<LLUUID, Scene> m_AgentRegions = new Dictionary<LLUUID, Scene>(); | 52 | private Dictionary<UUID, Scene> m_AgentRegions = new Dictionary<UUID, Scene>(); |
53 | 53 | ||
54 | #region IRegionModule Members | 54 | #region IRegionModule Members |
55 | 55 | ||
@@ -92,11 +92,11 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
92 | client.OnInstantMessage += OnInstantMessage; | 92 | client.OnInstantMessage += OnInstantMessage; |
93 | } | 93 | } |
94 | 94 | ||
95 | private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, | 95 | private void OnInstantMessage(IClientAPI client, UUID fromAgentID, |
96 | LLUUID fromAgentSession, LLUUID toAgentID, | 96 | UUID fromAgentSession, UUID toAgentID, |
97 | LLUUID imSessionID, uint timestamp, string fromAgentName, | 97 | UUID imSessionID, uint timestamp, string fromAgentName, |
98 | string message, byte dialog, bool fromGroup, byte offline, | 98 | string message, byte dialog, bool fromGroup, byte offline, |
99 | uint ParentEstateID, LLVector3 Position, LLUUID RegionID, | 99 | uint ParentEstateID, Vector3 Position, UUID RegionID, |
100 | byte[] binaryBucket) | 100 | byte[] binaryBucket) |
101 | { | 101 | { |
102 | if (dialog == (byte) InstantMessageDialog.InventoryOffered) | 102 | if (dialog == (byte) InstantMessageDialog.InventoryOffered) |
@@ -117,8 +117,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
117 | // Next 16 bytes are the UUID | 117 | // Next 16 bytes are the UUID |
118 | //Array.Copy(binaryBucket, 1, rawId, 0, 16); | 118 | //Array.Copy(binaryBucket, 1, rawId, 0, 16); |
119 | 119 | ||
120 | //LLUUID itemId = new LLUUID(new Guid(rawId)); | 120 | //UUID itemId = new UUID(new Guid(rawId)); |
121 | LLUUID itemId = new LLUUID(binaryBucket, 1); | 121 | UUID itemId = new UUID(binaryBucket, 1); |
122 | 122 | ||
123 | m_log.DebugFormat( | 123 | m_log.DebugFormat( |
124 | "[AGENT INVENTORY]: ItemId for giving is {0}", itemId); | 124 | "[AGENT INVENTORY]: ItemId for giving is {0}", itemId); |
@@ -225,12 +225,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
225 | } | 225 | } |
226 | } | 226 | } |
227 | 227 | ||
228 | public void SetRootAgentScene(LLUUID agentID, Scene scene) | 228 | public void SetRootAgentScene(UUID agentID, Scene scene) |
229 | { | 229 | { |
230 | m_AgentRegions[agentID] = scene; | 230 | m_AgentRegions[agentID] = scene; |
231 | } | 231 | } |
232 | 232 | ||
233 | public bool NeedSceneCacheClear(LLUUID agentID, Scene scene) | 233 | public bool NeedSceneCacheClear(UUID agentID, Scene scene) |
234 | { | 234 | { |
235 | if (!m_AgentRegions.ContainsKey(agentID)) | 235 | if (!m_AgentRegions.ContainsKey(agentID)) |
236 | { | 236 | { |
@@ -279,7 +279,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory | |||
279 | return false; | 279 | return false; |
280 | } | 280 | } |
281 | 281 | ||
282 | public void ClientLoggedOut(LLUUID agentID) | 282 | public void ClientLoggedOut(UUID agentID) |
283 | { | 283 | { |
284 | if (m_AgentRegions.ContainsKey(agentID)) | 284 | if (m_AgentRegions.ContainsKey(agentID)) |
285 | m_AgentRegions.Remove(agentID); | 285 | m_AgentRegions.Remove(agentID); |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs index 20b1c1c..f9c0dcf 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Profiles/AvatarProfilesModule.cs | |||
@@ -27,7 +27,7 @@ | |||
27 | 27 | ||
28 | using System; | 28 | using System; |
29 | using System.Reflection; | 29 | using System.Reflection; |
30 | using libsecondlife; | 30 | using OpenMetaverse; |
31 | using log4net; | 31 | using log4net; |
32 | using Nini.Config; | 32 | using Nini.Config; |
33 | using OpenSim.Framework; | 33 | using OpenSim.Framework; |
@@ -90,7 +90,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles | |||
90 | /// </summary> | 90 | /// </summary> |
91 | /// <param name="remoteClient"></param> | 91 | /// <param name="remoteClient"></param> |
92 | /// <param name="avatarID"></param> | 92 | /// <param name="avatarID"></param> |
93 | public void RequestAvatarProperty(IClientAPI remoteClient, LLUUID avatarID) | 93 | public void RequestAvatarProperty(IClientAPI remoteClient, UUID avatarID) |
94 | { | 94 | { |
95 | // FIXME: finish adding fields such as url, masking, etc. | 95 | // FIXME: finish adding fields such as url, masking, etc. |
96 | UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID); | 96 | UserProfileData profile = m_scene.CommsManager.UserService.GetUserProfile(avatarID); |
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles | |||
104 | } | 104 | } |
105 | else | 105 | else |
106 | { | 106 | { |
107 | charterMember = Helpers.StringToField(profile.CustomType); | 107 | charterMember = Utils.StringToBytes(profile.CustomType); |
108 | } | 108 | } |
109 | 109 | ||
110 | remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, | 110 | remoteClient.SendAvatarProperties(profile.ID, profile.AboutText, |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs index 1f41a92..e3a9a45 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/AsterixVoice/AsteriskVoiceModule.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using log4net; | 32 | using log4net; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using Nwc.XmlRpc; | 34 | using Nwc.XmlRpc; |
@@ -125,7 +125,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice | |||
125 | 125 | ||
126 | #endregion | 126 | #endregion |
127 | 127 | ||
128 | public void OnRegisterCaps(LLUUID agentID, Caps caps) | 128 | public void OnRegisterCaps(UUID agentID, Caps caps) |
129 | { | 129 | { |
130 | m_log.DebugFormat("[ASTERISKVOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 130 | m_log.DebugFormat("[ASTERISKVOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); |
131 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 131 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
@@ -157,7 +157,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice | |||
157 | /// <param name="caps"></param> | 157 | /// <param name="caps"></param> |
158 | /// <returns></returns> | 158 | /// <returns></returns> |
159 | public string ParcelVoiceInfoRequest(string request, string path, string param, | 159 | public string ParcelVoiceInfoRequest(string request, string path, string param, |
160 | LLUUID agentID, Caps caps) | 160 | UUID agentID, Caps caps) |
161 | { | 161 | { |
162 | // we need to do: | 162 | // we need to do: |
163 | // - send channel_uri: as "sip:regionID@m_sipDomain" | 163 | // - send channel_uri: as "sip:regionID@m_sipDomain" |
@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice | |||
226 | /// <param name="caps"></param> | 226 | /// <param name="caps"></param> |
227 | /// <returns></returns> | 227 | /// <returns></returns> |
228 | public string ProvisionVoiceAccountRequest(string request, string path, string param, | 228 | public string ProvisionVoiceAccountRequest(string request, string path, string param, |
229 | LLUUID agentID, Caps caps) | 229 | UUID agentID, Caps caps) |
230 | { | 230 | { |
231 | // we need to | 231 | // we need to |
232 | // - get user data from UserProfileCacheService | 232 | // - get user data from UserProfileCacheService |
@@ -289,4 +289,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice | |||
289 | } | 289 | } |
290 | } | 290 | } |
291 | } | 291 | } |
292 | } \ No newline at end of file | 292 | } |
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs index c6852f7..bd89175 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Voice/SIPVoice/SIPVoiceModule.cs | |||
@@ -28,7 +28,7 @@ | |||
28 | using System; | 28 | using System; |
29 | using System.Collections; | 29 | using System.Collections; |
30 | using System.Reflection; | 30 | using System.Reflection; |
31 | using libsecondlife; | 31 | using OpenMetaverse; |
32 | using log4net; | 32 | using log4net; |
33 | using Nini.Config; | 33 | using Nini.Config; |
34 | using OpenSim.Framework; | 34 | using OpenSim.Framework; |
@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice | |||
98 | 98 | ||
99 | #endregion | 99 | #endregion |
100 | 100 | ||
101 | public void OnRegisterCaps(LLUUID agentID, Caps caps) | 101 | public void OnRegisterCaps(UUID agentID, Caps caps) |
102 | { | 102 | { |
103 | m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); | 103 | m_log.DebugFormat("[VOICE] OnRegisterCaps: agentID {0} caps {1}", agentID, caps); |
104 | string capsBase = "/CAPS/" + caps.CapsObjectPath; | 104 | string capsBase = "/CAPS/" + caps.CapsObjectPath; |
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice | |||
130 | /// <param name="caps"></param> | 130 | /// <param name="caps"></param> |
131 | /// <returns></returns> | 131 | /// <returns></returns> |
132 | public string ParcelVoiceInfoRequest(string request, string path, string param, | 132 | public string ParcelVoiceInfoRequest(string request, string path, string param, |
133 | LLUUID agentID, Caps caps) | 133 | UUID agentID, Caps caps) |
134 | { | 134 | { |
135 | try | 135 | try |
136 | { | 136 | { |
@@ -172,7 +172,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice | |||
172 | /// <param name="caps"></param> | 172 | /// <param name="caps"></param> |
173 | /// <returns></returns> | 173 | /// <returns></returns> |
174 | public string ProvisionVoiceAccountRequest(string request, string path, string param, | 174 | public string ProvisionVoiceAccountRequest(string request, string path, string param, |
175 | LLUUID agentID, Caps caps) | 175 | UUID agentID, Caps caps) |
176 | { | 176 | { |
177 | try | 177 | try |
178 | { | 178 | { |
@@ -199,4 +199,4 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice | |||
199 | return null; | 199 | return null; |
200 | } | 200 | } |
201 | } | 201 | } |
202 | } \ No newline at end of file | 202 | } |