diff options
author | lbsa71 | 2007-09-19 00:30:55 +0000 |
---|---|---|
committer | lbsa71 | 2007-09-19 00:30:55 +0000 |
commit | 8f0b03597b0bc8ea6873af9a55495407fae1ec56 (patch) | |
tree | f9f4de38379aebf2223ad4cb10a3d9ebcfa52a4f /OpenSim/Region/Environment/Modules | |
parent | * Moved SendLogoutPacket back to IClientAPI. (diff) | |
download | opensim-SC-8f0b03597b0bc8ea6873af9a55495407fae1ec56.zip opensim-SC-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.gz opensim-SC-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.bz2 opensim-SC-8f0b03597b0bc8ea6873af9a55495407fae1ec56.tar.xz |
* Modernized ScriptManager to new interface-based module calls.
* 'remove redundant this qualifier' ftw
Diffstat (limited to '')
13 files changed, 126 insertions, 196 deletions
diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs index 7a53f6f..511b5f6 100644 --- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs | |||
@@ -1,12 +1,7 @@ | |||
1 | using System; | 1 | using OpenSim.Framework.Interfaces; |
2 | using System.Collections.Generic; | 2 | using OpenSim.Region.Environment.Interfaces; |
3 | using System.Text; | 3 | using OpenSim.Region.Environment.Scenes; |
4 | using libsecondlife; | 4 | |
5 | using OpenSim.Framework.Interfaces; | ||
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | |||
9 | |||
10 | namespace OpenSim.Region.Environment.Modules | 5 | namespace OpenSim.Region.Environment.Modules |
11 | { | 6 | { |
12 | public class AssetDownloadModule : IRegionModule | 7 | public class AssetDownloadModule : IRegionModule |
@@ -14,8 +9,7 @@ namespace OpenSim.Region.Environment.Modules | |||
14 | private Scene m_scene; | 9 | private Scene m_scene; |
15 | 10 | ||
16 | public AssetDownloadModule() | 11 | public AssetDownloadModule() |
17 | { | 12 | { |
18 | |||
19 | } | 13 | } |
20 | 14 | ||
21 | public void Initialise(Scene scene) | 15 | public void Initialise(Scene scene) |
@@ -25,8 +19,7 @@ namespace OpenSim.Region.Environment.Modules | |||
25 | } | 19 | } |
26 | 20 | ||
27 | public void PostInitialise() | 21 | public void PostInitialise() |
28 | { | 22 | { |
29 | |||
30 | } | 23 | } |
31 | 24 | ||
32 | public void CloseDown() | 25 | public void CloseDown() |
@@ -47,4 +40,4 @@ namespace OpenSim.Region.Environment.Modules | |||
47 | { | 40 | { |
48 | } | 41 | } |
49 | } | 42 | } |
50 | } | 43 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs index c349888..ea5f787 100644 --- a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs | |||
@@ -1,21 +1,16 @@ | |||
1 | using System; | 1 | using libsecondlife; |
2 | using System.Collections.Generic; | 2 | using OpenSim.Framework.Interfaces; |
3 | using System.Text; | 3 | using OpenSim.Region.Environment.Interfaces; |
4 | using libsecondlife; | 4 | using OpenSim.Region.Environment.Scenes; |
5 | using OpenSim.Framework.Interfaces; | 5 | |
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | |||
9 | namespace OpenSim.Region.Environment.Modules | 6 | namespace OpenSim.Region.Environment.Modules |
10 | { | 7 | { |
11 | public class AvatarProfilesModule :IRegionModule | 8 | public class AvatarProfilesModule : IRegionModule |
12 | { | 9 | { |
13 | |||
14 | private Scene m_scene; | 10 | private Scene m_scene; |
15 | 11 | ||
16 | public AvatarProfilesModule() | 12 | public AvatarProfilesModule() |
17 | { | 13 | { |
18 | |||
19 | } | 14 | } |
20 | 15 | ||
21 | public void Initialise(Scene scene) | 16 | public void Initialise(Scene scene) |
@@ -25,13 +20,11 @@ namespace OpenSim.Region.Environment.Modules | |||
25 | } | 20 | } |
26 | 21 | ||
27 | public void PostInitialise() | 22 | public void PostInitialise() |
28 | { | 23 | { |
29 | |||
30 | } | 24 | } |
31 | 25 | ||
32 | public void CloseDown() | 26 | public void CloseDown() |
33 | { | 27 | { |
34 | |||
35 | } | 28 | } |
36 | 29 | ||
37 | public string GetName() | 30 | public string GetName() |
@@ -65,7 +58,8 @@ namespace OpenSim.Region.Environment.Modules | |||
65 | string bornOn = "Before now"; | 58 | string bornOn = "Before now"; |
66 | 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!"; |
67 | LLUUID partner = new LLUUID("11111111-1111-0000-0000-000100bba000"); | 60 | LLUUID partner = new LLUUID("11111111-1111-0000-0000-000100bba000"); |
68 | remoteClient.SendAvatarProperties(avatarID, about, bornOn, "", flAbout, 0, LLUUID.Zero, LLUUID.Zero, "", partner); | 61 | remoteClient.SendAvatarProperties(avatarID, about, bornOn, "", flAbout, 0, LLUUID.Zero, LLUUID.Zero, "", |
62 | partner); | ||
69 | } | 63 | } |
70 | } | 64 | } |
71 | } | 65 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 8d3a553..468a5b7 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs | |||
@@ -1,17 +1,13 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.IO; |
3 | using System.Text; | 3 | using System.Net.Sockets; |
4 | using System.Net; | 4 | using System.Threading; |
5 | using System.Net.Sockets; | 5 | using libsecondlife; |
6 | using System.Threading; | 6 | using OpenSim.Framework.Interfaces; |
7 | using System.IO; | 7 | using OpenSim.Framework.Utilities; |
8 | using libsecondlife; | 8 | using OpenSim.Region.Environment.Interfaces; |
9 | using OpenSim.Region.Environment.Scenes; | 9 | using OpenSim.Region.Environment.Scenes; |
10 | using OpenSim.Region.Environment.Interfaces; | 10 | |
11 | using OpenSim.Framework.Interfaces; | ||
12 | using OpenSim.Framework.Utilities; | ||
13 | using OpenSim.Framework.Console; | ||
14 | |||
15 | namespace OpenSim.Region.Environment.Modules | 11 | namespace OpenSim.Region.Environment.Modules |
16 | { | 12 | { |
17 | public class ChatModule : IRegionModule, ISimChat | 13 | public class ChatModule : IRegionModule, ISimChat |
@@ -20,18 +16,18 @@ namespace OpenSim.Region.Environment.Modules | |||
20 | 16 | ||
21 | private string m_server = "irc2.choopa.net"; | 17 | private string m_server = "irc2.choopa.net"; |
22 | 18 | ||
23 | // private int m_port = 6668; | 19 | // private int m_port = 6668; |
24 | //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"; |
25 | private string m_nick = "OSimBot"; | 21 | private string m_nick = "OSimBot"; |
26 | private string m_channel = "#opensim"; | 22 | private string m_channel = "#opensim"; |
27 | 23 | ||
28 | // private NetworkStream m_stream; | 24 | // private NetworkStream m_stream; |
29 | private TcpClient m_irc; | 25 | private TcpClient m_irc; |
30 | private StreamWriter m_ircWriter; | 26 | private StreamWriter m_ircWriter; |
31 | private StreamReader m_ircReader; | 27 | private StreamReader m_ircReader; |
32 | 28 | ||
33 | // private Thread pingSender; | 29 | // private Thread pingSender; |
34 | // private Thread listener; | 30 | // private Thread listener; |
35 | 31 | ||
36 | private bool connected = false; | 32 | private bool connected = false; |
37 | 33 | ||
@@ -127,16 +123,18 @@ namespace OpenSim.Region.Environment.Modules | |||
127 | { | 123 | { |
128 | string mess = inputLine.Substring(inputLine.IndexOf(m_channel)); | 124 | string mess = inputLine.Substring(inputLine.IndexOf(m_channel)); |
129 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) | 125 | m_scene.ForEachScenePresence(delegate(ScenePresence presence) |
130 | { | 126 | { |
131 | presence.ControllingClient.SendChatMessage(Helpers.StringToField(mess), 255, pos, "IRC:", | 127 | presence.ControllingClient.SendChatMessage( |
132 | LLUUID.Zero); | 128 | Helpers.StringToField(mess), 255, pos, "IRC:", |
133 | }); | 129 | LLUUID.Zero); |
130 | }); | ||
134 | } | 131 | } |
135 | } | 132 | } |
136 | } | 133 | } |
137 | } | 134 | } |
138 | 135 | ||
139 | public void SimChat(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName, LLUUID fromAgentID) | 136 | public void SimChat(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName, |
137 | LLUUID fromAgentID) | ||
140 | { | 138 | { |
141 | ScenePresence avatar = null; | 139 | ScenePresence avatar = null; |
142 | avatar = m_scene.RequestAvatar(fromAgentID); | 140 | avatar = m_scene.RequestAvatar(fromAgentID); |
@@ -213,4 +211,4 @@ namespace OpenSim.Region.Environment.Modules | |||
213 | } | 211 | } |
214 | } | 212 | } |
215 | } | 213 | } |
216 | } | 214 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs index bbd9810..3f737e1 100644 --- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs | |||
@@ -1,23 +1,20 @@ | |||
1 | using System.Text; | 1 | using System; |
2 | using System.Net; | 2 | using System.Collections.Generic; |
3 | using System.Net.Sockets; | 3 | using libsecondlife; |
4 | using System.Threading; | 4 | using OpenSim.Framework.Types; |
5 | using System.IO; | 5 | using OpenSim.Framework.Utilities; |
6 | using System.Collections.Generic; | 6 | using OpenSim.Region.Environment.Interfaces; |
7 | using libsecondlife; | 7 | using OpenSim.Region.Environment.Scenes; |
8 | using OpenSim.Region.Environment.Scenes; | 8 | |
9 | using OpenSim.Region.Environment.Interfaces; | ||
10 | using OpenSim.Framework.Interfaces; | ||
11 | using OpenSim.Framework.Utilities; | ||
12 | using OpenSim.Framework.Console; | ||
13 | using OpenSim.Framework.Types; | ||
14 | |||
15 | namespace OpenSim.Region.Environment.Modules | 9 | namespace OpenSim.Region.Environment.Modules |
16 | { | 10 | { |
17 | public class DynamicTextureModule :IRegionModule, IDynamicTextureManager | 11 | public class DynamicTextureModule : IRegionModule, IDynamicTextureManager |
18 | { | 12 | { |
19 | private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); | 13 | private Dictionary<LLUUID, Scene> RegisteredScenes = new Dictionary<LLUUID, Scene>(); |
20 | private Dictionary<string, IDynamicTextureRender> RenderPlugins= new Dictionary<string, IDynamicTextureRender>(); | 14 | |
15 | private Dictionary<string, IDynamicTextureRender> RenderPlugins = | ||
16 | new Dictionary<string, IDynamicTextureRender>(); | ||
17 | |||
21 | private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>(); | 18 | private Dictionary<LLUUID, DynamicTextureUpdater> Updaters = new Dictionary<LLUUID, DynamicTextureUpdater>(); |
22 | 19 | ||
23 | public void Initialise(Scene scene) | 20 | public void Initialise(Scene scene) |
@@ -30,8 +27,7 @@ namespace OpenSim.Region.Environment.Modules | |||
30 | } | 27 | } |
31 | 28 | ||
32 | public void PostInitialise() | 29 | public void PostInitialise() |
33 | { | 30 | { |
34 | |||
35 | } | 31 | } |
36 | 32 | ||
37 | public void CloseDown() | 33 | public void CloseDown() |
@@ -69,10 +65,11 @@ namespace OpenSim.Region.Environment.Modules | |||
69 | } | 65 | } |
70 | } | 66 | } |
71 | 67 | ||
72 | public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, string extraParams, int updateTimer) | 68 | public LLUUID AddDynamicTextureURL(LLUUID simID, LLUUID primID, string contentType, string url, |
69 | string extraParams, int updateTimer) | ||
73 | { | 70 | { |
74 | System.Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); | 71 | Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); |
75 | if (this.RenderPlugins.ContainsKey(contentType)) | 72 | if (RenderPlugins.ContainsKey(contentType)) |
76 | { | 73 | { |
77 | DynamicTextureUpdater updater = new DynamicTextureUpdater(); | 74 | DynamicTextureUpdater updater = new DynamicTextureUpdater(); |
78 | updater.SimUUID = simID; | 75 | updater.SimUUID = simID; |
@@ -83,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules | |||
83 | updater.UpdaterID = LLUUID.Random(); | 80 | updater.UpdaterID = LLUUID.Random(); |
84 | updater.Params = extraParams; | 81 | updater.Params = extraParams; |
85 | 82 | ||
86 | if (!this.Updaters.ContainsKey(updater.UpdaterID)) | 83 | if (!Updaters.ContainsKey(updater.UpdaterID)) |
87 | { | 84 | { |
88 | Updaters.Add(updater.UpdaterID, updater); | 85 | Updaters.Add(updater.UpdaterID, updater); |
89 | } | 86 | } |
@@ -94,9 +91,10 @@ namespace OpenSim.Region.Environment.Modules | |||
94 | return LLUUID.Zero; | 91 | return LLUUID.Zero; |
95 | } | 92 | } |
96 | 93 | ||
97 | public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, string extraParams, int updateTimer) | 94 | public LLUUID AddDynamicTextureData(LLUUID simID, LLUUID primID, string contentType, string data, |
95 | string extraParams, int updateTimer) | ||
98 | { | 96 | { |
99 | if (this.RenderPlugins.ContainsKey(contentType)) | 97 | if (RenderPlugins.ContainsKey(contentType)) |
100 | { | 98 | { |
101 | DynamicTextureUpdater updater = new DynamicTextureUpdater(); | 99 | DynamicTextureUpdater updater = new DynamicTextureUpdater(); |
102 | updater.SimUUID = simID; | 100 | updater.SimUUID = simID; |
@@ -107,7 +105,7 @@ namespace OpenSim.Region.Environment.Modules | |||
107 | updater.UpdaterID = LLUUID.Random(); | 105 | updater.UpdaterID = LLUUID.Random(); |
108 | updater.Params = extraParams; | 106 | updater.Params = extraParams; |
109 | 107 | ||
110 | if (!this.Updaters.ContainsKey(updater.UpdaterID)) | 108 | if (!Updaters.ContainsKey(updater.UpdaterID)) |
111 | { | 109 | { |
112 | Updaters.Add(updater.UpdaterID, updater); | 110 | Updaters.Add(updater.UpdaterID, updater); |
113 | } | 111 | } |
@@ -140,7 +138,7 @@ namespace OpenSim.Region.Environment.Modules | |||
140 | public void DataReceived(byte[] data, Scene scene) | 138 | public void DataReceived(byte[] data, Scene scene) |
141 | { | 139 | { |
142 | //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 |
143 | 141 | ||
144 | AssetBase asset = new AssetBase(); | 142 | AssetBase asset = new AssetBase(); |
145 | asset.FullID = LLUUID.Random(); | 143 | asset.FullID = LLUUID.Random(); |
146 | asset.Data = data; | 144 | asset.Data = data; |
@@ -148,7 +146,7 @@ namespace OpenSim.Region.Environment.Modules | |||
148 | asset.Type = 0; | 146 | asset.Type = 0; |
149 | scene.commsManager.AssetCache.AddAsset(asset); | 147 | scene.commsManager.AssetCache.AddAsset(asset); |
150 | 148 | ||
151 | this.LastAssetID = asset.FullID; | 149 | LastAssetID = asset.FullID; |
152 | 150 | ||
153 | SceneObjectPart part = scene.GetSceneObjectPart(PrimID); | 151 | SceneObjectPart part = scene.GetSceneObjectPart(PrimID); |
154 | part.Shape.TextureEntry = new LLObject.TextureEntry(asset.FullID).ToBytes(); | 152 | part.Shape.TextureEntry = new LLObject.TextureEntry(asset.FullID).ToBytes(); |
@@ -156,4 +154,4 @@ namespace OpenSim.Region.Environment.Modules | |||
156 | } | 154 | } |
157 | } | 155 | } |
158 | } | 156 | } |
159 | } | 157 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/EmailModule.cs b/OpenSim/Region/Environment/Modules/EmailModule.cs index fff9539..7a61373 100644 --- a/OpenSim/Region/Environment/Modules/EmailModule.cs +++ b/OpenSim/Region/Environment/Modules/EmailModule.cs | |||
@@ -1,10 +1,6 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Region.Environment.Modules | 1 | namespace OpenSim.Region.Environment.Modules |
6 | { | 2 | { |
7 | class EmailModule | 3 | internal class EmailModule |
8 | { | 4 | { |
9 | } | 5 | } |
10 | } | 6 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index 411b838..c2a7291 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs | |||
@@ -1,12 +1,6 @@ | |||
1 | using System; | 1 | using OpenSim.Region.Environment.Interfaces; |
2 | using System.Collections.Generic; | 2 | using OpenSim.Region.Environment.Scenes; |
3 | using System.Text; | 3 | |
4 | using libsecondlife; | ||
5 | using OpenSim.Framework.Interfaces; | ||
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | |||
9 | |||
10 | namespace OpenSim.Region.Environment.Modules | 4 | namespace OpenSim.Region.Environment.Modules |
11 | { | 5 | { |
12 | public class FriendsModule : IRegionModule | 6 | public class FriendsModule : IRegionModule |
@@ -19,8 +13,7 @@ namespace OpenSim.Region.Environment.Modules | |||
19 | } | 13 | } |
20 | 14 | ||
21 | public void PostInitialise() | 15 | public void PostInitialise() |
22 | { | 16 | { |
23 | |||
24 | } | 17 | } |
25 | 18 | ||
26 | public void CloseDown() | 19 | public void CloseDown() |
@@ -37,4 +30,4 @@ namespace OpenSim.Region.Environment.Modules | |||
37 | return false; | 30 | return false; |
38 | } | 31 | } |
39 | } | 32 | } |
40 | } | 33 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/GroupsModule.cs b/OpenSim/Region/Environment/Modules/GroupsModule.cs index 9ed0e96..dcef2c5 100644 --- a/OpenSim/Region/Environment/Modules/GroupsModule.cs +++ b/OpenSim/Region/Environment/Modules/GroupsModule.cs | |||
@@ -1,11 +1,6 @@ | |||
1 | using System; | 1 | using OpenSim.Region.Environment.Interfaces; |
2 | using System.Collections.Generic; | 2 | using OpenSim.Region.Environment.Scenes; |
3 | using System.Text; | 3 | |
4 | using libsecondlife; | ||
5 | using OpenSim.Framework.Interfaces; | ||
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | |||
9 | namespace OpenSim.Region.Environment.Modules | 4 | namespace OpenSim.Region.Environment.Modules |
10 | { | 5 | { |
11 | public class GroupsModule : IRegionModule | 6 | public class GroupsModule : IRegionModule |
@@ -18,8 +13,7 @@ namespace OpenSim.Region.Environment.Modules | |||
18 | } | 13 | } |
19 | 14 | ||
20 | public void PostInitialise() | 15 | public void PostInitialise() |
21 | { | 16 | { |
22 | |||
23 | } | 17 | } |
24 | 18 | ||
25 | public void CloseDown() | 19 | public void CloseDown() |
@@ -36,5 +30,4 @@ namespace OpenSim.Region.Environment.Modules | |||
36 | return false; | 30 | return false; |
37 | } | 31 | } |
38 | } | 32 | } |
39 | } | 33 | } \ No newline at end of file |
40 | |||
diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index 25c118a..14f2b65 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs | |||
@@ -1,15 +1,9 @@ | |||
1 | using System; | 1 | using OpenSim.Region.Environment.Interfaces; |
2 | using System.Collections.Generic; | 2 | using OpenSim.Region.Environment.Scenes; |
3 | using System.Text; | 3 | |
4 | using libsecondlife; | ||
5 | using OpenSim.Framework.Interfaces; | ||
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | |||
9 | |||
10 | namespace OpenSim.Region.Environment.Modules | 4 | namespace OpenSim.Region.Environment.Modules |
11 | { | 5 | { |
12 | public class InstantMessageModule :IRegionModule | 6 | public class InstantMessageModule : IRegionModule |
13 | { | 7 | { |
14 | private Scene m_scene; | 8 | private Scene m_scene; |
15 | 9 | ||
@@ -19,8 +13,7 @@ namespace OpenSim.Region.Environment.Modules | |||
19 | } | 13 | } |
20 | 14 | ||
21 | public void PostInitialise() | 15 | public void PostInitialise() |
22 | { | 16 | { |
23 | |||
24 | } | 17 | } |
25 | 18 | ||
26 | public void CloseDown() | 19 | public void CloseDown() |
@@ -37,4 +30,4 @@ namespace OpenSim.Region.Environment.Modules | |||
37 | return false; | 30 | return false; |
38 | } | 31 | } |
39 | } | 32 | } |
40 | } | 33 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/InventoryModule.cs b/OpenSim/Region/Environment/Modules/InventoryModule.cs index bfcb7d7..40bd37e 100644 --- a/OpenSim/Region/Environment/Modules/InventoryModule.cs +++ b/OpenSim/Region/Environment/Modules/InventoryModule.cs | |||
@@ -1,15 +1,9 @@ | |||
1 | using System; | 1 | using OpenSim.Region.Environment.Interfaces; |
2 | using System.Collections.Generic; | 2 | using OpenSim.Region.Environment.Scenes; |
3 | using System.Text; | 3 | |
4 | using libsecondlife; | ||
5 | using OpenSim.Framework.Interfaces; | ||
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | |||
9 | |||
10 | namespace OpenSim.Region.Environment.Modules | 4 | namespace OpenSim.Region.Environment.Modules |
11 | { | 5 | { |
12 | public class InventoryModule :IRegionModule | 6 | public class InventoryModule : IRegionModule |
13 | { | 7 | { |
14 | private Scene m_scene; | 8 | private Scene m_scene; |
15 | 9 | ||
@@ -19,8 +13,7 @@ namespace OpenSim.Region.Environment.Modules | |||
19 | } | 13 | } |
20 | 14 | ||
21 | public void PostInitialise() | 15 | public void PostInitialise() |
22 | { | 16 | { |
23 | |||
24 | } | 17 | } |
25 | 18 | ||
26 | public void CloseDown() | 19 | public void CloseDown() |
@@ -37,4 +30,4 @@ namespace OpenSim.Region.Environment.Modules | |||
37 | return false; | 30 | return false; |
38 | } | 31 | } |
39 | } | 32 | } |
40 | } | 33 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs index e47cc9e..1e84a59 100644 --- a/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs +++ b/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs | |||
@@ -1,10 +1,6 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Region.Environment.Modules | 1 | namespace OpenSim.Region.Environment.Modules |
6 | { | 2 | { |
7 | class ScriptsHttpRequests | 3 | internal class ScriptsHttpRequests |
8 | { | 4 | { |
9 | } | 5 | } |
10 | } | 6 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/TeleportModule.cs b/OpenSim/Region/Environment/Modules/TeleportModule.cs index 1c01b27..f331a9c 100644 --- a/OpenSim/Region/Environment/Modules/TeleportModule.cs +++ b/OpenSim/Region/Environment/Modules/TeleportModule.cs | |||
@@ -1,10 +1,6 @@ | |||
1 | using System; | ||
2 | using System.Collections.Generic; | ||
3 | using System.Text; | ||
4 | |||
5 | namespace OpenSim.Region.Environment.Modules | 1 | namespace OpenSim.Region.Environment.Modules |
6 | { | 2 | { |
7 | class TeleportModule | 3 | internal class TeleportModule |
8 | { | 4 | { |
9 | } | 5 | } |
10 | } | 6 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index 59c0839..f107d77 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs | |||
@@ -1,20 +1,16 @@ | |||
1 | using System; | 1 | using libsecondlife; |
2 | using System.Collections.Generic; | 2 | using OpenSim.Framework.Interfaces; |
3 | using System.Text; | 3 | using OpenSim.Region.Environment.Interfaces; |
4 | using libsecondlife; | 4 | using OpenSim.Region.Environment.Scenes; |
5 | using OpenSim.Framework.Interfaces; | 5 | |
6 | using OpenSim.Region.Environment.Scenes; | ||
7 | using OpenSim.Region.Environment.Interfaces; | ||
8 | |||
9 | namespace OpenSim.Region.Environment.Modules | 6 | namespace OpenSim.Region.Environment.Modules |
10 | { | 7 | { |
11 | public class TextureDownloadModule :IRegionModule | 8 | public class TextureDownloadModule : IRegionModule |
12 | { | 9 | { |
13 | private Scene m_scene; | 10 | private Scene m_scene; |
14 | 11 | ||
15 | public TextureDownloadModule() | 12 | public TextureDownloadModule() |
16 | { | 13 | { |
17 | |||
18 | } | 14 | } |
19 | 15 | ||
20 | public void Initialise(Scene scene) | 16 | public void Initialise(Scene scene) |
@@ -24,8 +20,7 @@ namespace OpenSim.Region.Environment.Modules | |||
24 | } | 20 | } |
25 | 21 | ||
26 | public void PostInitialise() | 22 | public void PostInitialise() |
27 | { | 23 | { |
28 | |||
29 | } | 24 | } |
30 | 25 | ||
31 | public void CloseDown() | 26 | public void CloseDown() |
@@ -47,8 +42,7 @@ namespace OpenSim.Region.Environment.Modules | |||
47 | } | 42 | } |
48 | 43 | ||
49 | public void TextureAssetCallback(LLUUID texture, byte[] data) | 44 | public void TextureAssetCallback(LLUUID texture, byte[] data) |
50 | { | 45 | { |
51 | |||
52 | } | 46 | } |
53 | } | 47 | } |
54 | } | 48 | } \ No newline at end of file |
diff --git a/OpenSim/Region/Environment/Modules/XferModule.cs b/OpenSim/Region/Environment/Modules/XferModule.cs index 216d10a..7f8c5c1 100644 --- a/OpenSim/Region/Environment/Modules/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/XferModule.cs | |||
@@ -1,13 +1,10 @@ | |||
1 | using System; | 1 | using System; |
2 | using System.Collections.Generic; | 2 | using System.Collections.Generic; |
3 | using System.Text; | 3 | using libsecondlife; |
4 | 4 | using OpenSim.Framework.Interfaces; | |
5 | using libsecondlife; | 5 | using OpenSim.Region.Environment.Interfaces; |
6 | using OpenSim.Framework.Interfaces; | 6 | using OpenSim.Region.Environment.Scenes; |
7 | using OpenSim.Framework.Utilities; | 7 | |
8 | using OpenSim.Region.Environment.Scenes; | ||
9 | using OpenSim.Region.Environment.Interfaces; | ||
10 | |||
11 | namespace OpenSim.Region.Environment.Modules | 8 | namespace OpenSim.Region.Environment.Modules |
12 | { | 9 | { |
13 | public class XferModule : IRegionModule, IXfer | 10 | public class XferModule : IRegionModule, IXfer |
@@ -18,8 +15,7 @@ namespace OpenSim.Region.Environment.Modules | |||
18 | private Scene m_scene; | 15 | private Scene m_scene; |
19 | 16 | ||
20 | public XferModule() | 17 | public XferModule() |
21 | { | 18 | { |
22 | |||
23 | } | 19 | } |
24 | 20 | ||
25 | public void Initialise(Scene scene) | 21 | public void Initialise(Scene scene) |
@@ -31,13 +27,11 @@ namespace OpenSim.Region.Environment.Modules | |||
31 | } | 27 | } |
32 | 28 | ||
33 | public void PostInitialise() | 29 | public void PostInitialise() |
34 | { | 30 | { |
35 | |||
36 | } | 31 | } |
37 | 32 | ||
38 | public void CloseDown() | 33 | public void CloseDown() |
39 | { | 34 | { |
40 | |||
41 | } | 35 | } |
42 | 36 | ||
43 | public string GetName() | 37 | public string GetName() |
@@ -67,7 +61,7 @@ namespace OpenSim.Region.Environment.Modules | |||
67 | lock (NewFiles) | 61 | lock (NewFiles) |
68 | { | 62 | { |
69 | if (NewFiles.ContainsKey(fileName)) | 63 | if (NewFiles.ContainsKey(fileName)) |
70 | { | 64 | { |
71 | if (!Transfers.ContainsKey(xferID)) | 65 | if (!Transfers.ContainsKey(xferID)) |
72 | { | 66 | { |
73 | byte[] fileData = NewFiles[fileName]; | 67 | byte[] fileData = NewFiles[fileName]; |
@@ -82,7 +76,7 @@ namespace OpenSim.Region.Environment.Modules | |||
82 | 76 | ||
83 | public void AckPacket(IClientAPI remoteClient, ulong xferID, uint packet) | 77 | public void AckPacket(IClientAPI remoteClient, ulong xferID, uint packet) |
84 | { | 78 | { |
85 | if (this.Transfers.ContainsKey(xferID)) | 79 | if (Transfers.ContainsKey(xferID)) |
86 | { | 80 | { |
87 | Transfers[xferID].AckPacket(packet); | 81 | Transfers[xferID].AckPacket(packet); |
88 | } | 82 | } |
@@ -125,8 +119,7 @@ namespace OpenSim.Region.Environment.Modules | |||
125 | } | 119 | } |
126 | 120 | ||
127 | public XferDownLoad() | 121 | public XferDownLoad() |
128 | { | 122 | { |
129 | |||
130 | } | 123 | } |
131 | 124 | ||
132 | public void StartSend() | 125 | public void StartSend() |
@@ -142,10 +135,10 @@ namespace OpenSim.Region.Environment.Modules | |||
142 | } | 135 | } |
143 | else | 136 | else |
144 | { | 137 | { |
145 | byte[] transferData = new byte[1000 +4]; | 138 | byte[] transferData = new byte[1000 + 4]; |
146 | Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); | 139 | Array.Copy(Helpers.IntToBytes(Data.Length), 0, transferData, 0, 4); |
147 | Array.Copy(Data, 0, transferData, 4, 1000); | 140 | Array.Copy(Data, 0, transferData, 4, 1000); |
148 | Client.SendXferPacket(XferID, 0 , transferData); | 141 | Client.SendXferPacket(XferID, 0, transferData); |
149 | Packet++; | 142 | Packet++; |
150 | DataPointer = 1000; | 143 | DataPointer = 1000; |
151 | } | 144 | } |
@@ -167,7 +160,7 @@ namespace OpenSim.Region.Environment.Modules | |||
167 | { | 160 | { |
168 | byte[] transferData = new byte[Data.Length - DataPointer]; | 161 | byte[] transferData = new byte[Data.Length - DataPointer]; |
169 | Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer); | 162 | Array.Copy(Data, DataPointer, transferData, 0, Data.Length - DataPointer); |
170 | uint endPacket = Packet |= (uint)0x80000000; | 163 | uint endPacket = Packet |= (uint) 0x80000000; |
171 | Client.SendXferPacket(XferID, endPacket, transferData); | 164 | Client.SendXferPacket(XferID, endPacket, transferData); |
172 | Packet++; | 165 | Packet++; |
173 | DataPointer += (Data.Length - DataPointer); | 166 | DataPointer += (Data.Length - DataPointer); |
@@ -177,4 +170,4 @@ namespace OpenSim.Region.Environment.Modules | |||
177 | } | 170 | } |
178 | } | 171 | } |
179 | } | 172 | } |
180 | } | 173 | } \ No newline at end of file |