diff options
author | Adam Frisby | 2009-05-30 04:07:58 +0000 |
---|---|---|
committer | Adam Frisby | 2009-05-30 04:07:58 +0000 |
commit | 1bb98a1eb0f15da904657bc625b27751314af8dc (patch) | |
tree | a143981f195ff0691c8bace2d7cf34eb83f39434 | |
parent | * More IRCClientView fiddling. Now implements IClientAPI & IClientCore. (diff) | |
download | opensim-SC-1bb98a1eb0f15da904657bc625b27751314af8dc.zip opensim-SC-1bb98a1eb0f15da904657bc625b27751314af8dc.tar.gz opensim-SC-1bb98a1eb0f15da904657bc625b27751314af8dc.tar.bz2 opensim-SC-1bb98a1eb0f15da904657bc625b27751314af8dc.tar.xz |
* More Tweaks
3 files changed, 44 insertions, 9 deletions
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 1c23c66..c807d7f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | |||
@@ -1,4 +1,6 @@ | |||
1 | using System.Net; | 1 | using System.Net; |
2 | using System.Reflection; | ||
3 | using log4net; | ||
2 | using Nini.Config; | 4 | using Nini.Config; |
3 | using OpenSim.Region.Framework.Interfaces; | 5 | using OpenSim.Region.Framework.Interfaces; |
4 | using OpenSim.Region.Framework.Scenes; | 6 | using OpenSim.Region.Framework.Scenes; |
@@ -8,6 +10,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView | |||
8 | { | 10 | { |
9 | class IRCStackModule : IRegionModule | 11 | class IRCStackModule : IRegionModule |
10 | { | 12 | { |
13 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | ||
14 | |||
11 | private IRCServer m_server; | 15 | private IRCServer m_server; |
12 | private Scene m_scene; | 16 | private Scene m_scene; |
13 | 17 | ||
@@ -22,7 +26,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView | |||
22 | 26 | ||
23 | void m_server_OnNewIRCClient(IRCClientView user) | 27 | void m_server_OnNewIRCClient(IRCClientView user) |
24 | { | 28 | { |
25 | m_scene.AddNewClient(user); | 29 | m_log.Info("[IRCd] Adding user..."); |
30 | m_scene.ClientManager.Add(user.CircuitCode, user); | ||
31 | user.Start(); | ||
32 | m_log.Info("[IRCd] Added user to Scene"); | ||
26 | } | 33 | } |
27 | 34 | ||
28 | public void PostInitialise() | 35 | public void PostInitialise() |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index c3bc5ad..e87749c 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs | |||
@@ -200,6 +200,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
200 | { | 200 | { |
201 | IRC_SendReplyTopic(); | 201 | IRC_SendReplyTopic(); |
202 | IRC_SendNamesReply(); | 202 | IRC_SendNamesReply(); |
203 | IRC_SendChannelPrivmsg("System", "Welcome to Zork^H^H^H OpenSimulator."); | ||
204 | IRC_SendChannelPrivmsg("System", "You are in an open field west of a big white house"); | ||
205 | IRC_SendChannelPrivmsg("System", "with a boarded front door."); | ||
203 | } | 206 | } |
204 | } | 207 | } |
205 | 208 | ||
@@ -400,12 +403,16 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
400 | 403 | ||
401 | public void Disconnect(string reason) | 404 | public void Disconnect(string reason) |
402 | { | 405 | { |
406 | IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")"); | ||
407 | |||
403 | m_connected = false; | 408 | m_connected = false; |
404 | m_client.Close(); | 409 | m_client.Close(); |
405 | } | 410 | } |
406 | 411 | ||
407 | public void Disconnect() | 412 | public void Disconnect() |
408 | { | 413 | { |
414 | IRC_SendChannelPrivmsg("System", "You have been eaten by a grue."); | ||
415 | |||
409 | m_connected = false; | 416 | m_connected = false; |
410 | m_client.Close(); | 417 | m_client.Close(); |
411 | } | 418 | } |
@@ -713,7 +720,33 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
713 | 720 | ||
714 | public void Start() | 721 | public void Start() |
715 | { | 722 | { |
716 | 723 | Scene.AddNewClient(this); | |
724 | |||
725 | // Mimicking LLClientView which gets always set appearance from client. | ||
726 | Scene scene = (Scene)Scene; | ||
727 | AvatarAppearance appearance; | ||
728 | scene.GetAvatarAppearance(this, out appearance); | ||
729 | List<byte> visualParams = new List<byte>(); | ||
730 | foreach (byte visualParam in appearance.VisualParams) | ||
731 | { | ||
732 | visualParams.Add(visualParam); | ||
733 | } | ||
734 | OnSetAppearance(appearance.Texture.GetBytes(), visualParams); | ||
735 | } | ||
736 | |||
737 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) | ||
738 | { | ||
739 | m_log.Info("[MXP ClientStack] Completing Handshake to Region"); | ||
740 | |||
741 | if (OnRegionHandShakeReply != null) | ||
742 | { | ||
743 | OnRegionHandShakeReply(this); | ||
744 | } | ||
745 | |||
746 | if (OnCompleteMovementToRegion != null) | ||
747 | { | ||
748 | OnCompleteMovementToRegion(); | ||
749 | } | ||
717 | } | 750 | } |
718 | 751 | ||
719 | public void Stop() | 752 | public void Stop() |
@@ -746,11 +779,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
746 | 779 | ||
747 | } | 780 | } |
748 | 781 | ||
749 | public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) | ||
750 | { | ||
751 | |||
752 | } | ||
753 | |||
754 | public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) | 782 | public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) |
755 | { | 783 | { |
756 | IRC_SendChannelPrivmsg(fromName, message); | 784 | IRC_SendChannelPrivmsg(fromName, message); |
diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs index 23c213f..b8f5afa 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs | |||
@@ -21,8 +21,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server | |||
21 | 21 | ||
22 | public event OnNewIRCUserDelegate OnNewIRCClient; | 22 | public event OnNewIRCUserDelegate OnNewIRCClient; |
23 | 23 | ||
24 | private TcpListener m_listener; | 24 | private readonly TcpListener m_listener; |
25 | private Scene m_baseScene; | 25 | private readonly Scene m_baseScene; |
26 | private bool m_running = true; | 26 | private bool m_running = true; |
27 | 27 | ||
28 | public IRCServer(IPAddress listener, int port, Scene baseScene) | 28 | public IRCServer(IPAddress listener, int port, Scene baseScene) |