Update svn properties.

0.6.6-post-fixes
Jeff Ames 2009-05-31 16:26:18 +00:00
parent dc15190365
commit db2c4ab94c
7 changed files with 2376 additions and 2376 deletions

File diff suppressed because it is too large Load Diff

View File

@ -1,123 +1,123 @@
using System; using System;
using System.Collections; using System.Collections;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using Nwc.XmlRpc; using Nwc.XmlRpc;
using OpenMetaverse; using OpenMetaverse;
using OpenSim.Framework; using OpenSim.Framework;
using OpenSim.Framework.Communications; using OpenSim.Framework.Communications;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.CoreModules.InterGrid namespace OpenSim.Region.CoreModules.InterGrid
{ {
public class OGSRadmin : IRegionModule public class OGSRadmin : IRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private readonly List<Scene> m_scenes = new List<Scene>(); private readonly List<Scene> m_scenes = new List<Scene>();
private CommunicationsManager m_com; private CommunicationsManager m_com;
private IConfigSource m_settings; private IConfigSource m_settings;
#region Implementation of IRegionModuleBase #region Implementation of IRegionModuleBase
public string Name public string Name
{ {
get { return "OGS Supporting RAdmin"; } get { return "OGS Supporting RAdmin"; }
} }
public void Initialise(IConfigSource source) public void Initialise(IConfigSource source)
{ {
m_settings = source; m_settings = source;
} }
public void Close() public void Close()
{ {
} }
public void AddRegion(Scene scene) public void AddRegion(Scene scene)
{ {
lock(m_scenes) lock(m_scenes)
m_scenes.Add(scene); m_scenes.Add(scene);
} }
public void RemoveRegion(Scene scene) public void RemoveRegion(Scene scene)
{ {
lock (m_scenes) lock (m_scenes)
m_scenes.Remove(scene); m_scenes.Remove(scene);
} }
public void RegionLoaded(Scene scene) public void RegionLoaded(Scene scene)
{ {
} }
public void PostInitialise() public void PostInitialise()
{ {
if (m_settings.Configs["Startup"].GetBoolean("gridmode", false)) if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
{ {
m_com = m_scenes[0].CommsManager; m_com = m_scenes[0].CommsManager;
m_com.HttpServer.AddXmlRPCHandler("grid_message", GridWideMessage); m_com.HttpServer.AddXmlRPCHandler("grid_message", GridWideMessage);
} }
} }
#endregion #endregion
#region IRegionModule #region IRegionModule
public void Initialise(Scene scene, IConfigSource source) public void Initialise(Scene scene, IConfigSource source)
{ {
m_settings = source; m_settings = source;
lock (m_scenes) lock (m_scenes)
m_scenes.Add(scene); m_scenes.Add(scene);
} }
public bool IsSharedModule public bool IsSharedModule
{ {
get { return true; } get { return true; }
} }
#endregion #endregion
public XmlRpcResponse GridWideMessage(XmlRpcRequest req, IPEndPoint remoteClient) public XmlRpcResponse GridWideMessage(XmlRpcRequest req, IPEndPoint remoteClient)
{ {
XmlRpcResponse response = new XmlRpcResponse(); XmlRpcResponse response = new XmlRpcResponse();
Hashtable responseData = new Hashtable(); Hashtable responseData = new Hashtable();
Hashtable requestData = (Hashtable)req.Params[0]; Hashtable requestData = (Hashtable)req.Params[0];
if ((!requestData.Contains("password") || (string)requestData["password"] != m_com.NetworkServersInfo.GridRecvKey)) if ((!requestData.Contains("password") || (string)requestData["password"] != m_com.NetworkServersInfo.GridRecvKey))
{ {
responseData["accepted"] = false; responseData["accepted"] = false;
responseData["success"] = false; responseData["success"] = false;
responseData["error"] = "Invalid Key"; responseData["error"] = "Invalid Key";
response.Value = responseData; response.Value = responseData;
return response; return response;
} }
string message = (string)requestData["message"]; string message = (string)requestData["message"];
string user = (string)requestData["user"]; string user = (string)requestData["user"];
m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message); m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message);
lock(m_scenes) lock(m_scenes)
foreach (Scene scene in m_scenes) foreach (Scene scene in m_scenes)
{ {
IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>(); IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>();
if (dialogModule != null) if (dialogModule != null)
dialogModule.SendNotificationToUsersInRegion(UUID.Random(), user, message); dialogModule.SendNotificationToUsersInRegion(UUID.Random(), user, message);
} }
responseData["accepted"] = true; responseData["accepted"] = true;
responseData["success"] = true; responseData["success"] = true;
response.Value = responseData; response.Value = responseData;
return response; return response;
} }
} }
} }

View File

@ -1,66 +1,66 @@
using System.Net; using System.Net;
using System.Reflection; using System.Reflection;
using log4net; using log4net;
using Nini.Config; using Nini.Config;
using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Interfaces;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server;
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
{ {
public class IRCStackModule : IRegionModule public class IRCStackModule : IRegionModule
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
private IRCServer m_server; private IRCServer m_server;
private Scene m_scene; private Scene m_scene;
#region Implementation of IRegionModule #region Implementation of IRegionModule
public void Initialise(Scene scene, IConfigSource source) public void Initialise(Scene scene, IConfigSource source)
{ {
if (null != source.Configs["IRCd"] && if (null != source.Configs["IRCd"] &&
source.Configs["IRCd"].GetBoolean("Enabled",false)) source.Configs["IRCd"].GetBoolean("Enabled",false))
{ {
m_scene = scene; m_scene = scene;
m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene); m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene);
m_server.OnNewIRCClient += m_server_OnNewIRCClient; m_server.OnNewIRCClient += m_server_OnNewIRCClient;
} }
} }
void m_server_OnNewIRCClient(IRCClientView user) void m_server_OnNewIRCClient(IRCClientView user)
{ {
user.OnIRCReady += user_OnIRCReady; user.OnIRCReady += user_OnIRCReady;
} }
void user_OnIRCReady(IRCClientView cv) void user_OnIRCReady(IRCClientView cv)
{ {
m_log.Info("[IRCd] Adding user..."); m_log.Info("[IRCd] Adding user...");
m_scene.ClientManager.Add(cv.CircuitCode, cv); m_scene.ClientManager.Add(cv.CircuitCode, cv);
cv.Start(); cv.Start();
m_log.Info("[IRCd] Added user to Scene"); m_log.Info("[IRCd] Added user to Scene");
} }
public void PostInitialise() public void PostInitialise()
{ {
} }
public void Close() public void Close()
{ {
} }
public string Name public string Name
{ {
get { return "IRCClientStackModule"; } get { return "IRCClientStackModule"; }
} }
public bool IsSharedModule public bool IsSharedModule
{ {
get { return false; } get { return false; }
} }
#endregion #endregion
} }
} }

View File

@ -1,61 +1,61 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Net; using System.Net;
using System.Net.Sockets; using System.Net.Sockets;
using System.Reflection; using System.Reflection;
using System.Text; using System.Text;
using System.Threading; using System.Threading;
using log4net; using log4net;
using OpenSim.Region.Framework.Scenes; using OpenSim.Region.Framework.Scenes;
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
{ {
public delegate void OnNewIRCUserDelegate(IRCClientView user); public delegate void OnNewIRCUserDelegate(IRCClientView user);
/// <summary> /// <summary>
/// Adam's completely hacked up not-probably-compliant RFC1459 server class. /// Adam's completely hacked up not-probably-compliant RFC1459 server class.
/// </summary> /// </summary>
class IRCServer class IRCServer
{ {
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
public event OnNewIRCUserDelegate OnNewIRCClient; public event OnNewIRCUserDelegate OnNewIRCClient;
private readonly TcpListener m_listener; private readonly TcpListener m_listener;
private readonly Scene m_baseScene; private readonly Scene m_baseScene;
private bool m_running = true; private bool m_running = true;
public IRCServer(IPAddress listener, int port, Scene baseScene) public IRCServer(IPAddress listener, int port, Scene baseScene)
{ {
m_listener = new TcpListener(listener, port); m_listener = new TcpListener(listener, port);
m_listener.Start(50); m_listener.Start(50);
Thread thread = new Thread(ListenLoop); Thread thread = new Thread(ListenLoop);
thread.Start(); thread.Start();
m_baseScene = baseScene; m_baseScene = baseScene;
} }
public void Stop() public void Stop()
{ {
m_running = false; m_running = false;
m_listener.Stop(); m_listener.Stop();
} }
private void ListenLoop() private void ListenLoop()
{ {
while(m_running) while(m_running)
{ {
AcceptClient(m_listener.AcceptTcpClient()); AcceptClient(m_listener.AcceptTcpClient());
} }
} }
private void AcceptClient(TcpClient client) private void AcceptClient(TcpClient client)
{ {
IRCClientView cv = new IRCClientView(client, m_baseScene); IRCClientView cv = new IRCClientView(client, m_baseScene);
if (OnNewIRCClient != null) if (OnNewIRCClient != null)
OnNewIRCClient(cv); OnNewIRCClient(cv);
} }
} }
} }

View File

@ -1,12 +1,12 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using OpenMetaverse; using OpenMetaverse;
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
{ {
public interface IObjectSound public interface IObjectSound
{ {
void Play(UUID soundAsset, double volume); void Play(UUID soundAsset, double volume);
} }
} }

View File

@ -1,13 +1,13 @@
using System; using System;
using System.Collections.Generic; using System.Collections.Generic;
using System.Text; using System.Text;
using OpenMetaverse; using OpenMetaverse;
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.WorldX namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.WorldX
{ {
public interface IWorldAudio public interface IWorldAudio
{ {
void PlaySound(UUID audio, Vector3 position, double volume); void PlaySound(UUID audio, Vector3 position, double volume);
void PlaySound(UUID audio, Vector3 position); void PlaySound(UUID audio, Vector3 position);
} }
} }