From 37b63636eecabe3569f09781f4bb5b319cd85e24 Mon Sep 17 00:00:00 2001 From: Dahlia Trimble Date: Sun, 18 Jan 2009 10:50:53 +0000 Subject: Added an optional password for the IRC module --- OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs') diff --git a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs index 1dec9a5..e1c0ac4 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Chat/IRCConnector.cs @@ -146,6 +146,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat get { return m_server; } set { m_server = value; } } + private string m_password = null; + public string Password + { + get { return m_password; } + set { m_password = value; } + } private string m_user = "USER OpenSimBot 8 * :I'm an OpenSim to IRC bot"; public string User @@ -183,6 +189,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat // Setup IRC session parameters m_server = cs.Server; + m_password = cs.Password; m_baseNick = cs.BaseNickname; m_randomizeNick = cs.RandomizeNickname; m_ircChannel = cs.IrcChannel; @@ -346,7 +353,8 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat ThreadTracker.Add(m_listener); // This is the message order recommended by RFC 2812 - + if (m_password != null) + m_writer.WriteLine(String.Format("PASS {0}", m_password)); m_writer.WriteLine(String.Format("NICK {0}", m_nick)); m_writer.Flush(); m_writer.WriteLine(m_user); -- cgit v1.1