Mantis#1718. Thank you kindly, Mircea for a patch that:
Adds some IRC bridge improvement.0.6.0-stable
parent
132b95ec95
commit
0b28cf84f1
|
@ -309,6 +309,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
|||
// but filters out multiple reports
|
||||
if (clientName != m_last_leaving_user)
|
||||
{
|
||||
Console.WriteLine("Avatar was seen logging out.");
|
||||
Console.ReadLine();
|
||||
Console.WriteLine();
|
||||
m_last_leaving_user = clientName;
|
||||
m_irc.PrivMsg(m_irc.Nick, "Sim", String.Format("notices {0} logging out", clientName));
|
||||
m_log.InfoFormat("[IRC]: {0} logging out", clientName);
|
||||
|
@ -367,6 +370,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
|||
|
||||
private string m_basenick = null;
|
||||
private string m_channel = null;
|
||||
private bool m_nrnick = false;
|
||||
private bool m_connected = false;
|
||||
private bool m_enabled = false;
|
||||
private List<Scene> m_last_scenes = null;
|
||||
|
@ -380,7 +384,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
|||
private NetworkStream m_stream;
|
||||
internal object m_syncConnect = new object();
|
||||
private TcpClient m_tcp;
|
||||
private string m_user = "USER OpenSimBot 8 * :I'm an OpenSim to irc bot";
|
||||
private string m_user = "USER OpenSimBot 8 * :I'm an OpenSim to IRC bot";
|
||||
private StreamWriter m_writer;
|
||||
|
||||
private Thread pingSender;
|
||||
|
@ -418,13 +422,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
|||
m_server = config.Configs["IRC"].GetString("server");
|
||||
m_nick = config.Configs["IRC"].GetString("nick");
|
||||
m_basenick = m_nick;
|
||||
m_nrnick = config.Configs["IRC"].GetBoolean("nicknum");
|
||||
m_channel = config.Configs["IRC"].GetString("channel");
|
||||
m_port = (uint)config.Configs["IRC"].GetInt("port", (int)m_port);
|
||||
m_user = config.Configs["IRC"].GetString("username", m_user);
|
||||
m_privmsgformat = config.Configs["IRC"].GetString("msgformat", m_privmsgformat);
|
||||
if (m_server != null && m_nick != null && m_channel != null)
|
||||
{
|
||||
if (m_nrnick == true)
|
||||
{
|
||||
m_nick = m_nick + Util.RandomClass.Next(1, 99);
|
||||
}
|
||||
m_enabled = true;
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue