From 8f0b03597b0bc8ea6873af9a55495407fae1ec56 Mon Sep 17 00:00:00 2001 From: lbsa71 Date: Wed, 19 Sep 2007 00:30:55 +0000 Subject: * Modernized ScriptManager to new interface-based module calls. * 'remove redundant this qualifier' ftw --- OpenSim/Region/Environment/Modules/ChatModule.cs | 50 ++++++++++++------------ 1 file changed, 24 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region/Environment/Modules/ChatModule.cs') 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 @@ -using System; -using System.Collections.Generic; -using System.Text; -using System.Net; -using System.Net.Sockets; -using System.Threading; -using System.IO; -using libsecondlife; -using OpenSim.Region.Environment.Scenes; -using OpenSim.Region.Environment.Interfaces; -using OpenSim.Framework.Interfaces; -using OpenSim.Framework.Utilities; -using OpenSim.Framework.Console; - +using System; +using System.IO; +using System.Net.Sockets; +using System.Threading; +using libsecondlife; +using OpenSim.Framework.Interfaces; +using OpenSim.Framework.Utilities; +using OpenSim.Region.Environment.Interfaces; +using OpenSim.Region.Environment.Scenes; + namespace OpenSim.Region.Environment.Modules { public class ChatModule : IRegionModule, ISimChat @@ -20,18 +16,18 @@ namespace OpenSim.Region.Environment.Modules private string m_server = "irc2.choopa.net"; - // private int m_port = 6668; + // private int m_port = 6668; //private string m_user = "USER OpenSimBot 8 * :I'm a OpenSim to irc bot"; private string m_nick = "OSimBot"; private string m_channel = "#opensim"; - // private NetworkStream m_stream; - private TcpClient m_irc; + // private NetworkStream m_stream; + private TcpClient m_irc; private StreamWriter m_ircWriter; - private StreamReader m_ircReader; + private StreamReader m_ircReader; - // private Thread pingSender; - // private Thread listener; + // private Thread pingSender; + // private Thread listener; private bool connected = false; @@ -127,16 +123,18 @@ namespace OpenSim.Region.Environment.Modules { string mess = inputLine.Substring(inputLine.IndexOf(m_channel)); m_scene.ForEachScenePresence(delegate(ScenePresence presence) - { - presence.ControllingClient.SendChatMessage(Helpers.StringToField(mess), 255, pos, "IRC:", - LLUUID.Zero); - }); + { + presence.ControllingClient.SendChatMessage( + Helpers.StringToField(mess), 255, pos, "IRC:", + LLUUID.Zero); + }); } } } } - public void SimChat(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName, LLUUID fromAgentID) + public void SimChat(byte[] message, byte type, int channel, LLVector3 fromPos, string fromName, + LLUUID fromAgentID) { ScenePresence avatar = null; avatar = m_scene.RequestAvatar(fromAgentID); @@ -213,4 +211,4 @@ namespace OpenSim.Region.Environment.Modules } } } -} +} \ No newline at end of file -- cgit v1.1