Formatting cleanup.

This commit is contained in:
Jeff Ames
2008-05-16 01:22:11 +00:00
parent e25818d832
commit 65c5efe43b
261 changed files with 3718 additions and 3831 deletions

View File

@@ -216,7 +216,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetDownload
public IClientAPI RequestUser;
public LLUUID TransferRequestID;
//public bool AssetInCache;
//public int TimeRequested;
//public int TimeRequested;
public AssetRequest()
{

View File

@@ -40,7 +40,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// </summary>
public class AgentAssetTransactions
{
//private static readonly log4net.ILog m_log
//private static readonly log4net.ILog m_log
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
// Fields
@@ -192,7 +192,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
}
ourClient.SendConfirmXfer(xferID, packetID);
if ((packetID & 0x80000000) != 0)
{
SendCompleteMessage();
@@ -209,7 +209,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// <param name="xferID"></param>
/// <param name="packetID"></param>
/// <param name="data"></param>
/// <returns>True if the transfer is complete, false otherwise</returns>
/// <returns>True if the transfer is complete, false otherwise</returns>
public bool Initialise(IClientAPI remoteClient, LLUUID assetID, LLUUID transaction, sbyte type, byte[] data,
bool storeLocal, bool tempFile)
{
@@ -363,7 +363,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
private void DoCreateItem()
{
//really need to fix this call, if lbsa71 saw this he would die.
//really need to fix this call, if lbsa71 saw this he would die.
m_userTransactions.Manager.MyScene.CommsManager.AssetCache.AddAsset(Asset);
CachedUserInfo userInfo =
m_userTransactions.Manager.MyScene.CommsManager.UserProfileCacheService.GetUserDetails(ourClient.AgentId);

View File

@@ -199,7 +199,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// <summary>
/// Create an inventory item from data that has been received through a transaction.
///
///
/// This is called when new clothing or body parts are created. It may also be called in other
/// situations.
/// </summary>
@@ -229,8 +229,8 @@ namespace OpenSim.Region.Environment.Modules.Agent.AssetTransaction
/// <summary>
/// Update an inventory item with data that has been received through a transaction.
///
/// This is called when clothing or body parts are updated (for instance, with new textures or
///
/// This is called when clothing or body parts are updated (for instance, with new textures or
/// colours). It may also be called in other situations.
/// </summary>
/// <param name="remoteClient"></param>

View File

@@ -38,7 +38,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{
public class TextureDownloadModule : IRegionModule
{
//private static readonly log4net.ILog m_log
//private static readonly log4net.ILog m_log
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
/// <summary>
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
private void TextureSent(ITextureSender sender)
{
sender.Sending = false;
//m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID);
//m_log.DebugFormat("[TEXTURE DOWNLOAD]: Removing download stat for {0}", sender.assetID);
m_scene.AddPendingDownloads(-1);
}
}

View File

@@ -37,7 +37,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// </summary>
public class TextureNotFoundSender : ITextureSender
{
//private static readonly log4net.ILog m_log
//private static readonly log4net.ILog m_log
// = log4net.LogManager.GetLogger(System.Reflection.MethodBase.GetCurrentMethod().DeclaringType);
private bool m_cancel = false;
@@ -80,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
public bool SendTexturePacket()
{
//m_log.InfoFormat(
// "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found",
// "[TEXTURE NOT FOUND SENDER]: Informing the client that texture {0} cannot be found",
// m_textureId);
ImageNotInDatabasePacket notFound = new ImageNotInDatabasePacket();

View File

@@ -39,7 +39,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{
/// <summary>
/// This module sets up texture senders in response to client texture requests, and places them on a
/// processing queue once those senders have the appropriate data (i.e. a texture retrieved from the
/// processing queue once those senders have the appropriate data (i.e. a texture retrieved from the
/// asset cache).
/// </summary>
public class UserTextureDownloadService
@@ -49,7 +49,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// <summary>
/// We will allow the client to request the same texture n times before dropping further requests
///
///
/// This number includes repeated requests for the same texture at different resolutions (which we don't
/// currently handle properly as far as I know). However, this situation should be handled in a more
/// sophisticated way.
@@ -80,7 +80,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
/// We're going to limit requests for the same missing texture.
/// XXX This is really a temporary solution to deal with the situation where a client continually requests
/// the same missing textures
/// </summary>
/// </summary>
private readonly IRequestLimitStrategy<LLUUID> missingTextureLimitStrategy
= new RepeatLimitStrategy<LLUUID>(MAX_ALLOWED_TEXTURE_REQUESTS);
@@ -93,7 +93,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
}
/// <summary>
/// Handle a texture request. This involves creating a texture sender and placing it on the
/// Handle a texture request. This involves creating a texture sender and placing it on the
/// previously passed in shared queue.
/// </summary>
/// <param name="e"></param>
@@ -108,7 +108,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{
if (m_textureSenders.TryGetValue(e.RequestedAssetID, out textureSender))
{
// If we've received new non UUID information for this request and it hasn't dispatched
// If we've received new non UUID information for this request and it hasn't dispatched
// yet, then update the request accordingly.
textureSender.UpdateRequest(e.DiscardLevel, e.PacketNumber);
}
@@ -117,7 +117,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
if (!foundTextureLimitStrategy.AllowRequest(e.RequestedAssetID))
{
// m_log.DebugFormat(
// "[USER TEXTURE DOWNLOAD SERVICE]: Refusing request for {0} from client {1}",
// "[USER TEXTURE DOWNLOAD SERVICE]: Refusing request for {0} from client {1}",
// e.RequestedAssetID, m_client.AgentId);
return;
@@ -128,9 +128,9 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureDownload
{
if (StatsManager.SimExtraStats != null)
StatsManager.SimExtraStats.AddBlockedMissingTextureRequest();
// Commenting out this message for now as it causes too much noise with other
// debug messages.
// Commenting out this message for now as it causes too much noise with other
// debug messages.
// m_log.DebugFormat(
// "[USER TEXTURE DOWNLOAD SERVICE]: Dropping requests for notified missing texture {0} for client {1} since we have received more than {2} requests",
// e.RequestedAssetID, m_client.AgentId, MAX_ALLOWED_TEXTURE_REQUESTS);

View File

@@ -35,7 +35,7 @@ using OpenSim.Region.Environment.Interfaces;
namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
{
/// <summary>
/// A TextureSender handles the process of receiving a texture requested by the client from the
/// A TextureSender handles the process of receiving a texture requested by the client from the
/// AssetCache, and then sending that texture back to the client.
/// </summary>
public class TextureSender : ITextureSender
@@ -150,14 +150,14 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
{
if (NumPackets == 0)
{
RequestUser.SendImagePart(1, m_asset.FullID, (uint)m_asset.Data.Length, m_asset.Data, 2);
PacketCounter++;
}
else
{
byte[] ImageData1 = new byte[600];
Array.Copy(m_asset.Data, 0, ImageData1, 0, 600);
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.TextureSender
}
else
{
// Doesn't like to be refactored...
// Doesn't like to be refactored...
ImagePacketPacket im = new ImagePacketPacket();
im.Header.Reliable = false;
im.ImageID.Packet = (ushort)(PacketCounter);

View File

@@ -98,7 +98,7 @@ namespace OpenSim.Region.Environment.Modules.Agent.Xfer
}
/// <summary>
///
///
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="xferID"></param>

View File

@@ -235,7 +235,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
{
TrySendChatMessage(presence, fromPos, regionPos,
fromAgentID, fromName, e.Type, message, ChatSourceType.Agent);
}
});
}
@@ -572,7 +572,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
string regex = @":(?<nick>\w*)!(?<user>\S*) PRIVMSG (?<channel>\S+) :(?<msg>.*)";
Regex RE = new Regex(regex, RegexOptions.Multiline);
MatchCollection matches = RE.Matches(input);
// Get some direct matches $1 $4 is a
// Get some direct matches $1 $4 is a
if ((matches.Count == 1) && (matches[0].Groups.Count == 5))
{
result = new Dictionary<string, string>();
@@ -703,7 +703,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Chat
public void ProcessIRCCommand(string command)
{
//m_log.Info("[IRC]: ProcessIRCCommand:" + command);
//m_log.Info("[IRC]: ProcessIRCCommand:" + command);
string[] commArgs = new string[command.Split(' ').Length];
string c_server = m_server;

View File

@@ -46,10 +46,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
/// Demo Economy/Money Module. This is not a production quality money/economy module!
/// This is a demo for you to use when making one that works for you.
/// // To use the following you need to add:
/// -helperuri <ADDRESS TO HERE OR grid MONEY SERVER>
/// -helperuri <ADDRESS TO HERE OR grid MONEY SERVER>
/// to the command line parameters you use to start up your client
/// This commonly looks like -helperuri http://127.0.0.1:9000/
///
///
/// Centralized grid structure example using OpenSimWi Redux revision 9+
/// svn co https://opensimwiredux.svn.sourceforge.net/svnroot/opensimwiredux
/// </summary>
@@ -147,7 +147,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
XMLRPCHandler = scene;
// To use the following you need to add:
// -helperuri <ADDRESS TO HERE OR grid MONEY SERVER>
// -helperuri <ADDRESS TO HERE OR grid MONEY SERVER>
// to the command line parameters you use to start up your client
// This commonly looks like -helperuri http://127.0.0.1:9000/
@@ -276,7 +276,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
private void OnNewClient(IClientAPI client)
{
// Here we check if we're in grid mode
// I imagine that the 'check balance'
// I imagine that the 'check balance'
// function for the client should be here or shortly after
if (gridmode)
@@ -367,7 +367,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
{
lock (m_KnownClientFunds)
{
// If we don't know about the sender, then the sender can't
// If we don't know about the sender, then the sender can't
// actually be here and therefore this is likely fraud or outdated.
if (m_MoneyAddress.Length == 0)
{
@@ -1394,7 +1394,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Currency.SampleMoney
m_rootAgents[avatar.UUID] = avatar.Scene.RegionInfo.originRegionID;
//m_log.Info("[MONEY]: Claiming " + avatar.Firstname + " " + avatar.Lastname + " in region:" + avatar.RegionHandle + ".");
// Claim User! my user! Mine mine mine!

View File

@@ -97,9 +97,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
private void OnNewClient(IClientAPI client)
{
// All friends establishment protocol goes over instant message
// There's no way to send a message from the sim
// There's no way to send a message from the sim
// to a user to 'add a friend' without causing dialog box spam
//
//
// The base set of friends are added when the user signs on in their XMLRPC response
// Generated by LoginService. The friends are retreived from the database by the UserManager
@@ -167,7 +167,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
LLUUID[] Agents = new LLUUID[1];
Agents[0] = client.AgentId;
av.ControllingClient.SendAgentOnline(Agents);
}
}
}
@@ -223,14 +223,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
}
catch (IndexOutOfRangeException)
{
// Ignore the index out of range exception.
// Ignore the index out of range exception.
// This causes friend lists to get out of sync slightly.. however
// prevents a sim crash.
m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off");
}
catch (ArgumentOutOfRangeException)
{
// Ignore the index out of range exception.
// Ignore the index out of range exception.
// This causes friend lists to get out of sync slightly.. however
// prevents a sim crash.
m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off");
@@ -248,14 +248,14 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
catch (IndexOutOfRangeException)
{
// Ignore the index out of range exception.
// Ignore the index out of range exception.
// This causes friend lists to get out of sync slightly.. however
// prevents a sim crash.
m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off");
}
catch (ArgumentOutOfRangeException)
{
// Ignore the index out of range exception.
// Ignore the index out of range exception.
// This causes friend lists to get out of sync slightly.. however
// prevents a sim crash.
m_log.Info("[FRIEND]: Unable to enumerate last friendlist user. User logged off");
@@ -411,10 +411,10 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
{
if (m_pendingFriendRequests.ContainsKey(transactionID))
{
// Found Pending Friend Request with that Transaction..
// Found Pending Friend Request with that Transaction..
Scene SceneAgentIn = m_scene[0];
// Found Pending Friend Request with that Transaction..
// Found Pending Friend Request with that Transaction..
ScenePresence agentpresence = GetPresenceFromAgentID(agentID);
if (agentpresence != null)
{
@@ -453,7 +453,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Friends
{
Scene SceneAgentIn = m_scene[0];
// Found Pending Friend Request with that Transaction..
// Found Pending Friend Request with that Transaction..
ScenePresence agentpresence = GetPresenceFromAgentID(agentID);
if (agentpresence != null)
{

View File

@@ -107,7 +107,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Inventory
// First byte of the array is probably the item type
// Next 16 bytes are the UUID
//Array.Copy(binaryBucket, 1, rawId, 0, 16);
//Array.Copy(binaryBucket, 1, rawId, 0, 16);
//LLUUID itemId = new LLUUID(new Guid(rawId));
LLUUID itemId = new LLUUID(binaryBucket, 1);

View File

@@ -86,7 +86,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Profiles
}
/// <summary>
///
///
/// </summary>
/// <param name="remoteClient"></param>
/// <param name="avatarID"></param>

View File

@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Voice.AsterixVoice
public string ProvisionVoiceAccountRequest(string request, string path, string param,
LLUUID agentID, Caps caps)
{
// we need to
// we need to
// - get user data from UserProfileCacheService
// - generate nonce for user voice account password
// - issue XmlRpc request to asterisk opensim front end:

View File

@@ -40,25 +40,25 @@ using OpenSim.Region.Environment.Scenes;
/*****************************************************
*
* ScriptsHttpRequests
*
*
* Implements the llHttpRequest and http_response
* callback.
*
*
* Some stuff was already in LSLLongCmdHandler, and then
* there was this file with a stub class in it. So,
* I am moving some of the objects and functions out of
* LSLLongCmdHandler, such as the HttpRequestClass, the
* start and stop methods, and setting up pending and
* completed queues. These are processed in the
* LSLLongCmdHandler polling loop. Similiar to the
* start and stop methods, and setting up pending and
* completed queues. These are processed in the
* LSLLongCmdHandler polling loop. Similiar to the
* XMLRPCModule, since that seems to work.
*
*
* //TODO
*
*
* This probably needs some throttling mechanism but
* its wide open right now. This applies to both
* number of requests and data volume.
*
*
* Linden puts all kinds of header fields in the requests.
* Not doing any of that:
* User-Agent
@@ -71,13 +71,13 @@ using OpenSim.Region.Environment.Scenes;
* X-SecondLife-Local-Rotation
* X-SecondLife-Owner-Name
* X-SecondLife-Owner-Key
*
*
* HTTPS support
*
*
* Configurable timeout?
* Configurable max repsonse size?
* Configurable
*
*
* **************************************************/
namespace OpenSim.Region.Environment.Modules.Scripting.HttpRequest

View File

@@ -226,7 +226,7 @@ namespace OpenSim.Region.Environment.Modules.Scripting.VectorRender
foreach (string line in lines)
{
string nextLine = line.Trim();
//replace with switch, or even better, do some proper parsing
//replace with switch, or even better, do some proper parsing
if (nextLine.StartsWith("MoveTo"))
{
float x = 0;

View File

@@ -37,25 +37,25 @@ using OpenSim.Region.Environment.Scenes;
/*****************************************************
*
* WorldCommModule
*
*
*
*
* Holding place for world comms - basically llListen
* function implementation.
*
*
* lLListen(integer channel, string name, key id, string msg)
* The name, id, and msg arguments specify the filtering
* criteria. You can pass the empty string
* (or NULL_KEY for id) for these to set a completely
* open filter; this causes the listen() event handler to be
* invoked for all chat on the channel. To listen only
* for chat spoken by a specific object or avatar,
* specify the name and/or id arguments. To listen
* only for a specific command, specify the
* (case-sensitive) msg argument. If msg is not empty,
* listener will only hear strings which are exactly equal
* The name, id, and msg arguments specify the filtering
* criteria. You can pass the empty string
* (or NULL_KEY for id) for these to set a completely
* open filter; this causes the listen() event handler to be
* invoked for all chat on the channel. To listen only
* for chat spoken by a specific object or avatar,
* specify the name and/or id arguments. To listen
* only for a specific command, specify the
* (case-sensitive) msg argument. If msg is not empty,
* listener will only hear strings which are exactly equal
* to msg. You can also use all the arguments to establish
* the most restrictive filtering criteria.
*
*
* It might be useful for each listener to maintain a message
* digest, with a list of recent messages by UUID. This can
* be used to prevent in-world repeater loops. However, the
@@ -76,7 +76,7 @@ using OpenSim.Region.Environment.Scenes;
* Might be actually easier to map the global handle into
* script-local handle in the ScriptEngine. Not sure if its
* worth the effort tho.
*
*
* **************************************************/
namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
@@ -317,9 +317,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.WorldComm
}
/********************************************************************
*
*
* Listener Stuff
*
*
* *****************************************************************/
private void DeliverClientMessage(Object sender, ChatFromViewerArgs e)

View File

@@ -43,12 +43,12 @@ using OpenSim.Region.Environment.Scenes;
/*****************************************************
*
* XMLRPCModule
*
*
* Module for accepting incoming communications from
* external XMLRPC client and calling a remote data
* procedure for a registered data channel/prim.
*
*
*
*
* 1. On module load, open a listener port
* 2. Attach an XMLRPC handler
* 3. When a request is received:
@@ -59,18 +59,18 @@ using OpenSim.Region.Environment.Scenes;
* 3.5 Return response to client caller
* 3.6 If no response from llRemoteDataReply within
* RemoteReplyScriptTimeout, generate script timeout fault
*
*
* Prims in script must:
* 1. Open a remote data channel
* 1.1 Generate a channel ID
* 1.2 Register primid,channelid pair with module
* 2. Implement the remote data procedure handler
*
*
* llOpenRemoteDataChannel
* llRemoteDataReply
* remote_data(integer type, key channel, key messageid, string sender, integer ival, string sval)
* llCloseRemoteDataChannel
*
*
* **************************************************/
namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
@@ -157,16 +157,16 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
/**********************************************
* OpenXMLRPCChannel
*
*
* Generate a LLUUID channel key and add it and
* the prim id to dictionary <channelUUID, primUUID>
*
*
* First check if there is a channel assigned for
* this itemID. If there is, then someone called
* llOpenRemoteDataChannel twice. Just return the
* original channel. Other option is to delete the
* current channel and assign a new one.
*
*
* ********************************************/
public LLUUID OpenXMLRPCChannel(uint localID, LLUUID itemID)
@@ -224,9 +224,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
/**********************************************
* Remote Data Reply
*
*
* Response to RPC message
*
*
*********************************************/
public void RemoteDataReply(string channel, string message_id, string sdata, int idata)
@@ -245,9 +245,9 @@ namespace OpenSim.Region.Environment.Modules.Scripting.XMLRPC
/**********************************************
* CloseXMLRPCChannel
*
*
* Remove channel from dictionary
*
*
*********************************************/
public void CloseXMLRPCChannel(LLUUID channelKey)

View File

@@ -41,7 +41,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
#region Constants
//Land types set with flags in ParcelOverlay.
//Only one of these can be used.
//Only one of these can be used.
public const float BAN_LINE_SAFETY_HIEGHT = 100;
public const byte LAND_FLAG_PROPERTY_BORDER_SOUTH = 128; //Equals 10000000
public const byte LAND_FLAG_PROPERTY_BORDER_WEST = 64; //Equals 01000000
@@ -584,7 +584,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
if (byteArrayCount >= LAND_BLOCKS_PER_PACKET)
{
remote_client.sendLandParcelOverlay(byteArray, sequenceID);
byteArrayCount = 0;
byteArrayCount = 0;
sequenceID++;
byteArray = new byte[LAND_BLOCKS_PER_PACKET];
}
@@ -655,7 +655,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
public void handleParcelSelectObjectsRequest(int local_id, int request_type, IClientAPI remote_client)
{
landList[local_id].sendForceObjectSelect(local_id, request_type, remote_client);
}
@@ -870,7 +870,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
}
public void handleAnyClientMovement(ScenePresence avatar)
//Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance.
//Like handleSignificantClientMovement, but called with an AgentUpdate regardless of distance.
{
ILandObject over = GetLandObject(avatar.AbsolutePosition.X, avatar.AbsolutePosition.Y);
if (over != null)

View File

@@ -622,7 +622,7 @@ namespace OpenSim.Region.Environment.Modules.World.Land
/// <summary>
/// Notify the parcel owner each avatar that owns prims situated on their land. This notification includes
/// aggreagete details such as the number of prims.
///
///
/// </summary>
/// <param name="remote_client">
/// A <see cref="IClientAPI"/>

View File

@@ -47,7 +47,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
#region Constants
// These are here for testing. They will be taken out
//private uint PERM_ALL = (uint)2147483647;
private uint PERM_COPY = (uint)32768;
//private uint PERM_MODIFY = (uint)16384;
@@ -59,7 +59,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
#region Bypass Permissions / Debug Permissions Stuff
// Bypasses the permissions engine
// Bypasses the permissions engine
private bool m_bypassPermissions = false;
private bool m_bypassPermissionsValue = true;
private bool m_debugPermissions = false;
@@ -126,18 +126,18 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
public void Initialise(Scene scene, IConfigSource config)
{
m_scene = scene;
IConfig myConfig = config.Configs["Startup"];
string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
List<string> modules=new List<string>(permissionModules.Split(','));
string permissionModules = myConfig.GetString("permissionmodules", "DefaultPermissionsModule");
if(!modules.Contains("DefaultPermissionsModule"))
return;
List<string> modules=new List<string>(permissionModules.Split(','));
if (!modules.Contains("DefaultPermissionsModule"))
return;
m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
m_bypassPermissions = !myConfig.GetBoolean("serverside_object_permissions", true);
m_scene.RegisterModuleInterface<IScenePermissions>(this);
//Register functions with Scene External Checks!
@@ -212,7 +212,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
get { return false; }
}
#endregion
#endregion
#region Helper Functions
protected void SendPermissionError(LLUUID user, string reason)
@@ -252,38 +252,38 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
}
#endregion
public bool PropagatePermissions()
{
return false;
}
public bool PropagatePermissions()
{
return false;
}
public bool BypassPermissions()
{
return m_bypassPermissions;
}
public bool BypassPermissions()
{
return m_bypassPermissions;
}
public void SetBypassPermissions(bool value)
{
m_bypassPermissions=value;
}
public void SetBypassPermissions(bool value)
{
m_bypassPermissions=value;
}
#region Object Permissions
public uint GenerateClientFlags(LLUUID user, LLUUID objID)
{
// Here's the way this works,
// Here's the way this works,
// ObjectFlags and Permission flags are two different enumerations
// ObjectFlags, however, tells the client to change what it will allow the user to do.
// So, that means that all of the permissions type ObjectFlags are /temporary/ and only
// supposed to be set when customizing the objectflags for the client.
// So, that means that all of the permissions type ObjectFlags are /temporary/ and only
// supposed to be set when customizing the objectflags for the client.
// These temporary objectflags get computed and added in this function based on the
// These temporary objectflags get computed and added in this function based on the
// Permission mask that's appropriate!
// Outside of this method, they should never be added to objectflags!
// -teravus
SceneObjectPart task=m_scene.GetSceneObjectPart(objID);
// this shouldn't ever happen.. return no permissions/objectflags.
if (task == null)
return (uint)0;
@@ -292,7 +292,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
LLUUID objectOwner = task.OwnerID;
// Remove any of the objectFlags that are temporary. These will get added back if appropriate
// Remove any of the objectFlags that are temporary. These will get added back if appropriate
// in the next bit of code
objflags &= (uint)
@@ -354,7 +354,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
private uint ApplyObjectModifyMasks(uint setPermissionMask, uint objectFlagsMask)
{
// We are adding the temporary objectflags to the object's objectflags based on the
// We are adding the temporary objectflags to the object's objectflags based on the
// permission flag given. These change the F flags on the client.
if ((setPermissionMask & (uint)PermissionMask.Copy) != 0)
@@ -404,7 +404,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
locked = ((group.RootPart.OwnerMask & PERM_LOCKED) == 0);
// People shouldn't be able to do anything with locked objects, except the Administrator
// The 'set permissions' runs through a different permission check, so when an object owner
// The 'set permissions' runs through a different permission check, so when an object owner
// sets an object locked, the only thing that they can do is unlock it.
//
// Nobody but the object owner can set permissions on an object
@@ -458,7 +458,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
bool permission = false;
string reason = "Only registered users may communicate with another account.";
if (IsAdministrator(user))
permission = true;
@@ -521,7 +521,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
return GenericParcelPermission(user, parcel);
}
#endregion
#region Permission Checks
private bool CanAbandonParcel(LLUUID user, ILandObject parcel, Scene scene)
{
@@ -607,7 +607,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
return GenericCommunicationPermission(user, target);
}
@@ -632,8 +632,8 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
return false;
}
// The client
// may request to edit linked parts, and therefore, it needs
// The client
// may request to edit linked parts, and therefore, it needs
// to also check for SceneObjectPart
// If it's not an object, we cant edit it.
@@ -647,7 +647,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
LLUUID taskOwner = null;
// Added this because at this point in time it wouldn't be wise for
// Added this because at this point in time it wouldn't be wise for
// the administrator object permissions to take effect.
LLUUID objectOwner = task.OwnerID;
@@ -682,12 +682,12 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
// This is an exception to the generic object permission.
// Administrators who lock their objects should not be able to move them,
// Administrators who lock their objects should not be able to move them,
// however generic object permission should return true.
// This keeps locked objects from being affected by random click + drag actions by accident
// and allows the administrator to grab or delete a locked object.
// Administrators and estate managers are still able to click+grab locked objects not
// Administrators and estate managers are still able to click+grab locked objects not
// owned by them in the scene
// This is by design.
@@ -834,7 +834,7 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
SceneObjectGroup task = (SceneObjectGroup)m_scene.Entities[objectID];
LLUUID taskOwner = null;
// Added this because at this point in time it wouldn't be wise for
// Added this because at this point in time it wouldn't be wise for
// the administrator object permissions to take effect.
LLUUID objectOwner = task.OwnerID;
@@ -895,61 +895,61 @@ namespace OpenSim.Region.Environment.Modules.World.Permissions
#endregion
public bool CanLinkObject(LLUUID userID, LLUUID objectID)
{
public bool CanLinkObject(LLUUID userID, LLUUID objectID)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
return true;
}
return true;
}
public bool CanDelinkObject(LLUUID userID, LLUUID objectID)
{
public bool CanDelinkObject(LLUUID userID, LLUUID objectID)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
return true;
}
return true;
}
public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene)
{
public bool CanBuyLand(LLUUID userID, ILandObject parcel, Scene scene)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
return true;
}
return true;
}
public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID)
{
public bool CanCopyInventory(LLUUID itemID, LLUUID objectID, LLUUID userID)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
return true;
}
return true;
}
public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID)
{
public bool CanDeleteInventory(LLUUID itemID, LLUUID objectID, LLUUID userID)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
return true;
}
return true;
}
public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID)
{
public bool CanCreateInventory(uint invType, LLUUID objectID, LLUUID userID)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
return true;
}
return true;
}
public bool CanTeleport(LLUUID userID)
{
public bool CanTeleport(LLUUID userID)
{
DebugPermissionInformation(MethodInfo.GetCurrentMethod().Name);
if (m_bypassPermissions) return m_bypassPermissionsValue;
return true;
}
return true;
}
}

View File

@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules
// Current time in elpased seconds since Jan 1st 1970
private ulong CurrentTime
{
get {
get {
return (ulong)(((System.DateTime.Now.Ticks) - TicksToEpoch + TicksOffset)/10000000);
}
}
@@ -118,7 +118,7 @@ namespace OpenSim.Region.Environment.Modules
TimeZone local = TimeZone.CurrentTimeZone;
TicksOffset = local.GetUtcOffset(local.ToLocalTime(DateTime.Now)).Ticks;
m_log.Debug("[SUN] localtime offset is " + TicksOffset);
// Align ticks with Second Life
@@ -246,7 +246,7 @@ namespace OpenSim.Region.Environment.Modules
avatar.ControllingClient.SendSunPos(Position, Velocity, CurrentTime, SecondsPerSunCycle, SecondsPerYear, OrbitalPosition);
}
// set estate settings for region access to sun position
// set estate settings for region access to sun position
m_scene.RegionInfo.EstateSettings.sunPosition = Position;
}
@@ -281,7 +281,7 @@ namespace OpenSim.Region.Environment.Modules
Position = LLVector3.Rot(Position,Tilt);
// Finally we shift the axis so that more of the
// Finally we shift the axis so that more of the
// circle is above the horizon than below. This
// makes the nights shorter than the days.

View File

@@ -31,9 +31,9 @@ using OpenSim.Region.Environment.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
/// <summary>
/// A generic windows bitmap loader.
/// A generic windows bitmap loader.
/// Should be capable of handling 24-bit RGB images.
///
///
/// Uses the System.Drawing filesystem loader.
/// </summary>
internal class BMP : GenericSystemDrawing

View File

@@ -33,7 +33,7 @@ using OpenSim.Region.Environment.Interfaces;
namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
{
/// <summary>
/// A virtual class designed to have methods overloaded,
/// A virtual class designed to have methods overloaded,
/// this class provides an interface for a generic image
/// saving and loading mechanism, but does not specify the
/// format. It should not be insubstantiated directly.
@@ -99,7 +99,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
}
/// <summary>
/// Protected method, generates a grayscale bitmap
/// Protected method, generates a grayscale bitmap
/// image from a specified terrain channel.
/// </summary>
/// <param name="map">The terrain channel to export to bitmap</param>
@@ -134,7 +134,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.FileLoaders
}
/// <summary>
/// Protected method, generates a coloured bitmap
/// Protected method, generates a coloured bitmap
/// image from a specified terrain channel.
/// </summary>
/// <param name="map">The terrain channel to export to bitmap</param>

View File

@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
double sum = 0.0;
double step2 = 0.0;
// compute delta map
// compute delta map
for (x = 0; x < map.Width; x++)
{
for (y = 0; y < map.Height; y++)
{
double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
if (z > 0) // add in non-zero amount
if (z > 0) // add in non-zero amount
{
sum += map[x, y] * z;
step2 += z;
@@ -60,14 +60,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
double avg = sum / step2;
// blend in map
// blend in map
for (x = 0; x < map.Width; x++)
{
for (y = 0; y < map.Height; y++)
{
double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength) * duration;
if (z > 0) // add in non-zero amount
if (z > 0) // add in non-zero amount
{
if (z > 1.0)
z = 1.0;

View File

@@ -32,8 +32,8 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
/// <summary>
/// Speed-Optimised Hybrid Erosion Brush
///
/// As per Jacob Olsen's Paper
///
/// As per Jacob Olsen's Paper
/// http://www.oddlabs.com/download/terrain_generation.pdf
/// </summary>
public class OlsenSphere : ITerrainPaintableEffect
@@ -164,7 +164,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
if (z > 0) // add in non-zero amount
if (z > 0) // add in non-zero amount
{
const int NEIGHBOUR_ME = 4;
const int NEIGHBOUR_MAX = 9;

View File

@@ -43,14 +43,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
double area = strength;
double step = strength / 4.0;
// compute delta map
// compute delta map
for (x = 0; x < map.Width; x++)
{
for (y = 0; y < map.Height; y++)
{
double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
if (z > 0) // add in non-zero amount
if (z > 0) // add in non-zero amount
{
double average = 0.0;
int avgsteps = 0;
@@ -69,14 +69,14 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
}
}
}
// blend in map
// blend in map
for (x = 0; x < map.Width; x++)
{
for (y = 0; y < map.Height; y++)
{
double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
if (z > 0) // add in non-zero amount
if (z > 0) // add in non-zero amount
{
double da = z;
double a = (map[x, y] - tweak[x, y]) * da;

View File

@@ -160,7 +160,7 @@ namespace OpenSim.Region.Environment.Modules.World.Terrain.PaintBrushes
{
double z = TerrainUtil.SphericalFactor(x, y, rx, ry, strength);
if (z > 0) // add in non-zero amount
if (z > 0) // add in non-zero amount
{
const int NEIGHBOUR_ME = 4;
const int NEIGHBOUR_MAX = 9;