From e5b91442822df211f9f8277aaf0c40e1339810f3 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Tue, 18 Mar 2008 15:30:38 +0000 Subject: Formatting cleanup. --- OpenSim/Region/Environment/Modules/ChatModule.cs | 49 ++++++++------- .../Environment/Modules/VectorRenderModule.cs | 73 +++++++++++----------- 2 files changed, 64 insertions(+), 58 deletions(-) (limited to 'OpenSim/Region/Environment/Modules') diff --git a/OpenSim/Region/Environment/Modules/ChatModule.cs b/OpenSim/Region/Environment/Modules/ChatModule.cs index 6638e95..ab6b791 100644 --- a/OpenSim/Region/Environment/Modules/ChatModule.cs +++ b/OpenSim/Region/Environment/Modules/ChatModule.cs @@ -91,7 +91,8 @@ namespace OpenSim.Region.Environment.Modules // setup IRC Relay if (m_irc == null) { m_irc = new IRCChatModule(config); } - if (m_irc_connector == null) { + if (m_irc_connector == null) + { m_irc_connector = new Thread(IRCConnectRun); m_irc_connector.Name = "IRCConnectorThread"; m_irc_connector.IsBackground = true; @@ -106,12 +107,14 @@ namespace OpenSim.Region.Environment.Modules try { //m_irc.Connect(m_scenes); - if (m_irc_connector == null) { + if (m_irc_connector == null) + { m_irc_connector = new Thread(IRCConnectRun); m_irc_connector.Name = "IRCConnectorThread"; m_irc_connector.IsBackground = true; } - if (!m_irc_connector.IsAlive) { + if (!m_irc_connector.IsAlive) + { m_irc_connector.Start(); OpenSim.Framework.ThreadTracker.Add(m_irc_connector); } @@ -255,11 +258,14 @@ namespace OpenSim.Region.Environment.Modules // In a non-blocking way. Eventually the connector will get it started try { - if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); - m_irc_connector.Name = "IRCConnectorThread"; - m_irc_connector.IsBackground = true; + if (m_irc_connector == null) + { + m_irc_connector = new Thread(IRCConnectRun); + m_irc_connector.Name = "IRCConnectorThread"; + m_irc_connector.IsBackground = true; } - if (!m_irc_connector.IsAlive) { + if (!m_irc_connector.IsAlive) + { m_irc_connector.Start(); OpenSim.Framework.ThreadTracker.Add(m_irc_connector); } @@ -298,7 +304,6 @@ namespace OpenSim.Region.Environment.Modules if ((m_irc.Enabled)&&(!m_irc.Connected)) { m_irc.Connect(m_scenes); - } Thread.Sleep(15000); } @@ -625,15 +630,15 @@ namespace OpenSim.Region.Environment.Modules foreach (Scene m_scene in m_scenes) { m_scene.ForEachScenePresence(delegate(ScenePresence avatar) - { - if (!avatar.IsChildAgent) - { - avatar.ControllingClient.SendChatMessage( - Helpers.StringToField(message), 255, - pos, sender, - LLUUID.Zero); - } - }); + { + if (!avatar.IsChildAgent) + { + avatar.ControllingClient.SendChatMessage( + Helpers.StringToField(message), 255, + pos, sender, + LLUUID.Zero); + } + }); } } catch (Exception ex) // IRC gate should not crash Sim @@ -644,15 +649,15 @@ namespace OpenSim.Region.Environment.Modules public enum ErrorReplies { - NotRegistered = 451, // ":You have not registered" - NicknameInUse = 433 // " :Nickname is already in use" + NotRegistered = 451, // ":You have not registered" + NicknameInUse = 433 // " :Nickname is already in use" } public enum Replies { - MotdStart = 375, // ":- Message of the day - " - Motd = 372, // ":- " - EndOfMotd = 376 // ":End of /MOTD command" + MotdStart = 375, // ":- Message of the day - " + Motd = 372, // ":- " + EndOfMotd = 376 // ":End of /MOTD command" } public void ProcessIRCCommand(string command) diff --git a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs index 8bb903f..c0a00c9 100644 --- a/OpenSim/Region/Environment/Modules/VectorRenderModule.cs +++ b/OpenSim/Region/Environment/Modules/VectorRenderModule.cs @@ -126,41 +126,43 @@ namespace OpenSim.Region.Environment.Modules } - /* private void CairoDraw(string data, System.Drawing.Graphics graph) - { - using (Win32Surface draw = new Win32Surface(graph.GetHdc())) - { - Context contex = new Context(draw); - - contex.Antialias = Antialias.None; //fastest method but low quality - contex.LineWidth = 7; - char[] lineDelimiter = { ';' }; - char[] partsDelimiter = { ',' }; - string[] lines = data.Split(lineDelimiter); - - foreach (string line in lines) - { - string nextLine = line.Trim(); - - if (nextLine.StartsWith("MoveTO")) - { - float x = 0; - float y = 0; - GetParams(partsDelimiter, ref nextLine, ref x, ref y); - contex.MoveTo(x, y); - } - else if (nextLine.StartsWith("LineTo")) - { - float x = 0; - float y = 0; - GetParams(partsDelimiter, ref nextLine, ref x, ref y); - contex.LineTo(x, y); - contex.Stroke(); - } - } - } - graph.ReleaseHdc(); - }*/ +/* + private void CairoDraw(string data, System.Drawing.Graphics graph) + { + using (Win32Surface draw = new Win32Surface(graph.GetHdc())) + { + Context contex = new Context(draw); + + contex.Antialias = Antialias.None; //fastest method but low quality + contex.LineWidth = 7; + char[] lineDelimiter = { ';' }; + char[] partsDelimiter = { ',' }; + string[] lines = data.Split(lineDelimiter); + + foreach (string line in lines) + { + string nextLine = line.Trim(); + + if (nextLine.StartsWith("MoveTO")) + { + float x = 0; + float y = 0; + GetParams(partsDelimiter, ref nextLine, ref x, ref y); + contex.MoveTo(x, y); + } + else if (nextLine.StartsWith("LineTo")) + { + float x = 0; + float y = 0; + GetParams(partsDelimiter, ref nextLine, ref x, ref y); + contex.LineTo(x, y); + contex.Stroke(); + } + } + } + graph.ReleaseHdc(); + } +*/ private void GDIDraw(string data, System.Drawing.Graphics graph) { @@ -172,7 +174,6 @@ namespace OpenSim.Region.Environment.Modules char[] lineDelimiter = { ';' }; char[] partsDelimiter = { ',' }; string[] lines = data.Split(lineDelimiter); - foreach (string line in lines) { -- cgit v1.1