aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Environment/Modules
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--OpenSim/Region/Environment/Modules/AssetDownloadModule.cs12
-rw-r--r--OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs20
-rw-r--r--OpenSim/Region/Environment/Modules/ChatModule.cs426
-rw-r--r--OpenSim/Region/Environment/Modules/DynamicTextureModule.cs312
-rw-r--r--OpenSim/Region/Environment/Modules/FriendsModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/GroupsModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/InstantMessageModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/InventoryModule.cs8
-rw-r--r--OpenSim/Region/Environment/Modules/TextureDownloadModule.cs16
-rw-r--r--OpenSim/Region/Environment/Modules/XferModule.cs22
10 files changed, 420 insertions, 420 deletions
diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
index 511b5f6..7d789f9 100644
--- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs
@@ -1,7 +1,7 @@
1using OpenSim.Framework.Interfaces; 1using OpenSim.Framework.Interfaces;
2using OpenSim.Region.Environment.Interfaces; 2using OpenSim.Region.Environment.Interfaces;
3using OpenSim.Region.Environment.Scenes; 3using OpenSim.Region.Environment.Scenes;
4 4
5namespace OpenSim.Region.Environment.Modules 5namespace OpenSim.Region.Environment.Modules
6{ 6{
7 public class AssetDownloadModule : IRegionModule 7 public class AssetDownloadModule : IRegionModule
@@ -9,7 +9,7 @@ namespace OpenSim.Region.Environment.Modules
9 private Scene m_scene; 9 private Scene m_scene;
10 10
11 public AssetDownloadModule() 11 public AssetDownloadModule()
12 { 12 {
13 } 13 }
14 14
15 public void Initialise(Scene scene) 15 public void Initialise(Scene scene)
@@ -19,7 +19,7 @@ namespace OpenSim.Region.Environment.Modules
19 } 19 }
20 20
21 public void PostInitialise() 21 public void PostInitialise()
22 { 22 {
23 } 23 }
24 24
25 public void CloseDown() 25 public void CloseDown()
diff --git a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs
index ea5f787..aaa9261 100644
--- a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs
+++ b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs
@@ -1,16 +1,16 @@
1using libsecondlife; 1using libsecondlife;
2using OpenSim.Framework.Interfaces; 2using OpenSim.Framework.Interfaces;
3using OpenSim.Region.Environment.Interfaces; 3using OpenSim.Region.Environment.Interfaces;
4using OpenSim.Region.Environment.Scenes; 4using OpenSim.Region.Environment.Scenes;
5 5
6namespace OpenSim.Region.Environment.Modules 6namespace OpenSim.Region.Environment.Modules
7{ 7{
8 public class AvatarProfilesModule : IRegionModule 8 public class AvatarProfilesModule : IRegionModule
9 { 9 {
10 private Scene m_scene; 10 private Scene m_scene;
11 11
12 public AvatarProfilesModule() 12 public AvatarProfilesModule()
13 { 13 {
14 } 14 }
15 15
16 public void Initialise(Scene scene) 16 public void Initialise(Scene scene)
@@ -20,11 +20,11 @@ namespace OpenSim.Region.Environment.Modules
20 } 20 }
21 21
22 public void PostInitialise() 22 public void PostInitialise()
23 { 23 {
24 } 24 }
25 25
26 public void CloseDown() 26 public void CloseDown()
27 { 27 {
28 } 28 }
29 29
30 public string GetName() 30 public string GetName()
@@ -58,7 +58,7 @@ namespace OpenSim.Region.Environment.Modules
58 string bornOn = "Before now"; 58 string bornOn = "Before now";
59 string flAbout = "First life? What is one of those? OpenSim is my life!"; 59 string flAbout = "First life? What is one of those? OpenSim is my life!";
60 LLUUID partner = new LLUUID("11111111-1111-0000-0000-000100bba000"); 60 LLUUID partner = new LLUUID("11111111-1111-0000-0000-000100bba000");
61 remoteClient.SendAvatarProperties(avatarID, about, bornOn, "", flAbout, 0, LLUUID.Zero, LLUUID.Zero, "", 61 remoteClient.SendAvatarProperties(avatarID, about, bornOn, "", flAbout, 0, LLUUID.Zero, LLUUID.Zero, "",
62 partner); 62 partner);
63 } 63 }
64 } 64 }
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs
index 1c7b806..2eac7d6 100644
--- a/OpenSim/Region/Environment/Modules/ChatModule.cs
+++ b/OpenSim/Region/Environment/Modules/ChatModule.cs
@@ -1,214 +1,214 @@
1using System; 1using System;
2using System.IO; 2using System.IO;
3using System.Net.Sockets; 3using System.Net.Sockets;
4using System.Threading; 4using System.Threading;
5using libsecondlife; 5using libsecondlife;
6using OpenSim.Framework.Interfaces; 6using OpenSim.Framework.Interfaces;
7using OpenSim.Framework.Utilities; 7using OpenSim.Framework.Utilities;
8using OpenSim.Region.Environment.Interfaces; 8using OpenSim.Region.Environment.Interfaces;
9using OpenSim.Region.Environment.Scenes; 9using OpenSim.Region.Environment.Scenes;
10 10
11namespace OpenSim.Region.Environment.Modules 11namespace OpenSim.Region.Environment.Modules
12{ 12{
13 public class ChatModule : IRegionModule, ISimChat 13 public class ChatModule : IRegionModule, ISimChat
14 { 14 {
15 private Scene m_scene; 15 private Scene m_scene;
16 16
17 private string m_server = "irc2.choopa.net"; 17 private string m_server = "irc2.choopa.net";
18 18
19 // private int m_port = 6668; 19 // private int m_port = 6668;
20 //private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; 20 //private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot";
21 private string m_nick = "OSimBot"; 21 private string m_nick = "OSimBot";
22 private string m_channel = "#opensim"; 22 private string m_channel = "#opensim";
23 23
24 // private NetworkStream m_stream; 24 // private NetworkStream m_stream;
25 private TcpClient m_irc; 25 private TcpClient m_irc;
26 private StreamWriter m_ircWriter; 26 private StreamWriter m_ircWriter;
27 private StreamReader m_ircReader; 27 private StreamReader m_ircReader;
28 28
29 // private Thread pingSender; 29 // private Thread pingSender;
30 // private Thread listener; 30 // private Thread listener;
31 31
32 private bool connected = false; 32 private bool connected = false;
33 33
34 public ChatModule() 34 public ChatModule()
35 { 35 {
36 m_nick = "OSimBot" + Util.RandomClass.Next(1, 99); 36 m_nick = "OSimBot" + Util.RandomClass.Next(1, 99);
37 m_irc = null; 37 m_irc = null;
38 m_ircWriter = null; 38 m_ircWriter = null;
39 m_ircReader = null; 39 m_ircReader = null;
40 } 40 }
41 41
42 public void Initialise(Scene scene) 42 public void Initialise(Scene scene)
43 { 43 {
44 m_scene = scene; 44 m_scene = scene;
45 m_scene.EventManager.OnNewClient += NewClient; 45 m_scene.EventManager.OnNewClient += NewClient;
46 46
47 m_scene.RegisterModuleInterface<ISimChat>(this); 47 m_scene.RegisterModuleInterface<ISimChat>(this);
48 } 48 }
49 49
50 public void PostInitialise() 50 public void PostInitialise()
51 { 51 {
52 /* 52 /*
53 try 53 try
54 { 54 {
55 m_irc = new TcpClient(m_server, m_port); 55 m_irc = new TcpClient(m_server, m_port);
56 m_stream = m_irc.GetStream(); 56 m_stream = m_irc.GetStream();
57 m_ircReader = new StreamReader(m_stream); 57 m_ircReader = new StreamReader(m_stream);
58 m_ircWriter = new StreamWriter(m_stream); 58 m_ircWriter = new StreamWriter(m_stream);
59 59
60 pingSender = new Thread(new ThreadStart(this.PingRun)); 60 pingSender = new Thread(new ThreadStart(this.PingRun));
61 pingSender.Start(); 61 pingSender.Start();
62 62
63 listener = new Thread(new ThreadStart(this.ListenerRun)); 63 listener = new Thread(new ThreadStart(this.ListenerRun));
64 listener.Start(); 64 listener.Start();
65 65
66 m_ircWriter.WriteLine(m_user); 66 m_ircWriter.WriteLine(m_user);
67 m_ircWriter.Flush(); 67 m_ircWriter.Flush();
68 m_ircWriter.WriteLine("NICK " + m_nick); 68 m_ircWriter.WriteLine("NICK " + m_nick);
69 m_ircWriter.Flush(); 69 m_ircWriter.Flush();
70 m_ircWriter.WriteLine("JOIN " + m_channel); 70 m_ircWriter.WriteLine("JOIN " + m_channel);
71 m_ircWriter.Flush(); 71 m_ircWriter.Flush();
72 connected = true; 72 connected = true;
73 } 73 }
74 catch (Exception e) 74 catch (Exception e)
75 { 75 {
76 Console.WriteLine(e.ToString()); 76 Console.WriteLine(e.ToString());
77 } 77 }
78 */ 78 */
79 } 79 }
80 80
81 public void CloseDown() 81 public void CloseDown()
82 { 82 {
83 m_ircWriter.Close(); 83 m_ircWriter.Close();
84 m_ircReader.Close(); 84 m_ircReader.Close();
85 m_irc.Close(); 85 m_irc.Close();
86 } 86 }
87 87
88 public string GetName() 88 public string GetName()
89 { 89 {
90 return "ChatModule"; 90 return "ChatModule";
91 } 91 }
92 92
93 public bool IsSharedModule() 93 public bool IsSharedModule()
94 { 94 {
95 return false; 95 return false;
96 } 96 }
97 97
98 public void NewClient(IClientAPI client) 98 public void NewClient(IClientAPI client)
99 { 99 {
100 client.OnChatFromViewer += SimChat; 100 client.OnChatFromViewer += SimChat;
101 } 101 }
102 102
103 public void PingRun() 103 public void PingRun()
104 { 104 {
105 while (true) 105 while (true)
106 { 106 {
107 m_ircWriter.WriteLine("PING :" + m_server); 107 m_ircWriter.WriteLine("PING :" + m_server);
108 m_ircWriter.Flush(); 108 m_ircWriter.Flush();
109 Thread.Sleep(15000); 109 Thread.Sleep(15000);
110 } 110 }
111 } 111 }
112 112
113 public void ListenerRun() 113 public void ListenerRun()
114 { 114 {
115 string inputLine; 115 string inputLine;
116 LLVector3 pos = new LLVector3(128, 128, 20); 116 LLVector3 pos = new LLVector3(128, 128, 20);
117 while (true) 117 while (true)
118 { 118 {
119 while ((inputLine = m_ircReader.ReadLine()) != null) 119 while ((inputLine = m_ircReader.ReadLine()) != null)
120 { 120 {
121 Console.WriteLine(inputLine); 121 Console.WriteLine(inputLine);
122 if (inputLine.Contains(m_channel)) 122 if (inputLine.Contains(m_channel))
123 { 123 {
124 string mess = inputLine.Substring(inputLine.IndexOf(m_channel)); 124 string mess = inputLine.Substring(inputLine.IndexOf(m_channel));
125 m_scene.Broadcast(delegate(IClientAPI client) 125 m_scene.Broadcast(delegate(IClientAPI client)
126 { 126 {
127 client.SendChatMessage( 127 client.SendChatMessage(
128 Helpers.StringToField(mess), 255, pos, "IRC:", 128 Helpers.StringToField(mess), 255, pos, "IRC:",
129 LLUUID.Zero); 129 LLUUID.Zero);
130 }); 130 });
131 } 131 }
132 } 132 }
133 } 133 }
134 } 134 }
135 135
136 public void SimChat(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName, 136 public void SimChat(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName,
137 LLUUID fromAgentID) 137 LLUUID fromAgentID)
138 { 138 {
139 ScenePresence avatar = null; 139 ScenePresence avatar = null;
140 avatar = m_scene.GetScenePresence(fromAgentID); 140 avatar = m_scene.GetScenePresence(fromAgentID);
141 if (avatar != null) 141 if (avatar != null)
142 { 142 {
143 fromPos = avatar.AbsolutePosition; 143 fromPos = avatar.AbsolutePosition;
144 fromName = avatar.Firstname + " " + avatar.Lastname; 144 fromName = avatar.Firstname + " " + avatar.Lastname;
145 avatar = null; 145 avatar = null;
146 } 146 }
147 147
148 if (connected) 148 if (connected)
149 { 149 {
150 m_ircWriter.WriteLine("PRIVMSG " + m_channel + " :" + "<" + fromName + ">: " + 150 m_ircWriter.WriteLine("PRIVMSG " + m_channel + " :" + "<" + fromName + ">: " +
151 Util.FieldToString(message)); 151 Util.FieldToString(message));
152 m_ircWriter.Flush(); 152 m_ircWriter.Flush();
153 } 153 }
154 154
155 if (channel == 0) 155 if (channel == 0)
156 { 156 {
157 m_scene.ForEachScenePresence(delegate(ScenePresence presence) 157 m_scene.ForEachScenePresence(delegate(ScenePresence presence)
158 { 158 {
159 int dis = -1000; 159 int dis = -1000;
160 160
161 //err ??? the following code seems to be request a scenePresence when it already has a ref to it 161 //err ??? the following code seems to be request a scenePresence when it already has a ref to it
162 avatar = m_scene.GetScenePresence(presence.ControllingClient.AgentId); 162 avatar = m_scene.GetScenePresence(presence.ControllingClient.AgentId);
163 if (avatar != null) 163 if (avatar != null)
164 { 164 {
165 dis = (int) avatar.AbsolutePosition.GetDistanceTo(fromPos); 165 dis = (int) avatar.AbsolutePosition.GetDistanceTo(fromPos);
166 } 166 }
167 167
168 switch (type) 168 switch (type)
169 { 169 {
170 case 0: // Whisper 170 case 0: // Whisper
171 if ((dis < 10) && (dis > -10)) 171 if ((dis < 10) && (dis > -10))
172 { 172 {
173 //should change so the message is sent through the avatar rather than direct to the ClientView 173 //should change so the message is sent through the avatar rather than direct to the ClientView
174 presence.ControllingClient.SendChatMessage(message, 174 presence.ControllingClient.SendChatMessage(message,
175 type, 175 type,
176 fromPos, 176 fromPos,
177 fromName, 177 fromName,
178 fromAgentID); 178 fromAgentID);
179 } 179 }
180 break; 180 break;
181 case 1: // Say 181 case 1: // Say
182 if ((dis < 30) && (dis > -30)) 182 if ((dis < 30) && (dis > -30))
183 { 183 {
184 //Console.WriteLine("sending chat"); 184 //Console.WriteLine("sending chat");
185 presence.ControllingClient.SendChatMessage(message, 185 presence.ControllingClient.SendChatMessage(message,
186 type, 186 type,
187 fromPos, 187 fromPos,
188 fromName, 188 fromName,
189 fromAgentID); 189 fromAgentID);
190 } 190 }
191 break; 191 break;
192 case 2: // Shout 192 case 2: // Shout
193 if ((dis < 100) && (dis > -100)) 193 if ((dis < 100) && (dis > -100))
194 { 194 {
195 presence.ControllingClient.SendChatMessage(message, 195 presence.ControllingClient.SendChatMessage(message,
196 type, 196 type,
197 fromPos, 197 fromPos,
198 fromName, 198 fromName,
199 fromAgentID); 199 fromAgentID);
200 } 200 }
201 break; 201 break;
202 202
203 case 0xff: // Broadcast 203 case 0xff: // Broadcast
204 presence.ControllingClient.SendChatMessage(message, type, 204 presence.ControllingClient.SendChatMessage(message, type,
205 fromPos, 205 fromPos,
206 fromName, 206 fromName,
207 fromAgentID); 207 fromAgentID);
208 break; 208 break;
209 } 209 }
210 }); 210 });
211 } 211 }
212 } 212 }
213 } 213 }
214} \ No newline at end of file 214} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
index 0fd03d3..5f8824c 100644
--- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
+++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs
@@ -1,157 +1,157 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using libsecondlife; 3using libsecondlife;
4using OpenSim.Framework.Types; 4using OpenSim.Framework.Types;
5using OpenSim.Framework.Utilities; 5using OpenSim.Framework.Utilities;
6using OpenSim.Region.Environment.Interfaces; 6using OpenSim.Region.Environment.Interfaces;
7using OpenSim.Region.Environment.Scenes; 7using OpenSim.Region.Environment.Scenes;
8 8
9namespace OpenSim.Region.Environment.Modules 9namespace OpenSim.Region.Environment.Modules
10{ 10{
11 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager 11 public class DynamicTextureModule : IRegionModule, IDynamicTextureManager
12 { 12 {
13 private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); 13 private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>();
14 14
15 private Dictionary<string, IDynamicTextureRender> RenderPlugins = 15 private Dictionary<string, IDynamicTextureRender> RenderPlugins =
16 new Dictionary<string, IDynamicTextureRender>(); 16 new Dictionary<string, IDynamicTextureRender>();
17 17
18 private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>(); 18 private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>();
19 19
20 public void Initialise(Scene scene) 20 public void Initialise(Scene scene)
21 { 21 {
22 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.SimUUID)) 22 if (!RegisteredScenes.ContainsKey(scene.RegionInfo.SimUUID))
23 { 23 {
24 RegisteredScenes.Add(scene.RegionInfo.SimUUID, scene); 24 RegisteredScenes.Add(scene.RegionInfo.SimUUID, scene);
25 scene.RegisterModuleInterface<IDynamicTextureManager>(this); 25 scene.RegisterModuleInterface<IDynamicTextureManager>(this);
26 } 26 }
27 } 27 }
28 28
29 public void PostInitialise() 29 public void PostInitialise()
30 { 30 {
31 } 31 }
32 32
33 public void CloseDown() 33 public void CloseDown()
34 { 34 {
35 } 35 }
36 36
37 public string GetName() 37 public string GetName()
38 { 38 {
39 return "DynamicTextureModule"; 39 return "DynamicTextureModule";
40 } 40 }
41 41
42 public bool IsSharedModule() 42 public bool IsSharedModule()
43 { 43 {
44 return true; 44 return true;
45 } 45 }
46 46
47 public void RegisterRender(string handleType, IDynamicTextureRender render) 47 public void RegisterRender(string handleType, IDynamicTextureRender render)
48 { 48 {
49 if (!RenderPlugins.ContainsKey(handleType)) 49 if (!RenderPlugins.ContainsKey(handleType))
50 { 50 {
51 RenderPlugins.Add(handleType, render); 51 RenderPlugins.Add(handleType, render);
52 } 52 }
53 } 53 }
54 54
55 public void ReturnData(LLUUID id, byte[] data) 55 public void ReturnData(LLUUID id, byte[] data)
56 { 56 {
57 if (Updaters.ContainsKey(id)) 57 if (Updaters.ContainsKey(id))
58 { 58 {
59 DynamicTextureUpdater updater = Updaters[id]; 59 DynamicTextureUpdater updater = Updaters[id];
60 if (RegisteredScenes.ContainsKey(updater.SimUUID)) 60 if (RegisteredScenes.ContainsKey(updater.SimUUID))
61 { 61 {
62 Scene scene = RegisteredScenes[updater.SimUUID]; 62 Scene scene = RegisteredScenes[updater.SimUUID];
63 updater.DataReceived(data, scene); 63 updater.DataReceived(data, scene);
64 } 64 }
65 } 65 }
66 } 66 }
67 67
68 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, 68 public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url,
69 string extraParams, int updateTimer) 69 string extraParams, int updateTimer)
70 { 70 {
71 Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); 71 Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType);
72 if (RenderPlugins.ContainsKey(contentType)) 72 if (RenderPlugins.ContainsKey(contentType))
73 { 73 {
74 DynamicTextureUpdater updater = new DynamicTextureUpdater(); 74 DynamicTextureUpdater updater = new DynamicTextureUpdater();
75 updater.SimUUID = simID; 75 updater.SimUUID = simID;
76 updater.PrimID = primID; 76 updater.PrimID = primID;
77 updater.ContentType = contentType; 77 updater.ContentType = contentType;
78 updater.Url = url; 78 updater.Url = url;
79 updater.UpdateTimer = updateTimer; 79 updater.UpdateTimer = updateTimer;
80 updater.UpdaterID = LLUUID.Random(); 80 updater.UpdaterID = LLUUID.Random();
81 updater.Params = extraParams; 81 updater.Params = extraParams;
82 82
83 if (!Updaters.ContainsKey(updater.UpdaterID)) 83 if (!Updaters.ContainsKey(updater.UpdaterID))
84 { 84 {
85 Updaters.Add(updater.UpdaterID, updater); 85 Updaters.Add(updater.UpdaterID, updater);
86 } 86 }
87 87
88 RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams); 88 RenderPlugins[contentType].AsyncConvertUrl(updater.UpdaterID, url, extraParams);
89 return updater.UpdaterID; 89 return updater.UpdaterID;
90 } 90 }
91 return LLUUID.Zero; 91 return LLUUID.Zero;
92 } 92 }
93 93
94 public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, 94 public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data,
95 string extraParams, int updateTimer) 95 string extraParams, int updateTimer)
96 { 96 {
97 if (RenderPlugins.ContainsKey(contentType)) 97 if (RenderPlugins.ContainsKey(contentType))
98 { 98 {
99 DynamicTextureUpdater updater = new DynamicTextureUpdater(); 99 DynamicTextureUpdater updater = new DynamicTextureUpdater();
100 updater.SimUUID = simID; 100 updater.SimUUID = simID;
101 updater.PrimID = primID; 101 updater.PrimID = primID;
102 updater.ContentType = contentType; 102 updater.ContentType = contentType;
103 updater.BodyData = data; 103 updater.BodyData = data;
104 updater.UpdateTimer = updateTimer; 104 updater.UpdateTimer = updateTimer;
105 updater.UpdaterID = LLUUID.Random(); 105 updater.UpdaterID = LLUUID.Random();
106 updater.Params = extraParams; 106 updater.Params = extraParams;
107 107
108 if (!Updaters.ContainsKey(updater.UpdaterID)) 108 if (!Updaters.ContainsKey(updater.UpdaterID))
109 { 109 {
110 Updaters.Add(updater.UpdaterID, updater); 110 Updaters.Add(updater.UpdaterID, updater);
111 } 111 }
112 112
113 RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams); 113 RenderPlugins[contentType].AsyncConvertData(updater.UpdaterID, data, extraParams);
114 return updater.UpdaterID; 114 return updater.UpdaterID;
115 } 115 }
116 return LLUUID.Zero; 116 return LLUUID.Zero;
117 } 117 }
118 118
119 public class DynamicTextureUpdater 119 public class DynamicTextureUpdater
120 { 120 {
121 public LLUUID SimUUID; 121 public LLUUID SimUUID;
122 public LLUUID UpdaterID; 122 public LLUUID UpdaterID;
123 public string ContentType; 123 public string ContentType;
124 public string Url; 124 public string Url;
125 public string BodyData; 125 public string BodyData;
126 public LLUUID PrimID; 126 public LLUUID PrimID;
127 public int UpdateTimer; 127 public int UpdateTimer;
128 public LLUUID LastAssetID; 128 public LLUUID LastAssetID;
129 public string Params; 129 public string Params;
130 130
131 public DynamicTextureUpdater() 131 public DynamicTextureUpdater()
132 { 132 {
133 LastAssetID = LLUUID.Zero; 133 LastAssetID = LLUUID.Zero;
134 UpdateTimer = 0; 134 UpdateTimer = 0;
135 BodyData = null; 135 BodyData = null;
136 } 136 }
137 137
138 public void DataReceived(byte[] data, Scene scene) 138 public void DataReceived(byte[] data, Scene scene)
139 { 139 {
140 //TODO delete the last asset(data), if it was a dynamic texture 140 //TODO delete the last asset(data), if it was a dynamic texture
141 141
142 AssetBase asset = new AssetBase(); 142 AssetBase asset = new AssetBase();
143 asset.FullID = LLUUID.Random(); 143 asset.FullID = LLUUID.Random();
144 asset.Data = data; 144 asset.Data = data;
145 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000); 145 asset.Name = "DynamicImage" + Util.RandomClass.Next(1, 10000);
146 asset.Type = 0; 146 asset.Type = 0;
147 scene.commsManager.AssetCache.AddAsset(asset); 147 scene.commsManager.AssetCache.AddAsset(asset);
148 148
149 LastAssetID = asset.FullID; 149 LastAssetID = asset.FullID;
150 150
151 SceneObjectPart part = scene.GetSceneObjectPart(PrimID); 151 SceneObjectPart part = scene.GetSceneObjectPart(PrimID);
152 part.Shape.TextureEntry = new LLObject.TextureEntry(asset.FullID).ToBytes(); 152 part.Shape.TextureEntry = new LLObject.TextureEntry(asset.FullID).ToBytes();
153 part.ScheduleFullUpdate(); 153 part.ScheduleFullUpdate();
154 } 154 }
155 } 155 }
156 } 156 }
157} \ No newline at end of file 157} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs
index c2a7291..767b4b0 100644
--- a/OpenSim/Region/Environment/Modules/FriendsModule.cs
+++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs
@@ -1,6 +1,6 @@
1using OpenSim.Region.Environment.Interfaces; 1using OpenSim.Region.Environment.Interfaces;
2using OpenSim.Region.Environment.Scenes; 2using OpenSim.Region.Environment.Scenes;
3 3
4namespace OpenSim.Region.Environment.Modules 4namespace OpenSim.Region.Environment.Modules
5{ 5{
6 public class FriendsModule : IRegionModule 6 public class FriendsModule : IRegionModule
@@ -13,7 +13,7 @@ namespace OpenSim.Region.Environment.Modules
13 } 13 }
14 14
15 public void PostInitialise() 15 public void PostInitialise()
16 { 16 {
17 } 17 }
18 18
19 public void CloseDown() 19 public void CloseDown()
diff --git a/OpenSim/Region/Environment/Modules/GroupsModule.cs b/OpenSim/Region/Environment/Modules/GroupsModule.cs
index dcef2c5..fa5804e 100644
--- a/OpenSim/Region/Environment/Modules/GroupsModule.cs
+++ b/OpenSim/Region/Environment/Modules/GroupsModule.cs
@@ -1,6 +1,6 @@
1using OpenSim.Region.Environment.Interfaces; 1using OpenSim.Region.Environment.Interfaces;
2using OpenSim.Region.Environment.Scenes; 2using OpenSim.Region.Environment.Scenes;
3 3
4namespace OpenSim.Region.Environment.Modules 4namespace OpenSim.Region.Environment.Modules
5{ 5{
6 public class GroupsModule : IRegionModule 6 public class GroupsModule : IRegionModule
@@ -13,7 +13,7 @@ namespace OpenSim.Region.Environment.Modules
13 } 13 }
14 14
15 public void PostInitialise() 15 public void PostInitialise()
16 { 16 {
17 } 17 }
18 18
19 public void CloseDown() 19 public void CloseDown()
diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
index 14f2b65..44cb3d5 100644
--- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
+++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs
@@ -1,6 +1,6 @@
1using OpenSim.Region.Environment.Interfaces; 1using OpenSim.Region.Environment.Interfaces;
2using OpenSim.Region.Environment.Scenes; 2using OpenSim.Region.Environment.Scenes;
3 3
4namespace OpenSim.Region.Environment.Modules 4namespace OpenSim.Region.Environment.Modules
5{ 5{
6 public class InstantMessageModule : IRegionModule 6 public class InstantMessageModule : IRegionModule
@@ -13,7 +13,7 @@ namespace OpenSim.Region.Environment.Modules
13 } 13 }
14 14
15 public void PostInitialise() 15 public void PostInitialise()
16 { 16 {
17 } 17 }
18 18
19 public void CloseDown() 19 public void CloseDown()
diff --git a/OpenSim/Region/Environment/Modules/InventoryModule.cs b/OpenSim/Region/Environment/Modules/InventoryModule.cs
index 40bd37e..527731d 100644
--- a/OpenSim/Region/Environment/Modules/InventoryModule.cs
+++ b/OpenSim/Region/Environment/Modules/InventoryModule.cs
@@ -1,6 +1,6 @@
1using OpenSim.Region.Environment.Interfaces; 1using OpenSim.Region.Environment.Interfaces;
2using OpenSim.Region.Environment.Scenes; 2using OpenSim.Region.Environment.Scenes;
3 3
4namespace OpenSim.Region.Environment.Modules 4namespace OpenSim.Region.Environment.Modules
5{ 5{
6 public class InventoryModule : IRegionModule 6 public class InventoryModule : IRegionModule
@@ -13,7 +13,7 @@ namespace OpenSim.Region.Environment.Modules
13 } 13 }
14 14
15 public void PostInitialise() 15 public void PostInitialise()
16 { 16 {
17 } 17 }
18 18
19 public void CloseDown() 19 public void CloseDown()
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
index f107d77..38c7d9b 100644
--- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
+++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs
@@ -1,8 +1,8 @@
1using libsecondlife; 1using libsecondlife;
2using OpenSim.Framework.Interfaces; 2using OpenSim.Framework.Interfaces;
3using OpenSim.Region.Environment.Interfaces; 3using OpenSim.Region.Environment.Interfaces;
4using OpenSim.Region.Environment.Scenes; 4using OpenSim.Region.Environment.Scenes;
5 5
6namespace OpenSim.Region.Environment.Modules 6namespace OpenSim.Region.Environment.Modules
7{ 7{
8 public class TextureDownloadModule : IRegionModule 8 public class TextureDownloadModule : IRegionModule
@@ -10,7 +10,7 @@ namespace OpenSim.Region.Environment.Modules
10 private Scene m_scene; 10 private Scene m_scene;
11 11
12 public TextureDownloadModule() 12 public TextureDownloadModule()
13 { 13 {
14 } 14 }
15 15
16 public void Initialise(Scene scene) 16 public void Initialise(Scene scene)
@@ -20,7 +20,7 @@ namespace OpenSim.Region.Environment.Modules
20 } 20 }
21 21
22 public void PostInitialise() 22 public void PostInitialise()
23 { 23 {
24 } 24 }
25 25
26 public void CloseDown() 26 public void CloseDown()
@@ -42,7 +42,7 @@ namespace OpenSim.Region.Environment.Modules
42 } 42 }
43 43
44 public void TextureAssetCallback(LLUUID texture, byte[] data) 44 public void TextureAssetCallback(LLUUID texture, byte[] data)
45 { 45 {
46 } 46 }
47 } 47 }
48} \ No newline at end of file 48} \ No newline at end of file
diff --git a/OpenSim/Region/Environment/Modules/XferModule.cs b/OpenSim/Region/Environment/Modules/XferModule.cs
index 7f8c5c1..9f93c1e 100644
--- a/OpenSim/Region/Environment/Modules/XferModule.cs
+++ b/OpenSim/Region/Environment/Modules/XferModule.cs
@@ -1,10 +1,10 @@
1using System; 1using System;
2using System.Collections.Generic; 2using System.Collections.Generic;
3using libsecondlife; 3using libsecondlife;
4using OpenSim.Framework.Interfaces; 4using OpenSim.Framework.Interfaces;
5using OpenSim.Region.Environment.Interfaces; 5using OpenSim.Region.Environment.Interfaces;
6using OpenSim.Region.Environment.Scenes; 6using OpenSim.Region.Environment.Scenes;
7 7
8namespace OpenSim.Region.Environment.Modules 8namespace OpenSim.Region.Environment.Modules
9{ 9{
10 public class XferModule : IRegionModule, IXfer 10 public class XferModule : IRegionModule, IXfer
@@ -15,7 +15,7 @@ namespace OpenSim.Region.Environment.Modules
15 private Scene m_scene; 15 private Scene m_scene;
16 16
17 public XferModule() 17 public XferModule()
18 { 18 {
19 } 19 }
20 20
21 public void Initialise(Scene scene) 21 public void Initialise(Scene scene)
@@ -27,11 +27,11 @@ namespace OpenSim.Region.Environment.Modules
27 } 27 }
28 28
29 public void PostInitialise() 29 public void PostInitialise()
30 { 30 {
31 } 31 }
32 32
33 public void CloseDown() 33 public void CloseDown()
34 { 34 {
35 } 35 }
36 36
37 public string GetName() 37 public string GetName()
@@ -119,7 +119,7 @@ namespace OpenSim.Region.Environment.Modules
119 } 119 }
120 120
121 public XferDownLoad() 121 public XferDownLoad()
122 { 122 {
123 } 123 }
124 124
125 public void StartSend() 125 public void StartSend()