* More Tweaks

0.6.6-post-fixes
Adam Frisby 2009-05-30 04:07:58 +00:00
parent 29bc2962ad
commit 1bb98a1eb0
3 changed files with 44 additions and 9 deletions

View File

@ -1,4 +1,6 @@
using System.Net;
using System.Reflection;
using log4net;
using Nini.Config;
using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes;
@ -8,6 +10,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
{
class IRCStackModule : IRegionModule
{
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IRCServer m_server;
private Scene m_scene;
@ -22,7 +26,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
void m_server_OnNewIRCClient(IRCClientView user)
{
m_scene.AddNewClient(user);
m_log.Info("[IRCd] Adding user...");
m_scene.ClientManager.Add(user.CircuitCode, user);
user.Start();
m_log.Info("[IRCd] Added user to Scene");
}
public void PostInitialise()

View File

@ -200,6 +200,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
{
IRC_SendReplyTopic();
IRC_SendNamesReply();
IRC_SendChannelPrivmsg("System", "Welcome to Zork^H^H^H OpenSimulator.");
IRC_SendChannelPrivmsg("System", "You are in an open field west of a big white house");
IRC_SendChannelPrivmsg("System", "with a boarded front door.");
}
}
@ -400,12 +403,16 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public void Disconnect(string reason)
{
IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")");
m_connected = false;
m_client.Close();
}
public void Disconnect()
{
IRC_SendChannelPrivmsg("System", "You have been eaten by a grue.");
m_connected = false;
m_client.Close();
}
@ -713,7 +720,33 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public void Start()
{
Scene.AddNewClient(this);
// Mimicking LLClientView which gets always set appearance from client.
Scene scene = (Scene)Scene;
AvatarAppearance appearance;
scene.GetAvatarAppearance(this, out appearance);
List<byte> visualParams = new List<byte>();
foreach (byte visualParam in appearance.VisualParams)
{
visualParams.Add(visualParam);
}
OnSetAppearance(appearance.Texture.GetBytes(), visualParams);
}
public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
{
m_log.Info("[MXP ClientStack] Completing Handshake to Region");
if (OnRegionHandShakeReply != null)
{
OnRegionHandShakeReply(this);
}
if (OnCompleteMovementToRegion != null)
{
OnCompleteMovementToRegion();
}
}
public void Stop()
@ -746,11 +779,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
}
public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args)
{
}
public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible)
{
IRC_SendChannelPrivmsg(fromName, message);

View File

@ -21,8 +21,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
public event OnNewIRCUserDelegate OnNewIRCClient;
private TcpListener m_listener;
private Scene m_baseScene;
private readonly TcpListener m_listener;
private readonly Scene m_baseScene;
private bool m_running = true;
public IRCServer(IPAddress listener, int port, Scene baseScene)