mirror of
https://github.com/opensim/opensim.git
synced 2026-08-07 09:45:47 +08:00
Update svn properties. Formatting cleanup.
This commit is contained in:
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
{
|
||||
public class ChatModule : IRegionModule, ISimChat
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private const int DEBUG_CHANNEL = 2147483647;
|
||||
@@ -115,7 +115,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
|
||||
// Filled in since it's easier than rewriting right now.
|
||||
LLVector3 fromPos = e.Position;
|
||||
LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
LLVector3 regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||
|
||||
string fromName = e.From;
|
||||
@@ -130,7 +130,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
if (avatar != null)
|
||||
{
|
||||
fromPos = avatar.AbsolutePosition;
|
||||
regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
regionPos = new LLVector3(scene.RegionInfo.RegionLocX * Constants.RegionSize,
|
||||
scene.RegionInfo.RegionLocY * Constants.RegionSize, 0);
|
||||
fromName = avatar.Firstname + " " + avatar.Lastname;
|
||||
fromAgentID = e.Sender.AgentId;
|
||||
@@ -151,13 +151,13 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
if (e.Channel == DEBUG_CHANNEL)
|
||||
{
|
||||
TrySendChatMessage(presence, fromPos, regionPos,
|
||||
fromAgentID, fromName, e.Type,
|
||||
fromAgentID, fromName, e.Type,
|
||||
message, ChatSourceType.Object);
|
||||
}
|
||||
else
|
||||
{
|
||||
TrySendChatMessage(presence, fromPos, regionPos,
|
||||
fromAgentID, fromName, e.Type,
|
||||
fromAgentID, fromName, e.Type,
|
||||
message, ChatSourceType.Agent);
|
||||
}
|
||||
});
|
||||
@@ -180,7 +180,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
}
|
||||
|
||||
private void TrySendChatMessage(ScenePresence presence, LLVector3 fromPos, LLVector3 regionPos,
|
||||
LLUUID fromAgentID, string fromName, ChatTypeEnum type,
|
||||
LLUUID fromAgentID, string fromName, ChatTypeEnum type,
|
||||
string message, ChatSourceType src)
|
||||
{
|
||||
if (!presence.IsChildAgent)
|
||||
@@ -188,7 +188,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
LLVector3 fromRegionPos = fromPos + regionPos;
|
||||
LLVector3 toRegionPos = presence.AbsolutePosition + regionPos;
|
||||
int dis = Math.Abs((int) Util.GetDistanceTo(toRegionPos, fromRegionPos));
|
||||
|
||||
|
||||
if (type == ChatTypeEnum.Whisper && dis > m_whisperdistance ||
|
||||
type == ChatTypeEnum.Say && dis > m_saydistance ||
|
||||
type == ChatTypeEnum.Shout && dis > m_shoutdistance)
|
||||
@@ -197,7 +197,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
}
|
||||
|
||||
// TODO: should change so the message is sent through the avatar rather than direct to the ClientView
|
||||
presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName,
|
||||
presence.ControllingClient.SendChatMessage(message, (byte) type, fromPos, fromName,
|
||||
fromAgentID,(byte)src,(byte)ChatAudibleLevel.Fully);
|
||||
}
|
||||
}
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
{
|
||||
public class IRCBridgeModule : IRegionModule, ISimChat
|
||||
{
|
||||
private static readonly ILog m_log =
|
||||
private static readonly ILog m_log =
|
||||
LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
private const int DEBUG_CHANNEL = 2147483647;
|
||||
@@ -94,7 +94,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
m_irc_connector.Name = "IRCConnectorThread";
|
||||
m_irc_connector.IsBackground = true;
|
||||
}
|
||||
m_log.InfoFormat("[IRC] initialized for {0}, nick: {1} ", scene.RegionInfo.RegionName,
|
||||
m_log.InfoFormat("[IRC] initialized for {0}, nick: {1} ", scene.RegionInfo.RegionName,
|
||||
m_defaultzone);
|
||||
}
|
||||
}
|
||||
@@ -222,7 +222,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
if ((m_irc.Enabled) && (m_irc.Connected))
|
||||
{
|
||||
m_log.DebugFormat("[IRC] {0} logging on", clientName);
|
||||
m_irc.PrivMsg(m_irc.Nick, "Sim",
|
||||
m_irc.PrivMsg(m_irc.Nick, "Sim",
|
||||
String.Format("notices {0} logging on", clientName));
|
||||
}
|
||||
m_last_new_user = clientName;
|
||||
@@ -288,7 +288,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
m_log.InfoFormat("[IRC]: {0} logging out", clientName);
|
||||
}
|
||||
|
||||
if (m_last_new_user == clientName)
|
||||
if (m_last_new_user == clientName)
|
||||
m_last_new_user = null;
|
||||
}
|
||||
}
|
||||
@@ -588,7 +588,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
if (!avatar.IsChildAgent)
|
||||
{
|
||||
avatar.ControllingClient.SendChatMessage(
|
||||
Helpers.StringToField(data["msg"]),
|
||||
Helpers.StringToField(data["msg"]),
|
||||
1, // 255,
|
||||
pos, data["nick"],
|
||||
LLUUID.Zero,(byte)ChatSourceType.Agent,(byte)ChatAudibleLevel.Fully);
|
||||
@@ -634,9 +634,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
|
||||
if (!avatar.IsChildAgent)
|
||||
{
|
||||
avatar.ControllingClient.SendChatMessage(
|
||||
Helpers.StringToField(String.Format(format, args)),
|
||||
1, //255,
|
||||
pos, sender, LLUUID.Zero,
|
||||
Helpers.StringToField(String.Format(format, args)),
|
||||
1, //255,
|
||||
pos, sender, LLUUID.Zero,
|
||||
(byte)ChatSourceType.Object,
|
||||
(byte)ChatAudibleLevel.Fully);
|
||||
}
|
||||
|
||||
@@ -131,7 +131,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
caps.RegisterHandler("ParcelVoiceInfoRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
delegate(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
{
|
||||
return ParcelVoiceInfoRequest(request, path, param,
|
||||
@@ -139,7 +139,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
|
||||
}));
|
||||
caps.RegisterHandler("ProvisionVoiceAccountRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
delegate(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
{
|
||||
return ProvisionVoiceAccountRequest(request, path, param,
|
||||
|
||||
@@ -104,7 +104,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
|
||||
string capsBase = "/CAPS/" + caps.CapsObjectPath;
|
||||
caps.RegisterHandler("ParcelVoiceInfoRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_parcelVoiceInfoRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
delegate(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
{
|
||||
return ParcelVoiceInfoRequest(request, path, param,
|
||||
@@ -112,7 +112,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.SIPVoice
|
||||
}));
|
||||
caps.RegisterHandler("ProvisionVoiceAccountRequest",
|
||||
new RestStreamHandler("POST", capsBase + m_provisionVoiceAccountRequestPath,
|
||||
delegate(string request, string path, string param,
|
||||
delegate(string request, string path, string param,
|
||||
OSHttpRequest httpRequest, OSHttpResponse httpResponse)
|
||||
{
|
||||
return ProvisionVoiceAccountRequest(request, path, param,
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||
/// This module loads and saves OpenSimulator archives
|
||||
/// </summary>
|
||||
public class ArchiverModule : IRegionModule, IRegionArchiver
|
||||
{
|
||||
{
|
||||
private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
|
||||
|
||||
/// <summary>
|
||||
@@ -47,51 +47,51 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||
/// </summary>
|
||||
/// <param name="scene"></param>
|
||||
/// <param name="source"></param>
|
||||
private Scene m_scene;
|
||||
|
||||
private Scene m_scene;
|
||||
|
||||
public string Name { get { return "ArchiverModule"; } }
|
||||
|
||||
|
||||
public bool IsSharedModule { get { return false; } }
|
||||
|
||||
|
||||
public void Initialise(Scene scene, IConfigSource source)
|
||||
{
|
||||
m_scene = scene;
|
||||
|
||||
|
||||
m_scene.RegisterModuleInterface<IRegionArchiver>(this);
|
||||
}
|
||||
|
||||
|
||||
public void PostInitialise()
|
||||
{
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public void Close()
|
||||
{
|
||||
}
|
||||
|
||||
|
||||
public void ArchiveRegion(string savePath)
|
||||
{
|
||||
m_log.Warn("[ARCHIVER]: Archive region not yet implemented");
|
||||
|
||||
|
||||
List<EntityBase> entities = m_scene.GetEntities();
|
||||
|
||||
|
||||
foreach (EntityBase entity in entities)
|
||||
{
|
||||
|
||||
|
||||
}
|
||||
|
||||
string serEntities = SerializeObjects(entities);
|
||||
|
||||
|
||||
string serEntities = SerializeObjects(entities);
|
||||
|
||||
if (serEntities != null && serEntities.Length > 0)
|
||||
{
|
||||
m_log.DebugFormat("[ARCHIVER]: Successfully got serialization for {0} entities", entities.Count);
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
public void DearchiveRegion(string loadPath)
|
||||
{
|
||||
m_log.Warn("[ARCHIVER]: Dearchive region not yet implemented");
|
||||
}
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Get an xml representation of the given scene objects.
|
||||
/// </summary>
|
||||
@@ -115,8 +115,8 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||
serialization += serObject;
|
||||
|
||||
serialization += "</scene>";
|
||||
|
||||
|
||||
return serialization;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -28,7 +28,7 @@
|
||||
using OpenSim.Region.Environment.Scenes;
|
||||
|
||||
namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||
{
|
||||
{
|
||||
/// <summary>
|
||||
/// Interface to region archive functionality
|
||||
/// </summary>
|
||||
@@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules.World.Archiver
|
||||
/// </summary>
|
||||
/// <param name="savePath"></param>
|
||||
void ArchiveRegion(string savePath);
|
||||
|
||||
|
||||
/// <summary>
|
||||
/// Dearchive the given region archive into the scene
|
||||
/// </summary>
|
||||
|
||||
@@ -731,7 +731,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||
if (obj.OwnerID == owners[i])
|
||||
objlist.Add(obj);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (InvalidOperationException)
|
||||
{
|
||||
m_log.Info("[PARCEL]: Unable to figure out all the objects owned by " + owners[i].ToString() + " arr.");
|
||||
@@ -751,7 +751,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||
landData.ownerPrims = 0;
|
||||
landData.otherPrims = 0;
|
||||
landData.selectedPrims = 0;
|
||||
|
||||
|
||||
|
||||
lock (primsOverMe)
|
||||
primsOverMe.Clear();
|
||||
@@ -759,7 +759,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
|
||||
|
||||
public void addPrimToCount(SceneObjectGroup obj)
|
||||
{
|
||||
|
||||
|
||||
LLUUID prim_owner = obj.OwnerID;
|
||||
int prim_count = obj.PrimCount;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user