diff options
author | Jeff Ames | 2008-03-18 15:30:38 +0000 |
---|---|---|
committer | Jeff Ames | 2008-03-18 15:30:38 +0000 |
commit | e5b91442822df211f9f8277aaf0c40e1339810f3 (patch) | |
tree | 116ac977981e7bea0b7dd4c8f9cbad87e02c5b65 /OpenSim/Region/Environment/Modules | |
parent | * Applying Mantis Patch #518.2 - State not persisted in MySQL DataStore (diff) | |
download | opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.zip opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.gz opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.bz2 opensim-SC-e5b91442822df211f9f8277aaf0c40e1339810f3.tar.xz |
Formatting cleanup.
Diffstat (limited to 'OpenSim/Region/Environment/Modules')
-rw-r--r-- | OpenSim/Region/Environment/Modules/ChatModule.cs | 49 | ||||
-rw-r--r-- | OpenSim/Region/Environment/Modules/VectorRenderModule.cs | 73 |
2 files changed, 64 insertions, 58 deletions
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 | |||
91 | 91 | ||
92 | // setup IRC Relay | 92 | // setup IRC Relay |
93 | if (m_irc == null) { m_irc = new IRCChatModule(config); } | 93 | if (m_irc == null) { m_irc = new IRCChatModule(config); } |
94 | if (m_irc_connector == null) { | 94 | if (m_irc_connector == null) |
95 | { | ||
95 | m_irc_connector = new Thread(IRCConnectRun); | 96 | m_irc_connector = new Thread(IRCConnectRun); |
96 | m_irc_connector.Name = "IRCConnectorThread"; | 97 | m_irc_connector.Name = "IRCConnectorThread"; |
97 | m_irc_connector.IsBackground = true; | 98 | m_irc_connector.IsBackground = true; |
@@ -106,12 +107,14 @@ namespace OpenSim.Region.Environment.Modules | |||
106 | try | 107 | try |
107 | { | 108 | { |
108 | //m_irc.Connect(m_scenes); | 109 | //m_irc.Connect(m_scenes); |
109 | if (m_irc_connector == null) { | 110 | if (m_irc_connector == null) |
111 | { | ||
110 | m_irc_connector = new Thread(IRCConnectRun); | 112 | m_irc_connector = new Thread(IRCConnectRun); |
111 | m_irc_connector.Name = "IRCConnectorThread"; | 113 | m_irc_connector.Name = "IRCConnectorThread"; |
112 | m_irc_connector.IsBackground = true; | 114 | m_irc_connector.IsBackground = true; |
113 | } | 115 | } |
114 | if (!m_irc_connector.IsAlive) { | 116 | if (!m_irc_connector.IsAlive) |
117 | { | ||
115 | m_irc_connector.Start(); | 118 | m_irc_connector.Start(); |
116 | OpenSim.Framework.ThreadTracker.Add(m_irc_connector); | 119 | OpenSim.Framework.ThreadTracker.Add(m_irc_connector); |
117 | } | 120 | } |
@@ -255,11 +258,14 @@ namespace OpenSim.Region.Environment.Modules | |||
255 | // In a non-blocking way. Eventually the connector will get it started | 258 | // In a non-blocking way. Eventually the connector will get it started |
256 | try | 259 | try |
257 | { | 260 | { |
258 | if (m_irc_connector == null) { m_irc_connector = new Thread(IRCConnectRun); | 261 | if (m_irc_connector == null) |
259 | m_irc_connector.Name = "IRCConnectorThread"; | 262 | { |
260 | m_irc_connector.IsBackground = true; | 263 | m_irc_connector = new Thread(IRCConnectRun); |
264 | m_irc_connector.Name = "IRCConnectorThread"; | ||
265 | m_irc_connector.IsBackground = true; | ||
261 | } | 266 | } |
262 | if (!m_irc_connector.IsAlive) { | 267 | if (!m_irc_connector.IsAlive) |
268 | { | ||
263 | m_irc_connector.Start(); | 269 | m_irc_connector.Start(); |
264 | OpenSim.Framework.ThreadTracker.Add(m_irc_connector); | 270 | OpenSim.Framework.ThreadTracker.Add(m_irc_connector); |
265 | } | 271 | } |
@@ -298,7 +304,6 @@ namespace OpenSim.Region.Environment.Modules | |||
298 | if ((m_irc.Enabled)&&(!m_irc.Connected)) | 304 | if ((m_irc.Enabled)&&(!m_irc.Connected)) |
299 | { | 305 | { |
300 | m_irc.Connect(m_scenes); | 306 | m_irc.Connect(m_scenes); |
301 | |||
302 | } | 307 | } |
303 | Thread.Sleep(15000); | 308 | Thread.Sleep(15000); |
304 | } | 309 | } |
@@ -625,15 +630,15 @@ namespace OpenSim.Region.Environment.Modules | |||
625 | foreach (Scene m_scene in m_scenes) | 630 | foreach (Scene m_scene in m_scenes) |
626 | { | 631 | { |
627 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) | 632 | m_scene.ForEachScenePresence(delegate(ScenePresence avatar) |
628 | { | 633 | { |
629 | if (!avatar.IsChildAgent) | 634 | if (!avatar.IsChildAgent) |
630 | { | 635 | { |
631 | avatar.ControllingClient.SendChatMessage( | 636 | avatar.ControllingClient.SendChatMessage( |
632 | Helpers.StringToField(message), 255, | 637 | Helpers.StringToField(message), 255, |
633 | pos, sender, | 638 | pos, sender, |
634 | LLUUID.Zero); | 639 | LLUUID.Zero); |
635 | } | 640 | } |
636 | }); | 641 | }); |
637 | } | 642 | } |
638 | } | 643 | } |
639 | catch (Exception ex) // IRC gate should not crash Sim | 644 | catch (Exception ex) // IRC gate should not crash Sim |
@@ -644,15 +649,15 @@ namespace OpenSim.Region.Environment.Modules | |||
644 | 649 | ||
645 | public enum ErrorReplies | 650 | public enum ErrorReplies |
646 | { | 651 | { |
647 | NotRegistered = 451, // ":You have not registered" | 652 | NotRegistered = 451, // ":You have not registered" |
648 | NicknameInUse = 433 // "<nick> :Nickname is already in use" | 653 | NicknameInUse = 433 // "<nick> :Nickname is already in use" |
649 | } | 654 | } |
650 | 655 | ||
651 | public enum Replies | 656 | public enum Replies |
652 | { | 657 | { |
653 | MotdStart = 375, // ":- <server> Message of the day - " | 658 | MotdStart = 375, // ":- <server> Message of the day - " |
654 | Motd = 372, // ":- <text>" | 659 | Motd = 372, // ":- <text>" |
655 | EndOfMotd = 376 // ":End of /MOTD command" | 660 | EndOfMotd = 376 // ":End of /MOTD command" |
656 | } | 661 | } |
657 | 662 | ||
658 | public void ProcessIRCCommand(string command) | 663 | 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 | |||
126 | 126 | ||
127 | } | 127 | } |
128 | 128 | ||
129 | /* private void CairoDraw(string data, System.Drawing.Graphics graph) | 129 | /* |
130 | { | 130 | private void CairoDraw(string data, System.Drawing.Graphics graph) |
131 | using (Win32Surface draw = new Win32Surface(graph.GetHdc())) | 131 | { |
132 | { | 132 | using (Win32Surface draw = new Win32Surface(graph.GetHdc())) |
133 | Context contex = new Context(draw); | 133 | { |
134 | 134 | Context contex = new Context(draw); | |
135 | contex.Antialias = Antialias.None; //fastest method but low quality | 135 | |
136 | contex.LineWidth = 7; | 136 | contex.Antialias = Antialias.None; //fastest method but low quality |
137 | char[] lineDelimiter = { ';' }; | 137 | contex.LineWidth = 7; |
138 | char[] partsDelimiter = { ',' }; | 138 | char[] lineDelimiter = { ';' }; |
139 | string[] lines = data.Split(lineDelimiter); | 139 | char[] partsDelimiter = { ',' }; |
140 | 140 | string[] lines = data.Split(lineDelimiter); | |
141 | foreach (string line in lines) | 141 | |
142 | { | 142 | foreach (string line in lines) |
143 | string nextLine = line.Trim(); | 143 | { |
144 | 144 | string nextLine = line.Trim(); | |
145 | if (nextLine.StartsWith("MoveTO")) | 145 | |
146 | { | 146 | if (nextLine.StartsWith("MoveTO")) |
147 | float x = 0; | 147 | { |
148 | float y = 0; | 148 | float x = 0; |
149 | GetParams(partsDelimiter, ref nextLine, ref x, ref y); | 149 | float y = 0; |
150 | contex.MoveTo(x, y); | 150 | GetParams(partsDelimiter, ref nextLine, ref x, ref y); |
151 | } | 151 | contex.MoveTo(x, y); |
152 | else if (nextLine.StartsWith("LineTo")) | 152 | } |
153 | { | 153 | else if (nextLine.StartsWith("LineTo")) |
154 | float x = 0; | 154 | { |
155 | float y = 0; | 155 | float x = 0; |
156 | GetParams(partsDelimiter, ref nextLine, ref x, ref y); | 156 | float y = 0; |
157 | contex.LineTo(x, y); | 157 | GetParams(partsDelimiter, ref nextLine, ref x, ref y); |
158 | contex.Stroke(); | 158 | contex.LineTo(x, y); |
159 | } | 159 | contex.Stroke(); |
160 | } | 160 | } |
161 | } | 161 | } |
162 | graph.ReleaseHdc(); | 162 | } |
163 | }*/ | 163 | graph.ReleaseHdc(); |
164 | } | ||
165 | */ | ||
164 | 166 | ||
165 | private void GDIDraw(string data, System.Drawing.Graphics graph) | 167 | private void GDIDraw(string data, System.Drawing.Graphics graph) |
166 | { | 168 | { |
@@ -172,7 +174,6 @@ namespace OpenSim.Region.Environment.Modules | |||
172 | char[] lineDelimiter = { ';' }; | 174 | char[] lineDelimiter = { ';' }; |
173 | char[] partsDelimiter = { ',' }; | 175 | char[] partsDelimiter = { ',' }; |
174 | string[] lines = data.Split(lineDelimiter); | 176 | string[] lines = data.Split(lineDelimiter); |
175 | |||
176 | 177 | ||
177 | foreach (string line in lines) | 178 | foreach (string line in lines) |
178 | { | 179 | { |