Update svn properties.
parent
dc15190365
commit
db2c4ab94c
File diff suppressed because it is too large
Load Diff
|
@ -1,123 +1,123 @@
|
|||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.InterGrid
|
||||
{
|
||||
public class OGSRadmin : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||
private CommunicationsManager m_com;
|
||||
private IConfigSource m_settings;
|
||||
|
||||
#region Implementation of IRegionModuleBase
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "OGS Supporting RAdmin"; }
|
||||
}
|
||||
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
m_settings = source;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
lock(m_scenes)
|
||||
m_scenes.Add(scene);
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
lock (m_scenes)
|
||||
m_scenes.Remove(scene);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
|
||||
{
|
||||
m_com = m_scenes[0].CommsManager;
|
||||
m_com.HttpServer.AddXmlRPCHandler("grid_message", GridWideMessage);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRegionModule
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_settings = source;
|
||||
|
||||
lock (m_scenes)
|
||||
m_scenes.Add(scene);
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public XmlRpcResponse GridWideMessage(XmlRpcRequest req, IPEndPoint remoteClient)
|
||||
{
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable responseData = new Hashtable();
|
||||
|
||||
Hashtable requestData = (Hashtable)req.Params[0];
|
||||
|
||||
if ((!requestData.Contains("password") || (string)requestData["password"] != m_com.NetworkServersInfo.GridRecvKey))
|
||||
{
|
||||
responseData["accepted"] = false;
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = "Invalid Key";
|
||||
response.Value = responseData;
|
||||
return response;
|
||||
}
|
||||
|
||||
string message = (string)requestData["message"];
|
||||
string user = (string)requestData["user"];
|
||||
m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message);
|
||||
|
||||
lock(m_scenes)
|
||||
foreach (Scene scene in m_scenes)
|
||||
{
|
||||
IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>();
|
||||
if (dialogModule != null)
|
||||
dialogModule.SendNotificationToUsersInRegion(UUID.Random(), user, message);
|
||||
}
|
||||
|
||||
responseData["accepted"] = true;
|
||||
responseData["success"] = true;
|
||||
response.Value = responseData;
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using Nwc.XmlRpc;
|
||||
using OpenMetaverse;
|
||||
using OpenSim.Framework;
|
||||
using OpenSim.Framework.Communications;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.CoreModules.InterGrid
|
||||
{
|
||||
public class OGSRadmin : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
private readonly List<Scene> m_scenes = new List<Scene>();
|
||||
private CommunicationsManager m_com;
|
||||
private IConfigSource m_settings;
|
||||
|
||||
#region Implementation of IRegionModuleBase
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "OGS Supporting RAdmin"; }
|
||||
}
|
||||
|
||||
|
||||
public void Initialise(IConfigSource source)
|
||||
{
|
||||
m_settings = source;
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void AddRegion(Scene scene)
|
||||
{
|
||||
lock(m_scenes)
|
||||
m_scenes.Add(scene);
|
||||
}
|
||||
|
||||
public void RemoveRegion(Scene scene)
|
||||
{
|
||||
lock (m_scenes)
|
||||
m_scenes.Remove(scene);
|
||||
}
|
||||
|
||||
public void RegionLoaded(Scene scene)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
if (m_settings.Configs["Startup"].GetBoolean("gridmode", false))
|
||||
{
|
||||
m_com = m_scenes[0].CommsManager;
|
||||
m_com.HttpServer.AddXmlRPCHandler("grid_message", GridWideMessage);
|
||||
}
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
#region IRegionModule
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_settings = source;
|
||||
|
||||
lock (m_scenes)
|
||||
m_scenes.Add(scene);
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return true; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
|
||||
public XmlRpcResponse GridWideMessage(XmlRpcRequest req, IPEndPoint remoteClient)
|
||||
{
|
||||
XmlRpcResponse response = new XmlRpcResponse();
|
||||
Hashtable responseData = new Hashtable();
|
||||
|
||||
Hashtable requestData = (Hashtable)req.Params[0];
|
||||
|
||||
if ((!requestData.Contains("password") || (string)requestData["password"] != m_com.NetworkServersInfo.GridRecvKey))
|
||||
{
|
||||
responseData["accepted"] = false;
|
||||
responseData["success"] = false;
|
||||
responseData["error"] = "Invalid Key";
|
||||
response.Value = responseData;
|
||||
return response;
|
||||
}
|
||||
|
||||
string message = (string)requestData["message"];
|
||||
string user = (string)requestData["user"];
|
||||
m_log.InfoFormat("[RADMIN]: Broadcasting: {0}", message);
|
||||
|
||||
lock(m_scenes)
|
||||
foreach (Scene scene in m_scenes)
|
||||
{
|
||||
IDialogModule dialogModule = scene.RequestModuleInterface<IDialogModule>();
|
||||
if (dialogModule != null)
|
||||
dialogModule.SendNotificationToUsersInRegion(UUID.Random(), user, message);
|
||||
}
|
||||
|
||||
responseData["accepted"] = true;
|
||||
responseData["success"] = true;
|
||||
response.Value = responseData;
|
||||
|
||||
return response;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,66 +1,66 @@
|
|||
using System.Net;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
||||
{
|
||||
public class IRCStackModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IRCServer m_server;
|
||||
private Scene m_scene;
|
||||
|
||||
#region Implementation of IRegionModule
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (null != source.Configs["IRCd"] &&
|
||||
source.Configs["IRCd"].GetBoolean("Enabled",false))
|
||||
{
|
||||
m_scene = scene;
|
||||
m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene);
|
||||
m_server.OnNewIRCClient += m_server_OnNewIRCClient;
|
||||
}
|
||||
}
|
||||
|
||||
void m_server_OnNewIRCClient(IRCClientView user)
|
||||
{
|
||||
user.OnIRCReady += user_OnIRCReady;
|
||||
}
|
||||
|
||||
void user_OnIRCReady(IRCClientView cv)
|
||||
{
|
||||
m_log.Info("[IRCd] Adding user...");
|
||||
m_scene.ClientManager.Add(cv.CircuitCode, cv);
|
||||
cv.Start();
|
||||
m_log.Info("[IRCd] Added user to Scene");
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "IRCClientStackModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
using System.Net;
|
||||
using System.Reflection;
|
||||
using log4net;
|
||||
using Nini.Config;
|
||||
using OpenSim.Region.Framework.Interfaces;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView
|
||||
{
|
||||
public class IRCStackModule : IRegionModule
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private IRCServer m_server;
|
||||
private Scene m_scene;
|
||||
|
||||
#region Implementation of IRegionModule
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
if (null != source.Configs["IRCd"] &&
|
||||
source.Configs["IRCd"].GetBoolean("Enabled",false))
|
||||
{
|
||||
m_scene = scene;
|
||||
m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene);
|
||||
m_server.OnNewIRCClient += m_server_OnNewIRCClient;
|
||||
}
|
||||
}
|
||||
|
||||
void m_server_OnNewIRCClient(IRCClientView user)
|
||||
{
|
||||
user.OnIRCReady += user_OnIRCReady;
|
||||
}
|
||||
|
||||
void user_OnIRCReady(IRCClientView cv)
|
||||
{
|
||||
m_log.Info("[IRCd] Adding user...");
|
||||
m_scene.ClientManager.Add(cv.CircuitCode, cv);
|
||||
cv.Start();
|
||||
m_log.Info("[IRCd] Added user to Scene");
|
||||
}
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public void Close()
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
public string Name
|
||||
{
|
||||
get { return "IRCClientStackModule"; }
|
||||
}
|
||||
|
||||
public bool IsSharedModule
|
||||
{
|
||||
get { return false; }
|
||||
}
|
||||
|
||||
#endregion
|
||||
}
|
||||
}
|
||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -1,61 +1,61 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||
{
|
||||
public delegate void OnNewIRCUserDelegate(IRCClientView user);
|
||||
|
||||
/// <summary>
|
||||
/// Adam's completely hacked up not-probably-compliant RFC1459 server class.
|
||||
/// </summary>
|
||||
class IRCServer
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public event OnNewIRCUserDelegate OnNewIRCClient;
|
||||
|
||||
private readonly TcpListener m_listener;
|
||||
private readonly Scene m_baseScene;
|
||||
private bool m_running = true;
|
||||
|
||||
public IRCServer(IPAddress listener, int port, Scene baseScene)
|
||||
{
|
||||
m_listener = new TcpListener(listener, port);
|
||||
|
||||
m_listener.Start(50);
|
||||
|
||||
Thread thread = new Thread(ListenLoop);
|
||||
thread.Start();
|
||||
m_baseScene = baseScene;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
m_running = false;
|
||||
m_listener.Stop();
|
||||
}
|
||||
|
||||
private void ListenLoop()
|
||||
{
|
||||
while(m_running)
|
||||
{
|
||||
AcceptClient(m_listener.AcceptTcpClient());
|
||||
}
|
||||
}
|
||||
|
||||
private void AcceptClient(TcpClient client)
|
||||
{
|
||||
IRCClientView cv = new IRCClientView(client, m_baseScene);
|
||||
|
||||
if (OnNewIRCClient != null)
|
||||
OnNewIRCClient(cv);
|
||||
}
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Net;
|
||||
using System.Net.Sockets;
|
||||
using System.Reflection;
|
||||
using System.Text;
|
||||
using System.Threading;
|
||||
using log4net;
|
||||
using OpenSim.Region.Framework.Scenes;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server
|
||||
{
|
||||
public delegate void OnNewIRCUserDelegate(IRCClientView user);
|
||||
|
||||
/// <summary>
|
||||
/// Adam's completely hacked up not-probably-compliant RFC1459 server class.
|
||||
/// </summary>
|
||||
class IRCServer
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
public event OnNewIRCUserDelegate OnNewIRCClient;
|
||||
|
||||
private readonly TcpListener m_listener;
|
||||
private readonly Scene m_baseScene;
|
||||
private bool m_running = true;
|
||||
|
||||
public IRCServer(IPAddress listener, int port, Scene baseScene)
|
||||
{
|
||||
m_listener = new TcpListener(listener, port);
|
||||
|
||||
m_listener.Start(50);
|
||||
|
||||
Thread thread = new Thread(ListenLoop);
|
||||
thread.Start();
|
||||
m_baseScene = baseScene;
|
||||
}
|
||||
|
||||
public void Stop()
|
||||
{
|
||||
m_running = false;
|
||||
m_listener.Stop();
|
||||
}
|
||||
|
||||
private void ListenLoop()
|
||||
{
|
||||
while(m_running)
|
||||
{
|
||||
AcceptClient(m_listener.AcceptTcpClient());
|
||||
}
|
||||
}
|
||||
|
||||
private void AcceptClient(TcpClient client)
|
||||
{
|
||||
IRCClientView cv = new IRCClientView(client, m_baseScene);
|
||||
|
||||
if (OnNewIRCClient != null)
|
||||
OnNewIRCClient(cv);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,12 +1,12 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
{
|
||||
public interface IObjectSound
|
||||
{
|
||||
void Play(UUID soundAsset, double volume);
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object
|
||||
{
|
||||
public interface IObjectSound
|
||||
{
|
||||
void Play(UUID soundAsset, double volume);
|
||||
}
|
||||
}
|
||||
|
|
|
@ -1,13 +1,13 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.WorldX
|
||||
{
|
||||
public interface IWorldAudio
|
||||
{
|
||||
void PlaySound(UUID audio, Vector3 position, double volume);
|
||||
void PlaySound(UUID audio, Vector3 position);
|
||||
}
|
||||
}
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using OpenMetaverse;
|
||||
|
||||
namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.WorldX
|
||||
{
|
||||
public interface IWorldAudio
|
||||
{
|
||||
void PlaySound(UUID audio, Vector3 position, double volume);
|
||||
void PlaySound(UUID audio, Vector3 position);
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue