From 67e12b95ea7b68f4904a7484d77ecfd787d16d0c Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Tue, 30 Oct 2007 09:05:31 +0000 Subject: * Optimized usings * Shortened type references * Removed redundant 'this' qualifier --- .../Environment/Modules/AssetDownloadModule.cs | 7 +- .../Environment/Modules/AvatarFactoryModule.cs | 11 +- .../Environment/Modules/AvatarProfilesModule.cs | 7 +- OpenSim/Region/Environment/Modules/ChatModule.cs | 266 ++++++++++++--------- .../Environment/Modules/DynamicTextureModule.cs | 6 +- OpenSim/Region/Environment/Modules/EmailModule.cs | 2 +- .../Region/Environment/Modules/FriendsModule.cs | 4 +- OpenSim/Region/Environment/Modules/GroupsModule.cs | 4 +- .../Environment/Modules/InstantMessageModule.cs | 30 +-- .../Region/Environment/Modules/InventoryModule.cs | 4 +- .../Environment/Modules/LoadImageURLModule.cs | 33 ++- .../Environment/Modules/ScriptsHttpRequests.cs | 2 +- .../Region/Environment/Modules/TeleportModule.cs | 2 +- .../Environment/Modules/TextureDownloadModule.cs | 49 ++-- .../Region/Environment/Modules/WorldCommModule.cs | 146 +++++------ OpenSim/Region/Environment/Modules/XMLRPCModule.cs | 65 ++--- OpenSim/Region/Environment/Modules/XferModule.cs | 7 +- 17 files changed, 328 insertions(+), 317 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs index e414713..54d5ad8 100644 --- a/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/AssetDownloadModule.cs @@ -26,11 +26,10 @@ * */ -using OpenSim.Framework.Interfaces; +using Nini.Config; +using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -70,4 +69,4 @@ namespace OpenSim.Region.Environment.Modules { } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs index 456d838..4bb0638 100644 --- a/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarFactoryModule.cs @@ -1,6 +1,3 @@ -using System; -using System.Collections.Generic; -using System.Text; using libsecondlife; using Nini.Config; using OpenSim.Framework; @@ -11,7 +8,8 @@ namespace OpenSim.Region.Environment.Modules { public class AvatarFactoryModule : IAvatarFactory { - public bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, out byte[] visualParams) + public bool TryGetIntialAvatarAppearance(LLUUID avatarId, out AvatarWearable[] wearables, + out byte[] visualParams) { GetDefaultAvatarAppearance(out wearables, out visualParams); return true; @@ -51,7 +49,4 @@ namespace OpenSim.Region.Environment.Modules wearables = AvatarWearable.DefaultWearables; } } - - - -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs index 802655f..1b7e2a4 100644 --- a/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs +++ b/OpenSim/Region/Environment/Modules/AvatarProfilesModule.cs @@ -27,11 +27,10 @@ */ using libsecondlife; -using OpenSim.Framework.Interfaces; +using Nini.Config; +using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -92,4 +91,4 @@ namespace OpenSim.Region.Environment.Modules partner); } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index bdb8ee5..9d4187a 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs @@ -27,13 +27,13 @@ */ using System; +using System.Collections.Generic; using System.IO; using System.Net.Sockets; -using System.Threading; -using System.Collections.Generic; using System.Text.RegularExpressions; +using System.Threading; using libsecondlife; -using OpenSim.Framework.Interfaces; +using Nini.Config; using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; @@ -54,18 +54,22 @@ namespace OpenSim.Region.Environment.Modules public ChatModule() { - m_log = OpenSim.Framework.Console.MainLog.Instance; + m_log = MainLog.Instance; } - public void Initialise(Scene scene, Nini.Config.IConfigSource config) + public void Initialise(Scene scene, IConfigSource config) { // wrap this in a try block so that defaults will work if // the config file doesn't specify otherwise. - try { - m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); + try + { + m_whisperdistance = config.Configs["Chat"].GetInt("whisper_distance", m_whisperdistance); m_saydistance = config.Configs["Chat"].GetInt("say_distance", m_saydistance); m_shoutdistance = config.Configs["Chat"].GetInt("shout_distance", m_shoutdistance); - } catch (Exception e) {} + } + catch (Exception e) + { + } if (!m_scenes.Contains(scene)) { @@ -73,20 +77,20 @@ namespace OpenSim.Region.Environment.Modules scene.EventManager.OnNewClient += NewClient; scene.RegisterModuleInterface(this); } - + // setup IRC Relay m_irc = new IRCChatModule(config); } public void PostInitialise() { - - if (m_irc.Enabled) { + if (m_irc.Enabled) + { m_irc.Connect(m_scenes); } } - public void Close() + public void Close() { m_irc.Close(); } @@ -111,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules ScenePresence avatar = null; //TODO: Move ForEachScenePresence and others into IScene. - Scene scene = (Scene)e.Scene; + Scene scene = (Scene) e.Scene; //TODO: Remove the need for this check if (scene == null) @@ -119,10 +123,12 @@ namespace OpenSim.Region.Environment.Modules // Filled in since it's easier than rewriting right now. LLVector3 fromPos = e.Position; - LLVector3 fromRegionPos = e.Position + new LLVector3(e.Scene.RegionInfo.RegionLocX * 256, e.Scene.RegionInfo.RegionLocY * 256, 0); + LLVector3 fromRegionPos = e.Position + + new LLVector3(e.Scene.RegionInfo.RegionLocX*256, e.Scene.RegionInfo.RegionLocY*256, + 0); string fromName = e.From; string message = e.Message; - byte type = (byte)e.Type; + byte type = (byte) e.Type; LLUUID fromAgentID = LLUUID.Zero; if (e.Sender != null) @@ -133,7 +139,8 @@ namespace OpenSim.Region.Environment.Modules if (avatar != null) { fromPos = avatar.AbsolutePosition; - fromRegionPos = fromPos + new LLVector3(e.Scene.RegionInfo.RegionLocX * 256, e.Scene.RegionInfo.RegionLocY * 256, 0); + fromRegionPos = fromPos + + new LLVector3(e.Scene.RegionInfo.RegionLocX*256, e.Scene.RegionInfo.RegionLocY*256, 0); fromName = avatar.Firstname + " " + avatar.Lastname; fromAgentID = e.Sender.AgentId; avatar = null; @@ -159,75 +166,84 @@ namespace OpenSim.Region.Environment.Modules break; } - m_log.Verbose("CHAT", fromName + " (" + e.Channel + " @ " + scene.RegionInfo.RegionName + ") " + typeName + ": " + e.Message); - - if (m_irc.Connected) - { - m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message); - } - - if (e.Channel == 0) - { - foreach (Scene m_scene in m_scenes) - { - m_scene.ForEachScenePresence(delegate(ScenePresence presence) - { - int dis = -100000; - - LLVector3 avatarRegionPos = presence.AbsolutePosition + new LLVector3(scene.RegionInfo.RegionLocX * 256, scene.RegionInfo.RegionLocY * 256, 0); - dis = Math.Abs((int)avatarRegionPos.GetDistanceTo(fromRegionPos)); - - switch (e.Type) - { - case ChatTypeEnum.Whisper: - if (dis < m_whisperdistance) - { - //should change so the message is sent through the avatar rather than direct to the ClientView - presence.ControllingClient.SendChatMessage(message, - type, - fromPos, - fromName, - fromAgentID); - } - break; - case ChatTypeEnum.Say: - if (dis < m_saydistance) - { - //Console.WriteLine("sending chat"); - presence.ControllingClient.SendChatMessage(message, - type, - fromPos, - fromName, - fromAgentID); - } - break; - case ChatTypeEnum.Shout: - if (dis < m_shoutdistance) - { - presence.ControllingClient.SendChatMessage(message, - type, - fromPos, - fromName, - fromAgentID); - } - break; - - case ChatTypeEnum.Broadcast: - presence.ControllingClient.SendChatMessage(message, type, - fromPos, - fromName, - fromAgentID); - break; - default: - break; - } - }); + m_log.Verbose("CHAT", + fromName + " (" + e.Channel + " @ " + scene.RegionInfo.RegionName + ") " + typeName + ": " + + e.Message); + + if (m_irc.Connected) + { + m_irc.PrivMsg(fromName, scene.RegionInfo.RegionName, e.Message); + } + + if (e.Channel == 0) + { + foreach (Scene m_scene in m_scenes) + { + m_scene.ForEachScenePresence(delegate(ScenePresence presence) + { + int dis = -100000; + + LLVector3 avatarRegionPos = presence.AbsolutePosition + + new LLVector3( + scene.RegionInfo.RegionLocX*256, + scene.RegionInfo.RegionLocY*256, + 0); + dis = + Math.Abs((int) avatarRegionPos.GetDistanceTo(fromRegionPos)); + + switch (e.Type) + { + case ChatTypeEnum.Whisper: + if (dis < m_whisperdistance) + { + //should change so the message is sent through the avatar rather than direct to the ClientView + presence.ControllingClient.SendChatMessage(message, + type, + fromPos, + fromName, + fromAgentID); + } + break; + case ChatTypeEnum.Say: + if (dis < m_saydistance) + { + //Console.WriteLine("sending chat"); + presence.ControllingClient.SendChatMessage(message, + type, + fromPos, + fromName, + fromAgentID); + } + break; + case ChatTypeEnum.Shout: + if (dis < m_shoutdistance) + { + presence.ControllingClient.SendChatMessage(message, + type, + fromPos, + fromName, + fromAgentID); + } + break; + + case ChatTypeEnum.Broadcast: + presence.ControllingClient.SendChatMessage(message, + type, + fromPos, + fromName, + fromAgentID); + break; + default: + break; + } + }); } } } } - class IRCChatModule { + internal class IRCChatModule + { private string m_server = null; private int m_port = 6668; private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; @@ -238,7 +254,7 @@ namespace OpenSim.Region.Environment.Modules private TcpClient m_tcp; private StreamWriter m_writer; private StreamReader m_reader; - + private Thread pingSender; private Thread listener; @@ -248,29 +264,36 @@ namespace OpenSim.Region.Environment.Modules private List m_scenes = null; private LogBase m_log; - public IRCChatModule(Nini.Config.IConfigSource config) { + public IRCChatModule(IConfigSource config) + { m_nick = "OSimBot" + Util.RandomClass.Next(1, 99); m_tcp = null; m_writer = null; m_reader = null; - try { + try + { m_server = config.Configs["IRC"].GetString("server"); m_nick = config.Configs["IRC"].GetString("nick"); m_channel = config.Configs["IRC"].GetString("channel"); m_port = config.Configs["IRC"].GetInt("port", m_port); m_user = config.Configs["IRC"].GetString("username", m_user); - if (m_server != null && m_nick != null && m_channel != null) { + if (m_server != null && m_nick != null && m_channel != null) + { m_enabled = true; } - } catch (Exception e) { + } + catch (Exception e) + { Console.WriteLine("No IRC config information, skipping IRC bridge configuration"); } - m_log = OpenSim.Framework.Console.MainLog.Instance; + m_log = MainLog.Instance; } - public bool Connect(List scenes) { - try { + public bool Connect(List scenes) + { + try + { m_scenes = scenes; m_tcp = new TcpClient(m_server, m_port); @@ -279,13 +302,13 @@ namespace OpenSim.Region.Environment.Modules m_log.Verbose("IRC", "Connected to " + m_server); m_reader = new StreamReader(m_stream); m_writer = new StreamWriter(m_stream); - - pingSender = new Thread(new ThreadStart(this.PingRun)); + + pingSender = new Thread(new ThreadStart(PingRun)); pingSender.Start(); - - listener = new Thread(new ThreadStart(this.ListenerRun)); + + listener = new Thread(new ThreadStart(ListenerRun)); listener.Start(); - + m_writer.WriteLine(m_user); m_writer.Flush(); m_writer.WriteLine("NICK " + m_nick); @@ -294,50 +317,61 @@ namespace OpenSim.Region.Environment.Modules m_writer.Flush(); m_log.Verbose("IRC", "Connection fully established"); m_connected = true; - } catch (Exception e) { + } + catch (Exception e) + { Console.WriteLine(e.ToString()); } return m_connected; } - public bool Enabled + public bool Enabled { get { return m_enabled; } } - + public bool Connected { get { return m_connected; } } - public void PrivMsg(string from, string region, string msg) { - try { + public void PrivMsg(string from, string region, string msg) + { + try + { m_writer.WriteLine("PRIVMSG {0} :<{1} in {2}>: {3}", m_channel, from, region, msg); m_writer.Flush(); - } catch (IOException) { - m_log.Error("IRC","Disconnected from IRC server."); + } + catch (IOException) + { + m_log.Error("IRC", "Disconnected from IRC server."); listener.Abort(); pingSender.Abort(); m_connected = false; } } - private Dictionary ExtractMsg(string input) { + private Dictionary ExtractMsg(string input) + { Dictionary result = null; string regex = @":(?\w*)!~(?\S*) PRIVMSG (?\S+) :(?.*)"; Regex RE = new Regex(regex, RegexOptions.Multiline); MatchCollection matches = RE.Matches(input); // Get some direct matches $1 $4 is a - if ((matches.Count == 1) && (matches[0].Groups.Count == 5)) { + if ((matches.Count == 1) && (matches[0].Groups.Count == 5)) + { result = new Dictionary(); result.Add("nick", matches[0].Groups[1].Value); result.Add("user", matches[0].Groups[2].Value); result.Add("channel", matches[0].Groups[3].Value); result.Add("msg", matches[0].Groups[4].Value); - } else { + } + else + { m_log.Verbose("IRC", "Number of matches: " + matches.Count); - if (matches.Count > 0) { - m_log.Verbose("IRC", "Number of groups: " + matches[0].Groups.Count); + if (matches.Count > 0) + { + m_log.Verbose("IRC", "Number of groups: " + matches[0].Groups.Count); } } return result; @@ -365,19 +399,20 @@ namespace OpenSim.Region.Environment.Modules if (inputLine.Contains(m_channel)) { Dictionary data = ExtractMsg(inputLine); - if (data != null ) + if (data != null) { foreach (Scene m_scene in m_scenes) { m_scene.ForEachScenePresence(delegate(ScenePresence avatar) - { - if (!avatar.IsChildAgent) { - avatar.ControllingClient.SendChatMessage( - Helpers.StringToField(data["msg"]), 255, pos, data["nick"], - LLUUID.Zero); - } - }); + if (!avatar.IsChildAgent) + { + avatar.ControllingClient.SendChatMessage( + Helpers.StringToField(data["msg"]), 255, + pos, data["nick"], + LLUUID.Zero); + } + }); } } } @@ -387,7 +422,8 @@ namespace OpenSim.Region.Environment.Modules } - public void Close() { + public void Close() + { listener.Abort(); pingSender.Abort(); m_writer.Close(); @@ -395,4 +431,4 @@ namespace OpenSim.Region.Environment.Modules m_tcp.Close(); } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs index 7c852dc..2bc3db8 100644 --- a/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs +++ b/OpenSim/Region/Environment/Modules/DynamicTextureModule.cs @@ -29,10 +29,10 @@ using System; using System.Collections.Generic; using libsecondlife; +using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules if (RenderPlugins.ContainsKey(contentType)) { //Console.WriteLine("dynamic texture being created: " + url + " of type " + contentType); - + DynamicTextureUpdater updater = new DynamicTextureUpdater(); updater.SimUUID = simID; updater.PrimID = primID; @@ -187,4 +187,4 @@ namespace OpenSim.Region.Environment.Modules } } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/EmailModule.cs b/OpenSim/Region/Environment/Modules/EmailModule.cs index 00ea07a..046a46c 100644 --- a/OpenSim/Region/Environment/Modules/EmailModule.cs +++ b/OpenSim/Region/Environment/Modules/EmailModule.cs @@ -31,4 +31,4 @@ namespace OpenSim.Region.Environment.Modules internal class EmailModule { } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/FriendsModule.cs b/OpenSim/Region/Environment/Modules/FriendsModule.cs index 9144bee..d9f09f7 100644 --- a/OpenSim/Region/Environment/Modules/FriendsModule.cs +++ b/OpenSim/Region/Environment/Modules/FriendsModule.cs @@ -26,9 +26,9 @@ * */ +using Nini.Config; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -59,4 +59,4 @@ namespace OpenSim.Region.Environment.Modules get { return false; } } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/GroupsModule.cs b/OpenSim/Region/Environment/Modules/GroupsModule.cs index 150f294..50e9a39 100644 --- a/OpenSim/Region/Environment/Modules/GroupsModule.cs +++ b/OpenSim/Region/Environment/Modules/GroupsModule.cs @@ -26,9 +26,9 @@ * */ +using Nini.Config; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -59,4 +59,4 @@ namespace OpenSim.Region.Environment.Modules get { return false; } } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs index 9ac1d76..2ad027a 100644 --- a/OpenSim/Region/Environment/Modules/InstantMessageModule.cs +++ b/OpenSim/Region/Environment/Modules/InstantMessageModule.cs @@ -27,11 +27,12 @@ */ using System.Collections.Generic; +using libsecondlife; +using Nini.Config; +using OpenSim.Framework; +using OpenSim.Framework.Console; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework.Console; -using OpenSim.Framework; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -42,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules public InstantMessageModule() { - m_log = OpenSim.Framework.Console.MainLog.Instance; + m_log = MainLog.Instance; } public void Initialise(Scene scene, IConfigSource config) @@ -50,33 +51,34 @@ namespace OpenSim.Region.Environment.Modules if (!m_scenes.Contains(scene)) { m_scenes.Add(scene); - scene.EventManager.OnNewClient += OnNewClient; + scene.EventManager.OnNewClient += OnNewClient; } } - void OnNewClient(OpenSim.Framework.IClientAPI client) + private void OnNewClient(IClientAPI client) { client.OnInstantMessage += OnInstantMessage; } - void OnInstantMessage(libsecondlife.LLUUID fromAgentID, - libsecondlife.LLUUID fromAgentSession, libsecondlife.LLUUID toAgentID, - libsecondlife.LLUUID imSessionID, uint timestamp, string fromAgentName, - string message, byte dialog) + private void OnInstantMessage(LLUUID fromAgentID, + LLUUID fromAgentSession, LLUUID toAgentID, + LLUUID imSessionID, uint timestamp, string fromAgentName, + string message, byte dialog) { // TODO: Remove after debugging. Privacy implications. - m_log.Verbose("IM",fromAgentName + ": " + message); + m_log.Verbose("IM", fromAgentName + ": " + message); foreach (Scene m_scene in m_scenes) { if (m_scene.Entities.ContainsKey(toAgentID) && m_scene.Entities[toAgentID] is ScenePresence) { // Local Message - ScenePresence user = (ScenePresence)m_scene.Entities[toAgentID]; + ScenePresence user = (ScenePresence) m_scene.Entities[toAgentID]; if (!user.IsChildAgent) { user.ControllingClient.SendInstantMessage(fromAgentID, fromAgentSession, message, - toAgentID, imSessionID, fromAgentName, dialog, timestamp); + toAgentID, imSessionID, fromAgentName, dialog, + timestamp); } // Message sent return; @@ -104,4 +106,4 @@ namespace OpenSim.Region.Environment.Modules get { return true; } } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/InventoryModule.cs b/OpenSim/Region/Environment/Modules/InventoryModule.cs index 3f8cd6e..e2ad0d5 100644 --- a/OpenSim/Region/Environment/Modules/InventoryModule.cs +++ b/OpenSim/Region/Environment/Modules/InventoryModule.cs @@ -26,9 +26,9 @@ * */ +using Nini.Config; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -59,4 +59,4 @@ namespace OpenSim.Region.Environment.Modules get { return false; } } } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/LoadImageURLModule.cs b/OpenSim/Region/Environment/Modules/LoadImageURLModule.cs index 8b8b386..9d10fc3 100644 --- a/OpenSim/Region/Environment/Modules/LoadImageURLModule.cs +++ b/OpenSim/Region/Environment/Modules/LoadImageURLModule.cs @@ -1,18 +1,16 @@ using System; -using System.Collections.Generic; -using System.Text; -using System.Net; -using System.IO; using System.Drawing; +using System.IO; +using System.Net; using libsecondlife; +using Nini.Config; using OpenJPEGNet; -using OpenSim.Region.Environment.Scenes; using OpenSim.Region.Environment.Interfaces; -using Nini.Config; +using OpenSim.Region.Environment.Scenes; namespace OpenSim.Region.Environment.Modules { - public class LoadImageURLModule : IRegionModule , IDynamicTextureRender + public class LoadImageURLModule : IRegionModule, IDynamicTextureRender { private string m_name = "LoadImageURL"; private IDynamicTextureManager m_textureManager; @@ -85,25 +83,25 @@ namespace OpenSim.Region.Environment.Modules private void MakeHttpRequest(string url, LLUUID requestID) { WebRequest request = HttpWebRequest.Create(url); - RequestState state = new RequestState((HttpWebRequest)request, requestID); + RequestState state = new RequestState((HttpWebRequest) request, requestID); IAsyncResult result = request.BeginGetResponse(new AsyncCallback(HttpRequestReturn), state); TimeSpan t = (DateTime.UtcNow - new DateTime(1970, 1, 1)); - state.TimeOfRequest = (int)t.TotalSeconds; + state.TimeOfRequest = (int) t.TotalSeconds; } private void HttpRequestReturn(IAsyncResult result) { - RequestState state = (RequestState)result.AsyncState; - WebRequest request = (WebRequest)state.Request; - HttpWebResponse response = (HttpWebResponse)request.EndGetResponse(result); + RequestState state = (RequestState) result.AsyncState; + WebRequest request = (WebRequest) state.Request; + HttpWebResponse response = (HttpWebResponse) request.EndGetResponse(result); if (response.StatusCode == HttpStatusCode.OK) { - Bitmap image = new Bitmap(response.GetResponseStream()); - Bitmap resize = new Bitmap(image, new Size(512, 512)); - byte[] imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); + Bitmap image = new Bitmap(response.GetResponseStream()); + Bitmap resize = new Bitmap(image, new Size(512, 512)); + byte[] imageJ2000 = OpenJPEG.EncodeFromImage(resize, true); - m_textureManager.ReturnData(state.RequestID, imageJ2000); + m_textureManager.ReturnData(state.RequestID, imageJ2000); } } @@ -119,6 +117,5 @@ namespace OpenSim.Region.Environment.Modules RequestID = requestID; } } - } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs b/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs index 9412089..5ac0b39 100644 --- a/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs +++ b/OpenSim/Region/Environment/Modules/ScriptsHttpRequests.cs @@ -31,4 +31,4 @@ namespace OpenSim.Region.Environment.Modules internal class ScriptsHttpRequests { } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/TeleportModule.cs b/OpenSim/Region/Environment/Modules/TeleportModule.cs index d22a722..77f8db2 100644 --- a/OpenSim/Region/Environment/Modules/TeleportModule.cs +++ b/OpenSim/Region/Environment/Modules/TeleportModule.cs @@ -31,4 +31,4 @@ namespace OpenSim.Region.Environment.Modules internal class TeleportModule { } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs index 5eeeca6..66c499b 100644 --- a/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs +++ b/OpenSim/Region/Environment/Modules/TextureDownloadModule.cs @@ -27,14 +27,12 @@ */ using System; using System.Collections.Generic; -using System.Threading; using libsecondlife; using libsecondlife.Packets; -using OpenSim.Framework.Interfaces; +using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -42,17 +40,19 @@ namespace OpenSim.Region.Environment.Modules { private Scene m_scene; private List m_scenes = new List(); - private Dictionary> ClientRequests = new Dictionary>(); + + private Dictionary> ClientRequests = + new Dictionary>(); private BlockingQueue QueueSenders = new BlockingQueue(); private Dictionary> InProcess = new Dictionary>(); - // private Thread m_thread; + // private Thread m_thread; public TextureDownloadModule() { - // m_thread = new Thread(new ThreadStart(ProcessTextureSenders)); - // m_thread.IsBackground = true; - // m_thread.Start(); + // m_thread = new Thread(new ThreadStart(ProcessTextureSenders)); + // m_thread.IsBackground = true; + // m_thread.Start(); } public void Initialise(Scene scene, IConfigSource config) @@ -85,7 +85,7 @@ namespace OpenSim.Region.Environment.Modules public void NewClient(IClientAPI client) { - /* lock (ClientRequests) + /* lock (ClientRequests) { if (!ClientRequests.ContainsKey(client.AgentId)) { @@ -120,7 +120,7 @@ namespace OpenSim.Region.Environment.Modules public void TextureRequest(Object sender, TextureRequestArgs e) { - IClientAPI client = (IClientAPI)sender; + IClientAPI client = (IClientAPI) sender; if (!ClientRequests[client.AgentId].ContainsKey(e.RequestedAssetID)) { lock (ClientRequests) @@ -136,15 +136,15 @@ namespace OpenSim.Region.Environment.Modules { while (true) { - TextureSender sender = this.QueueSenders.Dequeue(); + TextureSender sender = QueueSenders.Dequeue(); bool finished = sender.SendTexture(); if (finished) { - this.TextureSent(sender); + TextureSent(sender); } else { - this.QueueSenders.Enqueue(sender); + QueueSenders.Enqueue(sender); } } } @@ -173,13 +173,13 @@ namespace OpenSim.Region.Environment.Modules if (asset.Data.LongLength > 600) { - NumPackets = 2 + (int)(asset.Data.Length - 601) / 1000; + NumPackets = 2 + (int) (asset.Data.Length - 601)/1000; } else { NumPackets = 1; } - + PacketCounter = (int) req.PacketNumber; } @@ -205,7 +205,7 @@ namespace OpenSim.Region.Environment.Modules im.Header.Reliable = false; im.ImageID.Packets = 1; im.ImageID.ID = m_asset.FullID; - im.ImageID.Size = (uint)m_asset.Data.Length; + im.ImageID.Size = (uint) m_asset.Data.Length; im.ImageData.Data = m_asset.Data; im.ImageID.Codec = 2; req.RequestUser.OutPacket(im); @@ -215,9 +215,9 @@ namespace OpenSim.Region.Environment.Modules { ImageDataPacket im = new ImageDataPacket(); im.Header.Reliable = false; - im.ImageID.Packets = (ushort)(NumPackets); + im.ImageID.Packets = (ushort) (NumPackets); im.ImageID.ID = m_asset.FullID; - im.ImageID.Size = (uint)m_asset.Data.Length; + im.ImageID.Size = (uint) m_asset.Data.Length; im.ImageData.Data = new byte[600]; Array.Copy(m_asset.Data, 0, im.ImageData.Data, 0, 600); im.ImageID.Codec = 2; @@ -229,18 +229,16 @@ namespace OpenSim.Region.Environment.Modules { ImagePacketPacket im = new ImagePacketPacket(); im.Header.Reliable = false; - im.ImageID.Packet = (ushort)(PacketCounter); + im.ImageID.Packet = (ushort) (PacketCounter); im.ImageID.ID = m_asset.FullID; - int size = m_asset.Data.Length - 600 - (1000 * (PacketCounter - 1)); + int size = m_asset.Data.Length - 600 - (1000*(PacketCounter - 1)); if (size > 1000) size = 1000; im.ImageData.Data = new byte[size]; - Array.Copy(m_asset.Data, 600 + (1000 * (PacketCounter - 1)), im.ImageData.Data, 0, size); + Array.Copy(m_asset.Data, 600 + (1000*(PacketCounter - 1)), im.ImageData.Data, 0, size); req.RequestUser.OutPacket(im); - PacketCounter++; + PacketCounter++; } - } - } public class AssetRequest @@ -258,6 +256,5 @@ namespace OpenSim.Region.Environment.Modules PacketNumber = packetNumber; } } - } -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/WorldCommModule.cs b/OpenSim/Region/Environment/Modules/WorldCommModule.cs index a697162..7a631d7 100644 --- a/OpenSim/Region/Environment/Modules/WorldCommModule.cs +++ b/OpenSim/Region/Environment/Modules/WorldCommModule.cs @@ -27,20 +27,12 @@ */ using System; -using System.IO; -using System.Net.Sockets; -using System.Text; -using System.Threading; +using System.Collections.Generic; using libsecondlife; -using OpenSim.Framework.Interfaces; +using Nini.Config; using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework.Servers; -using Nwc.XmlRpc; -using System.Collections; -using System.Collections.Generic; -using Nini.Config; /***************************************************** * @@ -71,6 +63,7 @@ using Nini.Config; * thats the way it works. * * **************************************************/ + namespace OpenSim.Region.Environment.Modules { public class WorldCommModule : IRegionModule, IWorldComm @@ -120,9 +113,9 @@ namespace OpenSim.Region.Environment.Modules private void DeliverClientMessage(Object sender, ChatFromViewerArgs e) { DeliverMessage(e.Sender.AgentId.ToString(), - (int)e.Type, e.Channel, - e.Sender.FirstName + " " + e.Sender.LastName, - e.Message); + (int) e.Type, e.Channel, + e.Sender.FirstName + " " + e.Sender.LastName, + e.Message); } public int Listen(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, string msg) @@ -132,11 +125,10 @@ namespace OpenSim.Region.Environment.Modules public void ListenControl(int handle, int active) { - if ( active == 1 ) + if (active == 1) m_listenerManager.Activate(handle); - else if ( active == 0 ) + else if (active == 0) m_listenerManager.Dectivate(handle); - } public void ListenRemove(int handle) @@ -151,7 +143,6 @@ namespace OpenSim.Region.Environment.Modules // nearby avatards, the SimChat function is used. public void DeliverMessage(string sourceItemID, int type, int channel, string name, string msg) { - SceneObjectPart source = null; ScenePresence avatar = null; @@ -160,7 +151,7 @@ namespace OpenSim.Region.Environment.Modules { avatar = m_scene.GetScenePresence(new LLUUID(sourceItemID)); } - if( (avatar != null) || (source != null) ) + if ((avatar != null) || (source != null)) { // Loop through the objects in the scene // If they are in proximity, then if they are @@ -169,12 +160,12 @@ namespace OpenSim.Region.Environment.Modules foreach (LLUUID eb in m_scene.Entities.Keys) { EntityBase sPart; - + m_scene.Entities.TryGetValue(eb, out sPart); // Dont process if this message is from itself! if (eb.ToString().Equals(sourceItemID) || - sPart.UUID.ToString().Equals(sourceItemID) ) + sPart.UUID.ToString().Equals(sourceItemID)) continue; double dis = 0; @@ -192,12 +183,11 @@ namespace OpenSim.Region.Environment.Modules { ListenerInfo isListener = m_listenerManager.IsListenerMatch( sourceItemID, sPart.UUID, channel, name, msg - ); + ); if (isListener != null) { m_pending.Enqueue(isListener); } - } break; @@ -207,12 +197,11 @@ namespace OpenSim.Region.Environment.Modules { ListenerInfo isListener = m_listenerManager.IsListenerMatch( sourceItemID, sPart.UUID, channel, name, msg - ); + ); if (isListener != null) { m_pending.Enqueue(isListener); } - } break; @@ -221,22 +210,22 @@ namespace OpenSim.Region.Environment.Modules { ListenerInfo isListener = m_listenerManager.IsListenerMatch( sourceItemID, sPart.UUID, channel, name, msg - ); + ); if (isListener != null) { m_pending.Enqueue(isListener); } - } break; case 0xff: // Broadcast - ListenerInfo isListen = m_listenerManager.IsListenerMatch(sourceItemID, eb, channel, name, msg); + ListenerInfo isListen = + m_listenerManager.IsListenerMatch(sourceItemID, eb, channel, name, msg); if (isListen != null) { ListenerInfo isListener = m_listenerManager.IsListenerMatch( sourceItemID, sPart.UUID, channel, name, msg - ); + ); if (isListener != null) { m_pending.Enqueue(isListener); @@ -244,10 +233,9 @@ namespace OpenSim.Region.Environment.Modules } break; } - }; - + } + ; } - } public bool HasMessages() @@ -257,18 +245,15 @@ namespace OpenSim.Region.Environment.Modules public ListenerInfo GetNextMessage() { - ListenerInfo li = null; lock (CommListLock) { - li = m_pending.Dequeue(); + li = m_pending.Dequeue(); } return li; - } - } // hostID: the ID of the ScenePart @@ -285,20 +270,19 @@ namespace OpenSim.Region.Environment.Modules m_listeners = new Dictionary(); } - public int AddListener(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, string msg) + public int AddListener(uint localID, LLUUID itemID, LLUUID hostID, int channel, string name, string id, + string msg) { - - if ( m_listeners.Count < m_MaxListeners ) + if (m_listeners.Count < m_MaxListeners) { ListenerInfo isListener = IsListenerMatch(LLUUID.Zero.ToString(), itemID, channel, name, msg); - if(isListener == null) + if (isListener == null) { int newHandle = GetNewHandle(); if (newHandle > -1) { - ListenerInfo li = new ListenerInfo(localID, newHandle, itemID, hostID, channel, name, id, msg); lock (ListenersLock) @@ -308,13 +292,10 @@ namespace OpenSim.Region.Environment.Modules return newHandle; } - } - } return -1; - } public void Remove(int handle) @@ -324,7 +305,6 @@ namespace OpenSim.Region.Environment.Modules private int GetNewHandle() { - for (int i = 0; i < int.MaxValue - 1; i++) { if (!m_listeners.ContainsKey(i)) @@ -332,12 +312,10 @@ namespace OpenSim.Region.Environment.Modules } return -1; - } public bool IsListener(LLUUID hostID) { - foreach (ListenerInfo li in m_listeners.Values) { if (li.GetHostID().Equals(hostID)) @@ -345,15 +323,13 @@ namespace OpenSim.Region.Environment.Modules } return false; - } public void Activate(int handle) { - ListenerInfo li; - if( m_listeners.TryGetValue(handle, out li) ) + if (m_listeners.TryGetValue(handle, out li)) { li.Activate(); } @@ -361,10 +337,9 @@ namespace OpenSim.Region.Environment.Modules public void Dectivate(int handle) { - ListenerInfo li; - if( m_listeners.TryGetValue(handle, out li) ) + if (m_listeners.TryGetValue(handle, out li)) { li.Deactivate(); } @@ -372,40 +347,40 @@ namespace OpenSim.Region.Environment.Modules // Theres probably a more clever and efficient way to // do this, maybe with regex. - public ListenerInfo IsListenerMatch(string sourceItemID, LLUUID listenerKey, int channel, string name, string msg) + public ListenerInfo IsListenerMatch(string sourceItemID, LLUUID listenerKey, int channel, string name, + string msg) { - bool isMatch = true; foreach (ListenerInfo li in m_listeners.Values) { if (li.GetHostID().Equals(listenerKey)) { - if ( li.IsActive() ) + if (li.IsActive()) { - if ( channel == li.GetChannel() ) + if (channel == li.GetChannel()) { - if ( (li.GetID().ToString().Length > 0) && - (!li.GetID().Equals(LLUUID.Zero)) ) + if ((li.GetID().ToString().Length > 0) && + (!li.GetID().Equals(LLUUID.Zero))) { if (!li.GetID().ToString().Equals(sourceItemID)) { isMatch = false; } } - if ( isMatch && (li.GetName().Length > 0) ) + if (isMatch && (li.GetName().Length > 0)) { - if ( li.GetName().Equals(name) ) + if (li.GetName().Equals(name)) { isMatch = false; } } - if ( isMatch ) + if (isMatch) { return new ListenerInfo( li.GetLocalID(), li.GetHandle(), li.GetItemID(), li.GetHostID(), li.GetChannel(), name, li.GetID(), msg, new LLUUID(sourceItemID) - ); + ); } } } @@ -413,35 +388,36 @@ namespace OpenSim.Region.Environment.Modules } return null; } - } public class ListenerInfo { - - private LLUUID m_itemID; // ID of the host script engine - private LLUUID m_hostID; // ID of the host/scene part - private LLUUID m_sourceItemID; // ID of the scenePart or avatar source of the message - private int m_channel; // Channel - private int m_handle; // Assigned handle of this listener - private uint m_localID; // Local ID from script engine - private string m_name; // Object name to filter messages from - private LLUUID m_id; // ID to filter messages from - private string m_message; // The message - private bool m_active; // Listener is active or not - - public ListenerInfo(uint localID, int handle, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message) + private LLUUID m_itemID; // ID of the host script engine + private LLUUID m_hostID; // ID of the host/scene part + private LLUUID m_sourceItemID; // ID of the scenePart or avatar source of the message + private int m_channel; // Channel + private int m_handle; // Assigned handle of this listener + private uint m_localID; // Local ID from script engine + private string m_name; // Object name to filter messages from + private LLUUID m_id; // ID to filter messages from + private string m_message; // The message + private bool m_active; // Listener is active or not + + public ListenerInfo(uint localID, int handle, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, + string message) { Initialise(localID, handle, ItemID, hostID, channel, name, id, message); } - public ListenerInfo(uint localID, int handle, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message, LLUUID sourceItemID) + public ListenerInfo(uint localID, int handle, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, + string message, LLUUID sourceItemID) { Initialise(localID, handle, ItemID, hostID, channel, name, id, message); m_sourceItemID = sourceItemID; } - private void Initialise(uint localID, int handle, LLUUID ItemID, LLUUID hostID, int channel, string name, LLUUID id, string message) + private void Initialise(uint localID, int handle, LLUUID ItemID, LLUUID hostID, int channel, string name, + LLUUID id, string message) { m_handle = handle; m_channel = channel; @@ -453,55 +429,65 @@ namespace OpenSim.Region.Environment.Modules m_active = true; m_localID = localID; } + public LLUUID GetItemID() { return m_itemID; } + public LLUUID GetHostID() { return m_hostID; } + public LLUUID GetSourceItemID() { return m_sourceItemID; } + public int GetChannel() { return m_channel; } + public uint GetLocalID() { return m_localID; } + public int GetHandle() { return m_handle; } + public string GetMessage() { return m_message; } + public string GetName() { return m_name; } + public bool IsActive() { return m_active; } + public void Deactivate() { m_active = false; } + public void Activate() { m_active = true; } + public LLUUID GetID() { return m_id; } - } - -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs index dd84778..434c92f 100644 --- a/OpenSim/Region/Environment/Modules/XMLRPCModule.cs +++ b/OpenSim/Region/Environment/Modules/XMLRPCModule.cs @@ -26,20 +26,15 @@ * */ -using System; -using System.IO; -using System.Net.Sockets; +using System.Collections; +using System.Collections.Generic; using System.Threading; using libsecondlife; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework; +using Nini.Config; +using Nwc.XmlRpc; +using OpenSim.Framework.Servers; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework.Servers; -using Nwc.XmlRpc; -using System.Collections; -using System.Collections.Generic; -using Nini.Config; /***************************************************** * @@ -73,6 +68,7 @@ using Nini.Config; * llCloseRemoteDataChannel * * **************************************************/ + namespace OpenSim.Region.Environment.Modules { public class XMLRPCModule : IRegionModule, IXMLRPC @@ -83,7 +79,7 @@ namespace OpenSim.Region.Environment.Modules private string m_name = "XMLRPCModule"; private int RemoteReplyScriptWait = 100; private int RemoteReplyScriptTimeout = 300; - + // private Dictionary m_openChannels; @@ -106,7 +102,7 @@ namespace OpenSim.Region.Environment.Modules // Start http server // Attach xmlrpc handlers BaseHttpServer httpServer = new BaseHttpServer(20800); - httpServer.AddXmlRPCHandler("llRemoteData", this.XmlRpcRemoteData); + httpServer.AddXmlRPCHandler("llRemoteData", XmlRpcRemoteData); httpServer.Start(); } @@ -141,6 +137,7 @@ namespace OpenSim.Region.Environment.Modules * current channel and assign a new one. * * ********************************************/ + public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID) { LLUUID channel = null; @@ -156,7 +153,7 @@ namespace OpenSim.Region.Environment.Modules } } - if ( (channel == null) || (channel.Equals(LLUUID.Zero)) ) + if ((channel == null) || (channel.Equals(LLUUID.Zero))) { channel = LLUUID.Random(); RPCChannelInfo rpcChanInfo = new RPCChannelInfo(localID, itemID, channel); @@ -164,7 +161,6 @@ namespace OpenSim.Region.Environment.Modules { m_openChannels.Add(channel, rpcChanInfo); } - } return channel; @@ -176,6 +172,7 @@ namespace OpenSim.Region.Environment.Modules * Response to RPC message * *********************************************/ + public void RemoteDataReply(string channel, string message_id, string sdata, int idata) { RPCRequestInfo rpcInfo; @@ -191,7 +188,6 @@ namespace OpenSim.Region.Environment.Modules m_pendingResponse.Remove(message_key); } } - } /********************************************** @@ -200,41 +196,44 @@ namespace OpenSim.Region.Environment.Modules * Remove channel from dictionary * *********************************************/ + public void CloseXMLRPCChannel(LLUUID channelKey) { - if(m_openChannels.ContainsKey(channelKey)) + if (m_openChannels.ContainsKey(channelKey)) m_openChannels.Remove(channelKey); } public XmlRpcResponse XmlRpcRemoteData(XmlRpcRequest request) { - XmlRpcResponse response = new XmlRpcResponse(); - Hashtable requestData = (Hashtable)request.Params[0]; - bool GoodXML = (requestData.Contains("Channel") && requestData.Contains("IntValue") && requestData.Contains("StringValue")); + Hashtable requestData = (Hashtable) request.Params[0]; + bool GoodXML = (requestData.Contains("Channel") && requestData.Contains("IntValue") && + requestData.Contains("StringValue")); if (GoodXML) { - LLUUID channel = new LLUUID((string)requestData["Channel"]); + LLUUID channel = new LLUUID((string) requestData["Channel"]); RPCChannelInfo rpcChanInfo; if (m_openChannels.TryGetValue(channel, out rpcChanInfo)) { - string intVal = (string)requestData["IntValue"]; - string strVal = (string)requestData["StringValue"]; + string intVal = (string) requestData["IntValue"]; + string strVal = (string) requestData["StringValue"]; RPCRequestInfo rpcInfo; lock (XMLRPCListLock) { - rpcInfo = new RPCRequestInfo(rpcChanInfo.GetLocalID(), rpcChanInfo.GetItemID(), channel, strVal, intVal); + rpcInfo = + new RPCRequestInfo(rpcChanInfo.GetLocalID(), rpcChanInfo.GetItemID(), channel, strVal, + intVal); rpcQueue.Enqueue(rpcInfo); } int timeoutCtr = 0; - while(!rpcInfo.IsProcessed() && (timeoutCtr < RemoteReplyScriptTimeout)) + while (!rpcInfo.IsProcessed() && (timeoutCtr < RemoteReplyScriptTimeout)) { Thread.Sleep(RemoteReplyScriptWait); timeoutCtr += RemoteReplyScriptWait; @@ -252,13 +251,11 @@ namespace OpenSim.Region.Environment.Modules m_pendingResponse.Remove(rpcInfo.GetMessageID()); } } - } else { response.SetFault(-1, "Invalid channel"); } - } return response; @@ -278,7 +275,6 @@ namespace OpenSim.Region.Environment.Modules return rpcInfo; } } - } /************************************************************** @@ -288,6 +284,7 @@ namespace OpenSim.Region.Environment.Modules * Holds details about incoming requests until they are picked * from the queue by LSLLongCmdHandler * ***********************************************************/ + public class RPCRequestInfo { private string m_StrVal; @@ -315,6 +312,7 @@ namespace OpenSim.Region.Environment.Modules { return m_processed; } + public LLUUID GetChannelKey() { return m_ChannelKey; @@ -324,36 +322,41 @@ namespace OpenSim.Region.Environment.Modules { m_processed = processed; } + public void SetRetval(string resp) { m_resp = resp; } + public string GetRetval() { return m_resp; } + public uint GetLocalID() { return m_localID; } + public LLUUID GetItemID() { return m_ItemID; } + public string GetStrVal() { return m_StrVal; } + public int GetIntValue() { return int.Parse(m_IntVal); } + public LLUUID GetMessageID() { return m_MessageID; } - - } public class RPCChannelInfo @@ -383,7 +386,5 @@ namespace OpenSim.Region.Environment.Modules { return m_localID; } - } - -} +} \ No newline at end of file diff --git a/OpenSim/Region/Environment/Modules/XferModule.cs b/OpenSim/Region/Environment/Modules/XferModule.cs index e555475..807b46c 100644 --- a/OpenSim/Region/Environment/Modules/XferModule.cs +++ b/OpenSim/Region/Environment/Modules/XferModule.cs @@ -29,11 +29,10 @@ using System; using System.Collections.Generic; using libsecondlife; -using OpenSim.Framework.Interfaces; +using Nini.Config; +using OpenSim.Framework; using OpenSim.Region.Environment.Interfaces; using OpenSim.Region.Environment.Scenes; -using OpenSim.Framework; -using Nini.Config; namespace OpenSim.Region.Environment.Modules { @@ -200,4 +199,4 @@ namespace OpenSim.Region.Environment.Modules } } } -} +} \ No newline at end of file -- cgit v1.1