From b16abc8166c29585cb76cc55c3bdd76e5833cb4f Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Thu, 5 Jan 2017 19:07:37 +0000 Subject: Massive tab and trailing space cleanup --- .../Server/IRCClientView.cs | 254 ++++++++++----------- .../Agent/TextureSender/J2KDecoderCommandModule.cs | 20 +- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 182 +++++++-------- .../OptionalModules/Asset/AssetInfoModule.cs | 32 +-- .../Avatar/Animations/AnimationsCommandModule.cs | 28 +-- .../Avatar/Appearance/AppearanceInfoModule.cs | 42 ++-- .../Avatar/Attachments/AttachmentsCommandModule.cs | 20 +- .../Avatar/Attachments/TempAttachmentsModule.cs | 4 +- .../OptionalModules/Avatar/Chat/ChannelState.cs | 22 +- .../OptionalModules/Avatar/Chat/IRCConnector.cs | 16 +- .../OptionalModules/Avatar/Chat/RegionState.cs | 4 +- .../Avatar/Concierge/ConciergeModule.cs | 40 ++-- .../Avatar/Friends/FriendsCommandsModule.cs | 16 +- .../Avatar/SitStand/SitStandCommandsModule.cs | 22 +- .../Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs | 60 ++--- .../Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs | 118 +++++----- .../Avatar/XmlRpcGroups/GroupsMessagingModule.cs | 60 ++--- .../Avatar/XmlRpcGroups/GroupsModule.cs | 48 ++-- .../XmlRpcGroups/IGroupsServicesConnector.cs | 4 +- .../SimianGroupsServicesConnectorModule.cs | 94 ++++---- .../Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs | 16 +- .../XmlRpcGroupsServicesConnectorModule.cs | 22 +- .../DataSnapshot/DataSnapshotManager.cs | 4 +- .../OptionalModules/DataSnapshot/LandSnapshot.cs | 2 +- .../BareBonesNonShared/BareBonesNonSharedModule.cs | 28 +-- .../BareBonesShared/BareBonesSharedModule.cs | 32 +-- .../WebSocketEchoTest/WebSocketEchoModule.cs | 10 +- .../Framework/Monitoring/MonitorServicesModule.cs | 8 +- .../OptionalModules/Materials/MaterialsModule.cs | 40 ++-- .../PhysicsParameters/PhysicsParameters.cs | 18 +- .../PrimLimitsModule/PrimLimitsModule.cs | 20 +- .../OptionalModules/Properties/AssemblyInfo.cs | 8 +- .../Scripting/JsonStore/JsonStore.cs | 130 +++++------ .../Scripting/JsonStore/JsonStoreCommands.cs | 8 +- .../Scripting/JsonStore/JsonStoreModule.cs | 78 +++---- .../Scripting/JsonStore/JsonStoreScriptModule.cs | 102 ++++----- .../JsonStore/Tests/JsonStoreScriptModuleTests.cs | 80 +++---- .../Minimodule/Interfaces/IAvatarAttachment.cs | 2 +- .../Minimodule/Interfaces/IInventoryItem.cs | 2 +- .../Scripting/Minimodule/Interfaces/IObject.cs | 16 +- .../Scripting/Minimodule/InventoryItem.cs | 8 +- .../Scripting/Minimodule/MicroScheduler.cs | 2 +- .../Scripting/Minimodule/SOPObject.cs | 28 +-- .../Scripting/Minimodule/SOPObjectInventory.cs | 36 +-- .../Scripting/Minimodule/SPAvatar.cs | 8 +- .../Scripting/Minimodule/SPAvatarAttachment.cs | 6 +- .../Scripting/Minimodule/Test/TestModule.cs | 4 +- .../OptionalModules/Scripting/Minimodule/World.cs | 6 +- .../RegionReadyModule/RegionReadyModule.cs | 34 +-- .../XmlRpcRouterModule/XmlRpcGridRouterModule.cs | 6 +- .../FreeswitchServiceInConnectorModule.cs | 4 +- .../UserStatistics/Clients_report.cs | 10 +- .../UserStatistics/Default_Report.cs | 18 +- .../OptionalModules/UserStatistics/HTMLUtil.cs | 4 +- .../OptionalModules/UserStatistics/LogLinesAJAX.cs | 12 +- .../UserStatistics/Prototype_distributor.cs | 2 +- .../UserStatistics/Sessions_Report.cs | 10 +- .../OptionalModules/UserStatistics/SimStatsAJAX.cs | 8 +- .../UserStatistics/WebStatsModule.cs | 36 +-- .../ViewerSupport/CameraOnlyModeModule.cs | 2 +- .../ViewerSupport/DynamicMenuModule.cs | 4 +- .../ViewerSupport/GodNamesModule.cs | 4 +- .../ViewerSupport/SimulatorFeaturesHelper.cs | 2 +- .../World/AutoBackup/AutoBackupModule.cs | 20 +- .../World/AutoBackup/AutoBackupModuleState.cs | 2 +- .../World/MoneyModule/SampleMoneyModule.cs | 60 ++--- .../Region/OptionalModules/World/NPC/NPCAvatar.cs | 32 +-- .../World/NPC/Tests/NPCModuleTests.cs | 4 +- .../World/SceneCommands/SceneCommandsModule.cs | 32 +-- .../World/TreePopulator/TreePopulatorModule.cs | 18 +- 70 files changed, 1067 insertions(+), 1067 deletions(-) (limited to 'OpenSim/Region/OptionalModules') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 8b8ebe0..83b534b 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -589,8 +589,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { return new Dictionary(); } - - public void SetGroupPowers(Dictionary powers) { } + + public void SetGroupPowers(Dictionary powers) { } public ulong GetGroupPowers(UUID groupID) { @@ -898,12 +898,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void InPacket(object NewPack) { - + } public void ProcessInPacket(Packet NewPack) { - + } public void Close() @@ -953,32 +953,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendWearables(AvatarWearable[] wearables, int serial) { - + } public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) { - + } - + public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List cachedTextures) { } - + public void SendStartPingCheck(byte seq) { - + } public void SendKillObject(List localID) { - + } public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) { - + } public void SendChatMessage( @@ -1005,7 +1005,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendGenericMessage(string method, UUID invoice, List message) { - + } public virtual bool CanSendLayerData() @@ -1015,32 +1015,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendLayerData(float[] map) { - + } public void SendLayerData(int px, int py, float[] map) { - + } public void SendWindData(int version, Vector2[] windSpeeds) { - + } public void SendCloudData(int version, float[] cloudCover) { - + } public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) { - + } public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) { - + } public AgentCircuitData RequestClientInfo() @@ -1050,32 +1050,32 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) { - + } public void SendMapBlock(List mapBlocks, uint flag) { - + } public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) { - + } public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) { - + } public void SendTeleportFailed(string reason) { - + } public void SendTeleportStart(uint flags) { - + } public void SendTeleportProgress(uint flags, string message) @@ -1084,17 +1084,17 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance, int transactionType, UUID sourceID, bool sourceIsGroup, UUID destID, bool destIsGroup, int amount, string item) { - + } public void SendPayPrice(UUID objectID, int[] payPrice) { - + } public void SendCoarseLocationUpdate(List users, List CoarseLocations) { - + } public void SendAvatarDataImmediate(ISceneEntity avatar) @@ -1119,12 +1119,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, int version, bool fetchFolders, bool fetchItems) { - + } public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) { - + } public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) @@ -1139,72 +1139,72 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendRemoveInventoryItem(UUID itemID) { - + } public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) { - + } public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) { - + } public void SendBulkUpdateInventory(InventoryNodeBase node) { - + } public void SendXferPacket(ulong xferID, uint packet, byte[] data, bool isTaskInventory) { - + } public void SendAbortXferPacket(ulong xferID) { - + } public void SendEconomyData(float EnergyEfficiency, int ObjectCapacity, int ObjectCount, int PriceEnergyUnit, int PriceGroupCreate, int PriceObjectClaim, float PriceObjectRent, float PriceObjectScaleFactor, int PriceParcelClaim, float PriceParcelClaimFactor, int PriceParcelRent, int PricePublicObjectDecay, int PricePublicObjectDelete, int PriceRentLight, int PriceUpload, int TeleportMinPrice, float TeleportPriceExponent) { - + } public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List Data) { - + } public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) { - + } public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) { - + } public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) { - + } public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) { - + } public void SendAttachedSoundGainChange(UUID objectID, float gain) { - + } public void SendNameReply(UUID profileId, string firstname, string lastname) { - + } public void SendAlertMessage(string message) @@ -1214,12 +1214,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendAgentAlertMessage(string message, bool modal) { - + } public void SendAlertMessage(string message, string info) { - + } public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) @@ -1229,77 +1229,77 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) { - + } public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) { - + } public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) { - + } public void SendViewerTime(int phase) { - + } public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] membershipType, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) { - + } public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) { - + } public void SendHealth(float health) { - + } public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) { - + } public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) { - + } public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) { - + } public void SendEstateCovenantInformation(UUID covenant) { - + } public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner) { - + } public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { - + } public void SendLandAccessListData(List accessList, uint accessFlag, int localLandID) { - + } public void SendForceClientSelectObjects(List objectIDs) { - + } public void SendCameraConstraint(Vector4 ConstraintPlane) @@ -1309,57 +1309,57 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) { - + } public void SendLandParcelOverlay(byte[] data, int sequence_id) { - + } public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) { - + } public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) { - + } public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) { - + } public void SendConfirmXfer(ulong xferID, uint PacketID) { - + } public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) { - + } public void SendInitiateDownload(string simFileName, string clientFileName) { - + } public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) { - + } public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) { - + } public void SendImageNotFound(UUID imageid) { - + } public void SendShutdownConnectionNotice() @@ -1369,12 +1369,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendSimStats(SimStats stats) { - + } public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags) { - + } public void SendObjectPropertiesReply(ISceneEntity entity) @@ -1383,12 +1383,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendAgentOffline(UUID[] agentIDs) { - + } public void SendAgentOnline(UUID[] agentIDs) { - + } public void SendFindAgent(UUID HunterID, UUID PreyID, double GlobalX, double GlobalY) @@ -1397,62 +1397,62 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) { - + } public void SendAdminResponse(UUID Token, uint AdminLevel) { - + } public void SendGroupMembership(GroupMembershipData[] GroupMembership) { - + } public void SendGroupNameReply(UUID groupLLUID, string GroupName) { - + } public void SendJoinGroupReply(UUID groupID, bool success) { - + } public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) { - + } public void SendLeaveGroupReply(UUID groupID, bool success) { - + } public void SendCreateGroupReply(UUID groupID, bool success, string message) { - + } public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) { - + } public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) { - + } public void SendAsset(AssetRequestToClient req) { - + } public void SendTexture(AssetBase TextureAsset) { - + } public virtual void SetChildAgentThrottle(byte[] throttle) @@ -1467,7 +1467,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SetAgentThrottleSilent(int throttle, int setting) { - + } public byte[] GetThrottlesPacked(float multiplier) @@ -1498,12 +1498,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SetClientInfo(ClientInfo info) { - + } public void SetClientOption(string option, string value) { - + } public string GetClientOption(string option) @@ -1518,67 +1518,67 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendSetFollowCamProperties(UUID objectID, SortedDictionary parameters) { - + } public void SendClearFollowCamProperties(UUID objectID) { - + } public void SendRegionHandle(UUID regoinID, ulong handle) { - + } public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) { - + } public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) { - + } public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) { - + } public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) { - + } public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) { - + } public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) { - + } public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) { - + } public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) { - + } public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) { - + } public void SendEventInfoReply(EventData info) { - + } public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List SpawnPoint) @@ -1588,7 +1588,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) { - + } public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) @@ -1603,78 +1603,78 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendOfferCallingCard(UUID srcID, UUID transactionID) { - + } public void SendAcceptCallingCard(UUID transactionID) { - + } public void SendDeclineCallingCard(UUID transactionID) { - + } public void SendTerminateFriend(UUID exFriendID) { - + } public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) { - + } public void SendClassifiedInfoReply(UUID classifiedID, UUID creatorID, uint creationDate, uint expirationDate, uint category, string name, string description, UUID parcelID, uint parentEstate, UUID snapshotID, string simName, Vector3 globalPos, string parcelName, byte classifiedFlags, int price) { - + } public void SendAgentDropGroup(UUID groupID) { - + } public void RefreshGroupMembership() { - + } public void UpdateGroupMembership(GroupMembershipData[] data) { - + } public void GroupMembershipRemove(UUID GroupID) { - + } public void GroupMembershipAddReplace(UUID GroupID,ulong GroupPowers) { - + } public void SendAvatarNotesReply(UUID targetID, string text) { - + } public void SendAvatarPicksReply(UUID targetID, Dictionary picks) { - + } public void SendPickInfoReply(UUID pickID, UUID creatorID, bool topPick, UUID parcelID, string name, string desc, UUID snapshotID, string user, string originalName, string simName, Vector3 posGlobal, int sortOrder, bool enabled) { - + } public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds) { - + } public void SendAvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages) @@ -1684,22 +1684,22 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) { - + } public void SendUserInfoReply(bool imViaEmail, bool visible, string email) { - + } public void SendUseCachedMuteList() { - + } public void SendMuteListUpdate(string filename) { - + } public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) @@ -1716,15 +1716,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) { } - + public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt) { } - + public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier) { } - + public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) { } @@ -1748,7 +1748,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendAgentTerseUpdate(ISceneEntity presence) { } - + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) { } diff --git a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs index c897aa5..e93fcdc 100644 --- a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs @@ -54,36 +54,36 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; - + public string Name { get { return "Asset Information Module"; } } - + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: INITIALIZED MODULE"); } - + public void PostInitialise() { // m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: POST INITIALIZED MODULE"); } - + public void Close() { // m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { // m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); } - + public void RegionLoaded(Scene scene) { // m_log.DebugFormat("[J2K DECODER COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); @@ -117,10 +117,10 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); return; } - + AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); if (asset == null) - { + { MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); return; } diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 071530b..3be5a07 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -52,48 +52,48 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")] public class LindenUDPInfoModule : ISharedRegionModule { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + protected Dictionary m_scenes = new Dictionary(); - - public string Name { get { return "Linden UDP Module"; } } - + + public string Name { get { return "Linden UDP Module"; } } + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: INITIALIZED MODULE"); } - + public void PostInitialise() { // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: POST INITIALIZED MODULE"); } - + public void Close() { // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); - + lock (m_scenes) m_scenes[scene.RegionInfo.RegionID] = scene; scene.AddCommand( "Comms", this, "show pqueues", "show pqueues [full]", - "Show priority queue data for each client", + "Show priority queue data for each client", "Without the 'full' option, only root agents are shown." - + " With the 'full' option child agents are also shown.", + + " With the 'full' option child agents are also shown.", (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); - + scene.AddCommand( "Comms", this, "show queues", "show queues [full]", - "Show queue data for each client", + "Show queue data for each client", "Without the 'full' option, only root agents are shown.\n" + "With the 'full' option child agents are also shown.\n\n" + "Type - Rt is a root (avatar) client whilst cd is a child (neighbour interacting) client.\n" @@ -116,13 +116,13 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "clear image queues ", "Clear the image queues (textures downloaded via UDP) for a particular client.", (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); - + scene.AddCommand( "Comms", this, "show throttles", "show throttles [full]", - "Show throttle settings for each client and for the server overall", + "Show throttle settings for each client and for the server overall", "Without the 'full' option, only root agents are shown." - + " With the 'full' option child agents are also shown.", + + " With the 'full' option child agents are also shown.", (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); scene.AddCommand( @@ -134,15 +134,15 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - + lock (m_scenes) m_scenes.Remove(scene.RegionInfo.RegionID); - } - + } + public void RegionLoaded(Scene scene) { // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); @@ -176,7 +176,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden foreach (ScenePresence agent in foundAgents) { LLClientView client = agent.ControllingClient as LLClientView; - + if (client == null) return "This command is only supported for LLClientView"; @@ -191,10 +191,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden } protected string GetColumnEntry(string entry, int maxLength, int columnPadding) - { + { return string.Format( - "{0,-" + maxLength + "}{1,-" + columnPadding + "}", - entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, + "{0,-" + maxLength + "}{1,-" + columnPadding + "}", + entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, ""); } @@ -207,29 +207,29 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden { bool showChildren = false; string pname = ""; - + if (showParams.Length > 2 && showParams[2] == "full") - showChildren = true; + showChildren = true; else if (showParams.Length > 3) pname = showParams[2] + " " + showParams[3]; - - StringBuilder report = new StringBuilder(); + + StringBuilder report = new StringBuilder(); int columnPadding = 2; - int maxNameLength = 18; + int maxNameLength = 18; int maxRegionNameLength = 14; int maxTypeLength = 4; -// int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - +// int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); - + report.AppendFormat( "{0,7} {1,7} {2,7} {3,7} {4,7} {5,7} {6,7} {7,7} {8,7} {9,7} {10,7} {11,7}\n", "Pri 0", "Pri 1", - "Pri 2", + "Pri 2", "Pri 3", "Pri 4", "Pri 5", @@ -252,16 +252,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden bool isChild = client.SceneAgent.IsChildAgent; if (isChild && !showChildren) return; - + string name = client.Name; if (pname != "" && name != pname) return; - + string regionName = scene.RegionInfo.RegionName; - + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); - report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); + report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); report.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString()); } }); @@ -306,17 +306,17 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden foreach (ScenePresence agent in foundAgents) { LLClientView client = agent.ControllingClient as LLClientView; - + if (client == null) return "This command is only supported for LLClientView"; - + J2KImage[] images = client.ImageManager.GetImages(); report.AppendFormat( "In region {0} ({1} agent)\n", agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root"); report.AppendFormat("Images in queue: {0}\n", images.Length); - + if (images.Length > 0) { report.AppendFormat( @@ -327,7 +327,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Start Pkt", "Has Asset", "Decoded"); - + foreach (J2KImage image in images) report.AppendFormat( "{0,36} {1,8} {2,10} {3,10} {4,9} {5,7}\n", @@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return report.ToString(); } - + /// /// Generate UDP Queue data report for each client /// @@ -347,16 +347,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden { bool showChildren = false; string pname = ""; - + if (showParams.Length > 2 && showParams[2] == "full") - showChildren = true; + showChildren = true; else if (showParams.Length > 3) pname = showParams[2] + " " + showParams[3]; - - StringBuilder report = new StringBuilder(); - + + StringBuilder report = new StringBuilder(); + int columnPadding = 2; - int maxNameLength = 18; + int maxNameLength = 18; int maxRegionNameLength = 14; int maxTypeLength = 4; @@ -364,11 +364,11 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - + report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); - + report.AppendFormat( "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", "Since", @@ -383,7 +383,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Q Pkts", "Q Pkts", "Q Pkts"); - + report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7}\n", @@ -398,8 +398,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Cloud", "Task", "Texture", - "Asset"); - + "Asset"); + lock (m_scenes) { foreach (Scene scene in m_scenes.Values) @@ -413,7 +413,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden bool isChild = client.SceneAgent.IsChildAgent; if (isChild && !showChildren) return; - + string name = client.Name; if (pname != "" && name != pname) return; @@ -424,7 +424,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); - IStatsCollector stats = (IStatsCollector)client; + IStatsCollector stats = (IStatsCollector)client; report.AppendLine(stats.Report()); } }); @@ -432,8 +432,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden } return report.ToString(); - } - + } + /// /// Show throttle data /// @@ -443,28 +443,28 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden { bool showChildren = false; string pname = ""; - + if (showParams.Length > 2 && showParams[2] == "full") - showChildren = true; + showChildren = true; else if (showParams.Length > 3) pname = showParams[2] + " " + showParams[3]; - - StringBuilder report = new StringBuilder(); - + + StringBuilder report = new StringBuilder(); + int columnPadding = 2; - int maxNameLength = 18; + int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; - int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); - report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); - + report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); + report.AppendFormat( "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", "Max", - "Target", + "Target", "Actual", "Resend", "Land", @@ -472,8 +472,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Cloud", "Task", "Texture", - "Asset"); - + "Asset"); + report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", @@ -486,10 +486,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "kb/s", "kb/s", "kb/s", - "kb/s"); - + "kb/s"); + report.AppendLine(); - + lock (m_scenes) { foreach (Scene scene in m_scenes.Values) @@ -504,25 +504,25 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden bool isChild = client.SceneAgent.IsChildAgent; if (isChild && !showChildren) return; - + string name = client.Name; if (pname != "" && name != pname) return; string regionName = scene.RegionInfo.RegionName; - + LLUDPClient llUdpClient = llClient.UDPClient; ClientInfo ci = llUdpClient.GetClientInfo(); - + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); - report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); - + report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); + report.AppendFormat( "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", ci.maxThrottle > 0 ? ((ci.maxThrottle * 8) / 1000).ToString() : "-", - llUdpClient.FlowThrottle.AdaptiveEnabled - ? ((ci.targetThrottle * 8) / 1000).ToString() + llUdpClient.FlowThrottle.AdaptiveEnabled + ? ((ci.targetThrottle * 8) / 1000).ToString() : (llUdpClient.FlowThrottle.TotalDripRequest * 8 / 1000).ToString(), (ci.totalThrottle * 8) / 1000, (ci.resendThrottle * 8) / 1000, @@ -538,7 +538,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden } return report.ToString(); - } + } /// /// Show client stats data @@ -568,20 +568,20 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden string childAgentStatus; if (llClient.SceneAgent != null) - childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y"; + childAgentStatus = llClient.SceneAgent.IsChildAgent ? "N" : "Y"; else childAgentStatus = "Off!"; - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", scene.RegionInfo.RegionName, llClient.Name, - childAgentStatus, + childAgentStatus, (DateTime.Now - cinfo.StartedTime).Minutes, - avg_reqs, + avg_reqs, string.Format( - "{0} ({1:0.00}%)", - llClient.TotalAgentUpdates, - cinfo.SyncRequests.ContainsKey("AgentUpdate") - ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 + "{0} ({1:0.00}%)", + llClient.TotalAgentUpdates, + cinfo.SyncRequests.ContainsKey("AgentUpdate") + ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 : 0)); } }); diff --git a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs index 7639c6c..906e1ee 100644 --- a/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Asset/AssetInfoModule.cs @@ -50,36 +50,36 @@ namespace OpenSim.Region.OptionalModules.Asset // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private Scene m_scene; - + public string Name { get { return "Asset Information Module"; } } - + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("[ASSET INFO MODULE]: INITIALIZED MODULE"); } - + public void PostInitialise() { // m_log.DebugFormat("[ASSET INFO MODULE]: POST INITIALIZED MODULE"); } - + public void Close() { // m_log.DebugFormat("[ASSET INFO MODULE]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - } - + } + public void RegionLoaded(Scene scene) { // m_log.DebugFormat("[ASSET INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); @@ -118,27 +118,27 @@ namespace OpenSim.Region.OptionalModules.Asset MainConsole.Instance.OutputFormat("ERROR: {0} is not a valid ID format", rawAssetId); return; } - + AssetBase asset = m_scene.AssetService.Get(assetId.ToString()); if (asset == null) - { + { MainConsole.Instance.OutputFormat("ERROR: No asset found with ID {0}", assetId); - return; + return; } - + string fileName = rawAssetId; if (!ConsoleUtil.CheckFileDoesNotExist(MainConsole.Instance, fileName)) return; - + using (FileStream fs = new FileStream(fileName, FileMode.CreateNew)) { using (BinaryWriter bw = new BinaryWriter(fs)) { bw.Write(asset.Data); } - } - + } + MainConsole.Instance.OutputFormat("Asset dumped to file {0}", fileName); } diff --git a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs index 5c45e4d..0698cec 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Animations/AnimationsCommandModule.cs @@ -57,41 +57,41 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations private List m_scenes = new List(); public string Name { get { return "Animations Command Module"; } } - + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE"); } - + public void PostInitialise() { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE"); } - + public void Close() { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - + lock (m_scenes) m_scenes.Remove(scene); - } - + } + public void RegionLoaded(Scene scene) { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); - + lock (m_scenes) m_scenes.Add(scene); @@ -156,18 +156,18 @@ namespace OpenSim.Region.OptionalModules.Avatar.Animations string cma = spa.CurrentMovementAnimation; cdl.AddRow( - "Current movement anim", + "Current movement anim", string.Format("{0}, {1}", DefaultAvatarAnimations.GetDefaultAnimation(cma), cma)); UUID defaultAnimId = anims.DefaultAnimation.AnimID; cdl.AddRow( - "Default anim", + "Default anim", string.Format("{0}, {1}", defaultAnimId, sp.Animator.GetAnimName(defaultAnimId))); UUID implicitDefaultAnimId = anims.ImplicitDefaultAnimation.AnimID; cdl.AddRow( - "Implicit default anim", - string.Format("{0}, {1}", + "Implicit default anim", + string.Format("{0}, {1}", implicitDefaultAnimId, sp.Animator.GetAnimName(implicitDefaultAnimId))); cdl.AddToStringBuilder(sb); diff --git a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs index 2f9bb1e..60ae0cb 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Appearance/AppearanceInfoModule.cs @@ -54,43 +54,43 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance private List m_scenes = new List(); // private IAvatarFactoryModule m_avatarFactory; - - public string Name { get { return "Appearance Information Module"; } } - + + public string Name { get { return "Appearance Information Module"; } } + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("[APPEARANCE INFO MODULE]: INITIALIZED MODULE"); } - + public void PostInitialise() { // m_log.DebugFormat("[APPEARANCE INFO MODULE]: POST INITIALIZED MODULE"); } - + public void Close() { // m_log.DebugFormat("[APPEARANCE INFO MODULE]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { -// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); +// m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - + lock (m_scenes) m_scenes.Remove(scene); - } - + } + public void RegionLoaded(Scene scene) { // m_log.DebugFormat("[APPEARANCE INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); - + lock (m_scenes) m_scenes.Add(scene); @@ -99,7 +99,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance "show appearance [ ]", "Synonym for 'appearance show'", HandleShowAppearanceCommand); - + scene.AddCommand( "Users", this, "appearance show", "appearance show [ ]", @@ -222,7 +222,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance } lock (m_scenes) - { + { foreach (Scene scene in m_scenes) { if (targetNameSupplied) @@ -344,7 +344,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance if (targetNameSupplied) { - lock (m_scenes) + lock (m_scenes) { foreach (Scene scene in m_scenes) { @@ -360,12 +360,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance cdt.AddColumn("Name", ConsoleDisplayUtil.UserNameSize); cdt.AddColumn("Wearables", 2); - lock (m_scenes) + lock (m_scenes) { foreach (Scene scene in m_scenes) { scene.ForEachRootScenePresence( - sp => + sp => { int count = 0; @@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance uuidGatherer.AddForInspection(wi.AssetID); uuidGatherer.GatherAll(); - string[] assetStrings + string[] assetStrings = Array.ConvertAll(uuidGatherer.GatheredUuids.Keys.ToArray(), u => u.ToString()); bool[] existChecks = scene.AssetService.AssetsExist(assetStrings); @@ -438,10 +438,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Appearance cdt.AddColumn("Type", 10); cdt.AddColumn("UUID", ConsoleDisplayUtil.UuidSize); cdt.AddColumn("Found", 5); - + for (int k = 0; k < existChecks.Length; k++) cdt.AddRow( - (AssetType)uuidGatherer.GatheredUuids[new UUID(assetStrings[k])], + (AssetType)uuidGatherer.GatheredUuids[new UUID(assetStrings[k])], assetStrings[k], existChecks[k] ? "yes" : "no"); sb.Append(cdt.ToString()); diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs index a147e9b..3685041 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/AttachmentsCommandModule.cs @@ -55,41 +55,41 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments // private IAvatarFactoryModule m_avatarFactory; public string Name { get { return "Attachments Command Module"; } } - + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: INITIALIZED MODULE"); } - + public void PostInitialise() { // m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: POST INITIALIZED MODULE"); } - + public void Close() { // m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { // m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - + lock (m_scenes) m_scenes.Remove(scene); - } - + } + public void RegionLoaded(Scene scene) { // m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); - + lock (m_scenes) m_scenes.Add(scene); diff --git a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs index 535bf67..ed27385 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Attachments/TempAttachmentsModule.cs @@ -125,7 +125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments SendConsoleOutput(agentID, "Command parameter error"); return; } - + m_scene.StoreExtraSetting("auto_grant_attach_perms", val); SendConsoleOutput(agentID, String.Format("auto_grant_attach_perms set to {0}", val)); @@ -155,7 +155,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments ScenePresence target; if (!m_scene.TryGetScenePresence(item.PermsGranter, out target)) return 0; - + if (target.UUID != hostPart.ParentGroup.OwnerID) { uint effectivePerms = hostPart.ParentGroup.GetEffectivePermissions(); diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs index 73215cb..27ab32f 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/ChannelState.cs @@ -38,7 +38,7 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Avatar.Chat { - // An instance of this class exists for each unique combination of + // An instance of this class exists for each unique combination of // IRC chat interface characteristics, as determined by the supplied // configuration file. @@ -266,11 +266,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat ChannelState cs = p_cs; // Check to see if we have an existing server/channel setup that can be used - // In the absence of variable substitution this will always resolve to the - // same ChannelState instance, and the table will only contains a single - // entry, so the performance considerations for the existing behavior are + // In the absence of variable substitution this will always resolve to the + // same ChannelState instance, and the table will only contains a single + // entry, so the performance considerations for the existing behavior are // zero. Only the IRC connector is shared, the ChannelState still contains - // values that, while independent of the IRC connetion, do still distinguish + // values that, while independent of the IRC connetion, do still distinguish // this region's behavior. lock (IRCBridgeModule.m_channels) @@ -335,7 +335,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat } - // These routines allow differentiating changes to + // These routines allow differentiating changes to // the underlying channel state. If necessary, a // new channel state will be created. @@ -426,7 +426,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat } // This level of obsessive matching allows us to produce - // a minimal overhead int he case of a server which does + // a minimal overhead int he case of a server which does // need to differentiate IRC at a region level. private bool IsAPerfectMatchFor(ChannelState cs) @@ -447,8 +447,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat ); } - // This function implements the variable substitution mechanism - // for the configuration values. Each string read from the + // This function implements the variable substitution mechanism + // for the configuration values. Each string read from the // configuration file is scanned for '[...]' enclosures. Each // one that is found is replaced by either a runtime variable // (%xxx) or an existing configuration key. When no further @@ -585,7 +585,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat } - // This function is lifted from the IRCConnector because it + // This function is lifted from the IRCConnector because it // contains information that is not differentiating from an // IRC point-of-view. @@ -598,7 +598,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat { // Scan through the set of unique channel configuration for those - // that belong to this connector. And then forward the message to + // that belong to this connector. And then forward the message to // all regions known to those channels. // Note that this code is responsible for completing some of the // settings for the inbound OSChatMessage diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs index 941379f..ffbebe7 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/IRCConnector.cs @@ -97,14 +97,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat // How many regions depend upon this connection // This count is updated by the ChannelState object and reflects the sum - // of the region clients associated with the set of associated channel + // of the region clients associated with the set of associated channel // state instances. That's why it cannot be managed here. internal int depends = 0; // This variable counts the number of resets that have been performed - // on the connector. When a listener thread terminates, it checks to - // see of the reset count has changed before it schedules another + // on the connector. When a listener thread terminates, it checks to + // see of the reset count has changed before it schedules another // reset. internal int m_resetk = 0; @@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat public void PrivMsg(string pattern, string from, string region, string msg) { - // m_log.DebugFormat("[IRC-Connector-{0}] PrivMsg to IRC from {1}: <{2}>", idn, from, + // m_log.DebugFormat("[IRC-Connector-{0}] PrivMsg to IRC from {1}: <{2}>", idn, from, // String.Format(pattern, m_ircChannel, from, region, msg)); // One message to the IRC server @@ -510,7 +510,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat c.Sender = null; c.SenderUUID = UUID.Zero; - // Is message "\001ACTION foo bar\001"? + // Is message "\001ACTION foo bar\001"? // Then change to: "/me foo bar" if ((1 == c.Message[0]) && c.Message.Substring(1).StartsWith("ACTION")) @@ -608,8 +608,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat string parms = String.Empty; // ":" indicates that a prefix is present - // There are NEVER more than 17 real - // fields. A parameter that starts with + // There are NEVER more than 17 real + // fields. A parameter that starts with // ":" indicates that the remainder of the // line is a single parameter value. @@ -873,7 +873,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat } // Being marked connected is not enough to ping. Socket establishment can sometimes take a long - // time, in which case the watch dog might try to ping the server before the socket has been + // time, in which case the watch dog might try to ping the server before the socket has been // set up, with nasty side-effects. else if (_pdk_ == 0) diff --git a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs index 5505001..a3ef83b 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Chat/RegionState.cs @@ -414,7 +414,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat } } - // This method gives the region an opportunity to interfere with + // This method gives the region an opportunity to interfere with // message delivery. For now we just enforce the enable/disable // flag. @@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Chat } } - // This supports any local message traffic that might be needed in + // This supports any local message traffic that might be needed in // support of command processing. At present there is none. internal void LocalChat(string msg) diff --git a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs index 6c147f4..c0de3d9 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Concierge/ConciergeModule.cs @@ -98,7 +98,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge // replace it. m_replacingChatModule = false; } - else + else { m_replacingChatModule = !configSource.Configs["Chat"].GetBoolean("enabled", true); } @@ -107,7 +107,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge { m_replacingChatModule = false; } - + m_log.InfoFormat("[Concierge] {0} ChatModule", m_replacingChatModule ? "replacing" : "not replacing"); // take note of concierge channel and of identity @@ -119,7 +119,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge m_xmlRpcPassword = config.GetString("password", m_xmlRpcPassword); m_brokerURI = config.GetString("broker", m_brokerURI); m_brokerUpdateTimeout = config.GetInt("broker_timeout", m_brokerUpdateTimeout); - + m_log.InfoFormat("[Concierge] reporting as \"{0}\" to our users", m_whoami); // calculate regions Regex @@ -207,7 +207,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge { } - new public Type ReplaceableInterface + new public Type ReplaceableInterface { get { return null; } } @@ -278,7 +278,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge // range of chat to cover the whole // region. however, we don't do this for whisper // (got to have some privacy) - if (c.Type != ChatTypeEnum.Whisper) + if (c.Type != ChatTypeEnum.Whisper) { base.OnChatBroadcast(sender, c); return; @@ -296,17 +296,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge { client.OnLogout += OnClientLoggedOut; - if (m_replacingChatModule) + if (m_replacingChatModule) client.OnChatFromClient += OnChatFromClient; } - + public void OnClientLoggedOut(IClientAPI client) { client.OnLogout -= OnClientLoggedOut; client.OnConnectionClosed -= OnClientLoggedOut; - + if (m_conciergedScenes.Contains(client.Scene)) { Scene scene = client.Scene as Scene; @@ -324,7 +324,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge Scene scene = agent.Scene; m_log.DebugFormat("[Concierge]: {0} enters {1}", agent.Name, scene.RegionInfo.RegionName); WelcomeAvatar(agent, scene); - AnnounceToAgentsRegion(scene, String.Format(m_announceEntering, agent.Name, + AnnounceToAgentsRegion(scene, String.Format(m_announceEntering, agent.Name, scene.RegionInfo.RegionName, scene.GetRootAgentCount())); UpdateBroker(scene); } @@ -337,7 +337,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge { Scene scene = agent.Scene; m_log.DebugFormat("[Concierge]: {0} leaves {1}", agent.Name, scene.RegionInfo.RegionName); - AnnounceToAgentsRegion(scene, String.Format(m_announceLeaving, agent.Name, + AnnounceToAgentsRegion(scene, String.Format(m_announceLeaving, agent.Name, scene.RegionInfo.RegionName, scene.GetRootAgentCount())); UpdateBroker(scene); } @@ -374,7 +374,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge scene.ForEachRootScenePresence(delegate(ScenePresence sp) { - list.Append(String.Format(" \n", sp.Name, sp.UUID)); + list.Append(String.Format(" \n", sp.Name, sp.UUID)); }); list.Append(""); @@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge private void UpdateBrokerDone(IAsyncResult result) { BrokerState bs = null; - try + try { bs = result.AsyncState as BrokerState; HttpWebRequest updatePost = bs.Poster; @@ -450,15 +450,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge catch (WebException we) { m_log.ErrorFormat("[Concierge] broker update to {0} failed with status {1}", bs.Uri, we.Status); - if (null != we.Response) + if (null != we.Response) { using (HttpWebResponse resp = we.Response as HttpWebResponse) { m_log.ErrorFormat("[Concierge] response from {0} status code: {1}", bs.Uri, resp.StatusCode); m_log.ErrorFormat("[Concierge] response from {0} status desc: {1}", bs.Uri, resp.StatusDescription); m_log.ErrorFormat("[Concierge] response from {0} server: {1}", bs.Uri, resp.Server); - - if (resp.ContentLength > 0) + + if (resp.ContentLength > 0) { StreamReader content = new StreamReader(resp.GetResponseStream()); m_log.ErrorFormat("[Concierge] response from {0} content: {1}", bs.Uri, content.ReadToEnd()); @@ -476,12 +476,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge // welcome file there: if yes, send it to the agent if (!String.IsNullOrEmpty(m_welcomes)) { - string[] welcomes = new string[] { + string[] welcomes = new string[] { Path.Combine(m_welcomes, agent.Scene.RegionInfo.RegionName), Path.Combine(m_welcomes, "DEFAULT")}; foreach (string welcome in welcomes) { - if (File.Exists(welcome)) + if (File.Exists(welcome)) { try { @@ -500,7 +500,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge { m_log.ErrorFormat("[Concierge]: welcome file {0} is malformed: {1}", welcome, fe); } - } + } return; } m_log.DebugFormat("[Concierge]: no welcome message for region {0}", scene.RegionInfo.RegionName); @@ -512,7 +512,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge // protected void AnnounceToAgentsRegion(Scene scene, string msg) // { // ScenePresence agent = null; - // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent)) + // if ((client.Scene is Scene) && (client.Scene as Scene).TryGetScenePresence(client.AgentId, out agent)) // AnnounceToAgentsRegion(agent, msg); // else // m_log.DebugFormat("[Concierge]: could not find an agent for client {0}", client.Name); @@ -587,7 +587,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Concierge string regionName = (string)requestData["region"]; IScene scene = m_scenes.Find(delegate(IScene s) { return s.RegionInfo.RegionName == regionName; }); - if (scene == null) + if (scene == null) throw new Exception(String.Format("unknown region \"{0}\"", regionName)); if (!m_conciergedScenes.Contains(scene)) diff --git a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs index 026ceca..31fc56a 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Friends/FriendsCommandsModule.cs @@ -61,31 +61,31 @@ namespace OpenSim.Region.OptionalModules.Avatar.Friends private IPresenceService m_presenceService; // private IAvatarFactoryModule m_avatarFactory; - - public string Name { get { return "Appearance Information Module"; } } - + + public string Name { get { return "Appearance Information Module"; } } + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("[FRIENDS COMMAND MODULE]: INITIALIZED MODULE"); } - + public void PostInitialise() { // m_log.DebugFormat("[FRIENDS COMMAND MODULE]: POST INITIALIZED MODULE"); } - + public void Close() { // m_log.DebugFormat("[FRIENDS COMMAND MODULE]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { // m_log.DebugFormat("[FRIENDS COMMANDO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("[FRIENDS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); diff --git a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs index 5a6b284..1b5ee04 100644 --- a/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/SitStand/SitStandCommandsModule.cs @@ -54,34 +54,34 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand private Scene m_scene; public string Name { get { return "SitStand Command Module"; } } - + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: INITIALIZED MODULE"); } - + public void PostInitialise() { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: POST INITIALIZED MODULE"); } - + public void Close() { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - } - + } + public void RegionLoaded(Scene scene) { // m_log.DebugFormat("[ANIMATIONS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); @@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand if (sitPart != null) { MainConsole.Instance.OutputFormat( - "Sitting {0} on {1} {2} in {3}", + "Sitting {0} on {1} {2} in {3}", sp.Name, sitPart.ParentGroup.Name, sitPart.ParentGroup.UUID, m_scene.Name); sp.HandleAgentRequestSit(sp.ControllingClient, sp.UUID, sitPart.UUID, Vector3.Zero); @@ -202,14 +202,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.SitStand foreach (ScenePresence sp in scenePresences) { - if (!sp.IsChildAgent && nameRegex.IsMatch(sp.Name)) + if (!sp.IsChildAgent && nameRegex.IsMatch(sp.Name)) scenePresencesMatched.Add(sp); } } else { ScenePresence sp = m_scene.GetScenePresence(firstName, lastName); - + if (sp != null && !sp.IsChildAgent) scenePresencesMatched.Add(sp); } diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs index 3db0781..c6d7fe6 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/FreeSwitchVoice/FreeSwitchVoiceModule.cs @@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice if (String.IsNullOrEmpty(m_freeSwitchRealm) || String.IsNullOrEmpty(m_freeSwitchAPIPrefix)) { - m_log.Error("[FreeSwitchVoice]: Freeswitch service mis-configured. Not starting."); + m_log.Error("[FreeSwitchVoice]: Freeswitch service mis-configured. Not starting."); return; } @@ -168,9 +168,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_buddy.php", m_freeSwitchAPIPrefix), FreeSwitchSLVoiceBuddyHTTPHandler); - + MainServer.Instance.AddHTTPHandler(String.Format("{0}/viv_watcher.php", m_freeSwitchAPIPrefix), - FreeSwitchSLVoiceWatcherHTTPHandler); + FreeSwitchSLVoiceWatcherHTTPHandler); m_log.InfoFormat("[FreeSwitchVoice]: using FreeSwitch server {0}", m_freeSwitchRealm); @@ -302,7 +302,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice public void OnRegisterCaps(Scene scene, UUID agentID, Caps caps) { m_log.DebugFormat( - "[FreeSwitchVoice]: OnRegisterCaps() called with agentID {0} caps {1} in scene {2}", + "[FreeSwitchVoice]: OnRegisterCaps() called with agentID {0} caps {1} in scene {2}", agentID, caps, scene.RegionInfo.RegionName); string capsBase = "/CAPS/" + caps.CapsObjectPath; @@ -352,7 +352,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice { m_log.DebugFormat( "[FreeSwitchVoice][PROVISIONVOICE]: ProvisionVoiceAccountRequest() request: {0}, path: {1}, param: {2}", request, path, param); - + ScenePresence avatar = scene.GetScenePresence(agentID); if (avatar == null) { @@ -423,9 +423,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice UUID agentID, Caps caps) { m_log.DebugFormat( - "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}", + "[FreeSwitchVoice][PARCELVOICE]: ParcelVoiceInfoRequest() on {0} for {1}", scene.RegionInfo.RegionName, agentID); - + ScenePresence avatar = scene.GetScenePresence(agentID); string avatarName = avatar.Name; @@ -512,7 +512,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice m_log.DebugFormat("[FreeSwitchVoice][CHATSESSION]: avatar \"{0}\": request: {1}, path: {2}, param: {3}", avatarName, request, path, param); - + return "true"; } @@ -610,7 +610,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice public Hashtable FreeSwitchSLVoiceBuddyHTTPHandler(Hashtable request) { m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceBuddyHTTPHandler called"); - + Hashtable response = new Hashtable(); response["int_response_code"] = 200; response["str_response_string"] = string.Empty; @@ -678,16 +678,16 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice // Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); // // m_log.DebugFormat( -// "[FREESWITCH]: FreeSwitchSLVoiceBuddyHTTPHandler() response {0}", +// "[FREESWITCH]: FreeSwitchSLVoiceBuddyHTTPHandler() response {0}", // normalizeEndLines.Replace((string)response["str_response_string"],"")); - + return response; } public Hashtable FreeSwitchSLVoiceWatcherHTTPHandler(Hashtable request) { m_log.Debug("[FreeSwitchVoice]: FreeSwitchSLVoiceWatcherHTTPHandler called"); - + Hashtable response = new Hashtable(); response["int_response_code"] = 200; response["content-type"] = "text/xml"; @@ -700,8 +700,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice StringBuilder resp = new StringBuilder(); resp.Append(""); - - // FIXME: This is enough of a response to stop viewer 2 complaining about a login failure and get voice to work. If we don't + + // FIXME: This is enough of a response to stop viewer 2 complaining about a login failure and get voice to work. If we don't // give an OK response, then viewer 2 engages in an continuous viv_signin.php, viv_buddy.php, viv_watcher.php loop // Viewer 1 appeared happy to ignore the lack of reply and still works with this reply. // @@ -711,19 +711,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice lib_session {0} {0} - ", auth_token)); - + ", auth_token)); + response["str_response_string"] = resp.ToString(); - + // Regex normalizeEndLines = new Regex(@"(\r\n|\n)", RegexOptions.Compiled | RegexOptions.Singleline | RegexOptions.Multiline); // // m_log.DebugFormat( -// "[FREESWITCH]: FreeSwitchSLVoiceWatcherHTTPHandler() response {0}", +// "[FREESWITCH]: FreeSwitchSLVoiceWatcherHTTPHandler() response {0}", // normalizeEndLines.Replace((string)response["str_response_string"],"")); - + return response; } - + public Hashtable FreeSwitchSLVoiceSigninHTTPHandler(Hashtable request) { //m_log.Debug("[FreeSwitchVoice] FreeSwitchSLVoiceSigninHTTPHandler called"); @@ -771,10 +771,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice ", userid, pos, avatarName); - response["int_response_code"] = 200; - + response["int_response_code"] = 200; + // m_log.DebugFormat("[FreeSwitchVoice]: Sending FreeSwitchSLVoiceSigninHTTPHandler response"); - + return response; } @@ -859,23 +859,23 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.FreeSwitchVoice response["keepalive"] = false; response["int_response_code"] = 500; - Hashtable requestBody = ParseRequestBody((string)request["body"]); + Hashtable requestBody = ParseRequestBody((string)request["body"]); - string section = (string) requestBody["section"]; + string section = (string) requestBody["section"]; if (section == "directory") { string eventCallingFunction = (string)requestBody["Event-Calling-Function"]; m_log.DebugFormat( - "[FreeSwitchVoice]: Received request for config section directory, event calling function '{0}'", - eventCallingFunction); - + "[FreeSwitchVoice]: Received request for config section directory, event calling function '{0}'", + eventCallingFunction); + response = m_FreeswitchService.HandleDirectoryRequest(requestBody); } else if (section == "dialplan") - { + { m_log.DebugFormat("[FreeSwitchVoice]: Received request for config section dialplan"); - + response = m_FreeswitchService.HandleDialplanRequest(requestBody); } else diff --git a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs index 5ea4a31..57930d7 100644 --- a/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/Voice/VivoxVoice/VivoxVoiceModule.cs @@ -114,7 +114,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice private static Dictionary m_parents = new Dictionary(); private static bool m_dumpXml; - + private IConfig m_config; private object m_Lock; @@ -153,22 +153,22 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // Validate against constraints and default if necessary if (m_vivoxChannelRollOff < CHAN_ROLL_OFF_MIN || m_vivoxChannelRollOff > CHAN_ROLL_OFF_MAX) { - m_log.WarnFormat("[VivoxVoice] Invalid value for roll off ({0}), reset to {1}.", + m_log.WarnFormat("[VivoxVoice] Invalid value for roll off ({0}), reset to {1}.", m_vivoxChannelRollOff, CHAN_ROLL_OFF_DEFAULT); m_vivoxChannelRollOff = CHAN_ROLL_OFF_DEFAULT; } if (m_vivoxChannelMaximumRange < CHAN_MAX_RANGE_MIN || m_vivoxChannelMaximumRange > CHAN_MAX_RANGE_MAX) { - m_log.WarnFormat("[VivoxVoice] Invalid value for maximum range ({0}), reset to {1}.", + m_log.WarnFormat("[VivoxVoice] Invalid value for maximum range ({0}), reset to {1}.", m_vivoxChannelMaximumRange, CHAN_MAX_RANGE_DEFAULT); m_vivoxChannelMaximumRange = CHAN_MAX_RANGE_DEFAULT; } - if (m_vivoxChannelClampingDistance < CHAN_CLAMPING_DISTANCE_MIN || + if (m_vivoxChannelClampingDistance < CHAN_CLAMPING_DISTANCE_MIN || m_vivoxChannelClampingDistance > CHAN_CLAMPING_DISTANCE_MAX) { - m_log.WarnFormat("[VivoxVoice] Invalid value for clamping distance ({0}), reset to {1}.", + m_log.WarnFormat("[VivoxVoice] Invalid value for clamping distance ({0}), reset to {1}.", m_vivoxChannelClampingDistance, CHAN_CLAMPING_DISTANCE_DEFAULT); m_vivoxChannelClampingDistance = CHAN_CLAMPING_DISTANCE_DEFAULT; } @@ -180,7 +180,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice case "presentation" : break; case "auditorium" : break; default : - m_log.WarnFormat("[VivoxVoice] Invalid value for channel mode ({0}), reset to {1}.", + m_log.WarnFormat("[VivoxVoice] Invalid value for channel mode ({0}), reset to {1}.", m_vivoxChannelMode, CHAN_MODE_DEFAULT); m_vivoxChannelMode = CHAN_MODE_DEFAULT; break; @@ -191,7 +191,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice case "positional" : break; case "channel" : break; default : - m_log.WarnFormat("[VivoxVoice] Invalid value for channel type ({0}), reset to {1}.", + m_log.WarnFormat("[VivoxVoice] Invalid value for channel type ({0}), reset to {1}.", m_vivoxChannelType, CHAN_TYPE_DEFAULT); m_vivoxChannelType = CHAN_TYPE_DEFAULT; break; @@ -230,7 +230,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice public void AddRegion(Scene scene) { - if (m_pluginEnabled) + if (m_pluginEnabled) { lock (vlock) { @@ -238,13 +238,13 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice string sceneUUID = scene.RegionInfo.RegionID.ToString(); string sceneName = scene.RegionInfo.RegionName; - + // Make sure that all local channels are deleted. // So we have to search for the children, and then do an // iteration over the set of chidren identified. // This assumes that there is just one directory per // region. - + if (VivoxTryGetDirectory(sceneUUID + "D", out channelId)) { m_log.DebugFormat("[VivoxVoice]: region {0}: uuid {1}: located directory id {2}", @@ -263,7 +263,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice { if (!IsOK(VivoxDeleteChannel(channelId, id))) m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id); - } + } } } } @@ -311,7 +311,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice public void RemoveRegion(Scene scene) { - if (m_pluginEnabled) + if (m_pluginEnabled) { lock (vlock) { @@ -319,7 +319,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice string sceneUUID = scene.RegionInfo.RegionID.ToString(); string sceneName = scene.RegionInfo.RegionName; - + // Make sure that all local channels are deleted. // So we have to search for the children, and then do an // iteration over the set of chidren identified. @@ -343,7 +343,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice { if (!IsOK(VivoxDeleteChannel(channelId, id))) m_log.WarnFormat("[VivoxVoice] Channel delete failed {0}:{1}:{2}", i, channelId, id); - } + } } } } @@ -353,7 +353,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // Remove the channel umbrella entry - lock (m_parents) + lock (m_parents) { if (m_parents.ContainsKey(sceneUUID)) { @@ -375,7 +375,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice VivoxLogout(); } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } @@ -396,11 +396,11 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // (login, region crossing). We contribute two capabilities to // the set of capabilities handed back to the client: // ProvisionVoiceAccountRequest and ParcelVoiceInfoRequest. - // + // // ProvisionVoiceAccountRequest allows the client to obtain // the voice account credentials for the avatar it is // controlling (e.g., user name, password, etc). - // + // // ParcelVoiceInfoRequest is invoked whenever the client // changes from one region or parcel to another. // @@ -493,9 +493,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice if (XmlFind(resp, "response.level0.status", out code)) { - if (code != "OK") + if (code != "OK") { - if (XmlFind(resp, "response.level0.body.code", out code)) + if (XmlFind(resp, "response.level0.body.code", out code)) { // If the request was recognized, then this should be set to something switch (code) @@ -530,27 +530,27 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice switch (code) { case "201" : // Account expired - m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : expired credentials", + m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : expired credentials", avatarName); m_adminConnected = false; retry = DoAdminLogin(); break; - + case "202" : // Missing credentials - m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : missing credentials", + m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : missing credentials", avatarName); break; - + case "212" : // Not authorized m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : not authorized", avatarName); break; - + case "300" : // Required parameter missing - m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : parameter missing", + m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : parameter missing", avatarName); break; - + case "400" : // Create failed m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Create account information failed : create failed", avatarName); @@ -558,7 +558,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice } } break; - + case "404" : // Failed to retrieve account m_log.ErrorFormat("[VivoxVoice]: avatar \"{0}\": Get account information failed : retrieve failed"); // [AMW] Sleep and retry for a fixed period? Or just abandon? @@ -575,7 +575,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice m_log.DebugFormat("[VivoxVoice][PROVISIONVOICE]: Get Account Request failed for \"{0}\"", avatarName); throw new Exception("Unable to execute request"); } - + // Unconditionally change the password on each request VivoxPassword(agentname, password); @@ -613,7 +613,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice string avatarName = avatar.Name; // - check whether we have a region channel in our cache - // - if not: + // - if not: // create it and cache it // - send it to the client // - send channel_uri: as "sip:regionID@m_sipDomain" @@ -622,7 +622,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice LLSDParcelVoiceInfoResponse parcelVoiceInfo; string channel_uri; - if (null == scene.LandChannel) + if (null == scene.LandChannel) throw new Exception(String.Format("region \"{0}\": avatar \"{1}\": land data not yet available", scene.RegionInfo.RegionName, avatarName)); @@ -667,15 +667,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice parcelVoiceInfo = new LLSDParcelVoiceInfoResponse(scene.RegionInfo.RegionName, land.LocalID, creds); string r = LLSDHelpers.SerialiseLLSDReply(parcelVoiceInfo); -// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", +// m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": Parcel \"{1}\" ({2}): avatar \"{3}\": {4}", // scene.RegionInfo.RegionName, land.Name, land.LocalID, avatarName, r); return r; } catch (Exception e) { - m_log.ErrorFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later", + m_log.ErrorFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2}, retry later", scene.RegionInfo.RegionName, avatarName, e.Message); - m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed", + m_log.DebugFormat("[VivoxVoice][PARCELVOICE]: region \"{0}\": avatar \"{1}\": {2} failed", scene.RegionInfo.RegionName, avatarName, e.ToString()); return ""; @@ -721,17 +721,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice { landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, land.Name); landUUID = land.GlobalID.ToString(); - m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", + m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", landName, land.LocalID, landUUID); } else { landName = String.Format("{0}:{1}", scene.RegionInfo.RegionName, scene.RegionInfo.RegionName); landUUID = scene.RegionInfo.RegionID.ToString(); - m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", + m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parcel id {1}: using channel name {2}", landName, land.LocalID, landUUID); } - + lock (vlock) { // Added by Adam to help debug channel not availible errors. @@ -742,7 +742,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice else throw new Exception("vivox channel uri not available"); - m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ", + m_log.DebugFormat("[VivoxVoice]: Region:Parcel \"{0}\": parent channel id {1}: retrieved parcel channel_uri {2} ", landName, parentId, channelUri); } @@ -817,14 +817,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// /// Create a channel. - /// Once again, there a multitude of options possible. In the simplest case + /// Once again, there a multitude of options possible. In the simplest case /// we specify only the name and get a non-persistent cannel in return. Non /// persistent means that the channel gets deleted if no-one uses it for /// 5 hours. To accomodate future requirements, it may be a good idea to /// initially create channels under the umbrella of a parent ID based upon /// the region name. That way we have a context for side channels, if those /// are required in a later phase. - /// + /// /// In this case the call handles parent and description as optional values. /// private bool VivoxTryCreateChannel(string parent, string channelId, string description, out string channelUri) @@ -846,7 +846,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice requrl = String.Format("{0}&chan_dist_model={1}", requrl, m_vivoxChannelDistanceModel); requrl = String.Format("{0}&chan_max_range={1}", requrl, m_vivoxChannelMaximumRange); requrl = String.Format("{0}&chan_clamping_distance={1}", requrl, m_vivoxChannelClampingDistance); - + XmlElement resp = VivoxCall(requrl, true); if (XmlFind(resp, "response.level0.body.chan_uri", out channelUri)) return true; @@ -889,7 +889,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// /// Retrieve a channel. - /// Once again, there a multitude of options possible. In the simplest case + /// Once again, there a multitude of options possible. In the simplest case /// we specify only the name and get a non-persistent cannel in return. Non /// persistent means that the channel gets deleted if no-one uses it for /// 5 hours. To accomodate future requirements, it may be a good idea to @@ -898,7 +898,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// are required in a later phase. /// In this case the call handles parent and description as optional values. /// - private bool VivoxTryGetChannel(string channelParent, string channelName, + private bool VivoxTryGetChannel(string channelParent, string channelName, out string channelId, out string channelUri) { string count; @@ -1006,7 +1006,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice string type; // skip if not a directory - if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.type", i, out type) || + if (!XmlFind(resp, "response.level0.channel-search.channels.channels.level4.type", i, out type) || type != "dir") continue; @@ -1044,7 +1044,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// /// Delete a channel. - /// Once again, there a multitude of options possible. In the simplest case + /// Once again, there a multitude of options possible. In the simplest case /// we specify only the name and get a non-persistent cannel in return. Non /// persistent means that the channel gets deleted if no-one uses it for /// 5 hours. To accomodate future requirements, it may be a good idea to @@ -1098,7 +1098,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // return VivoxGetChannelById(null, id); // } // } - // } + // } // } // } @@ -1106,12 +1106,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice // return VivoxGetChannel(null, Guid.NewGuid().ToString()); // } - + /// /// This method handles the WEB side of making a request over the /// Vivox interface. The returned values are tansferred to a has /// table which is returned as the result. - /// The outcome of the call can be determined by examining the + /// The outcome of the call can be determined by examining the /// status value in the hash table. /// private XmlElement VivoxCall(string requrl, bool admin) @@ -1127,7 +1127,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice doc = new XmlDocument(); // Let's serialize all calls to Vivox. Most of these are driven by - // the clients (CAPs), when the user arrives at the region. We don't + // the clients (CAPs), when the user arrives at the region. We don't // want to issue many simultaneous http requests to Vivox, because mono // doesn't like that lock (m_Lock) @@ -1173,7 +1173,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// /// Login has been factored in this way because it gets called - /// from several places in the module, and we want it to work + /// from several places in the module, and we want it to work /// the same way each time. /// private bool DoAdminLogin() @@ -1188,15 +1188,15 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice XmlElement resp = null; resp = VivoxLogin(m_vivoxAdminUser, m_vivoxAdminPassword); - - if (XmlFind(resp, "response.level0.body.status", out status)) + + if (XmlFind(resp, "response.level0.body.status", out status)) { if (status == "Ok") { m_log.Info("[VivoxVoice] Admin connection established"); if (XmlFind(resp, "response.level0.body.auth_token", out m_authToken)) { - if (m_dumpXml) m_log.DebugFormat("[VivoxVoice] Auth Token <{0}>", + if (m_dumpXml) m_log.DebugFormat("[VivoxVoice] Auth Token <{0}>", m_authToken); m_adminConnected = true; } @@ -1215,9 +1215,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// /// The XmlScan routine is provided to aid in the - /// reverse engineering of incompletely + /// reverse engineering of incompletely /// documented packets returned by the Vivox - /// voice server. It is only called if the + /// voice server. It is only called if the /// m_dumpXml switch is set. /// private void XmlScanl(XmlElement e, int index) @@ -1262,7 +1262,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice private bool XmlFind(XmlElement root, string tag, int nth, out string result) { if (root == null || tag == null || tag == String.Empty) - { + { result = String.Empty; return false; } @@ -1273,7 +1273,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice { int nth = 0; if (root == null || tag == null || tag == String.Empty) - { + { result = String.Empty; return false; } @@ -1284,7 +1284,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice /// XmlSearch is initially called by XmlFind, and then /// recursively called by itself until the document /// supplied to XmlFind is either exhausted or the name hierarchy - /// is matched. + /// is matched. /// /// If the hierarchy is matched, the value is returned in /// result, and true returned as the function's @@ -1298,7 +1298,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Voice.VivoxVoice result = String.Empty; return false; } - + if (tags.Length-index == 1) { if (nth == 0) diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs index 0aaf95c..8791235 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsMessagingModule.cs @@ -125,7 +125,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (!m_groupMessagingEnabled) return; - + scene.RegisterModuleInterface(this); scene.AddCommand( @@ -136,7 +136,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups "This setting turns on very verbose groups messaging debugging", HandleDebugGroupsMessagingVerbose); } - + public void RegionLoaded(Scene scene) { if (!m_groupMessagingEnabled) @@ -205,7 +205,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups m_msgTransferModule = null; } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } @@ -253,7 +253,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); - + GroupRecord groupInfo = m_groupData.GetGroupRecord(agentID, groupID, null); if (groupInfo != null) @@ -270,7 +270,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { SendMessageToGroup(im, groupID, new UUID(im.fromAgentID), null); } - + public void SendMessageToGroup( GridInstantMessage im, UUID groupID, UUID sendingAgentForGroupCalls, Func sendCondition) { @@ -294,19 +294,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups m_usersOnlineCache.Add(groupID, onlineAgents, m_usersOnlineCacheExpirySeconds); } - attemptDeliveryUuidSet + attemptDeliveryUuidSet = new HashSet(Array.ConvertAll(onlineAgents, pi => pi.UserID)); } else { - attemptDeliveryUuidSet + attemptDeliveryUuidSet = new HashSet(groupMembers.ConvertAll(gmd => gmd.AgentID.ToString())); if (m_debugEnabled) m_log.DebugFormat( "[GROUPS-MESSAGING]: SendMessageToGroup called for group {0} with {1} visible members", groupID, groupMembers.Count); - } + } foreach (GroupMembersData member in groupMembers) { @@ -314,9 +314,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (!sendCondition(member)) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( - "[GROUPS-MESSAGING]: Not sending to {0} as they do not fulfill send condition", + "[GROUPS-MESSAGING]: Not sending to {0} as they do not fulfill send condition", member.AgentID); continue; @@ -325,7 +325,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups else if (m_groupData.hasAgentDroppedGroupChatSession(member.AgentID, groupID)) { // Don't deliver messages to people who have dropped this session - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( "[GROUPS-MESSAGING]: {0} has dropped session, not delivering to them", member.AgentID); @@ -360,9 +360,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // If they're not local, forward across the grid m_msgTransferModule.SendInstantMessage(msg, delegate(bool success) { }); - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( - "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms", + "[GROUPS-MESSAGING]: Delivering to {0} via grid took {1} ms", member.AgentID, Environment.TickCount - startTick); } else @@ -372,9 +372,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups ProcessMessageFromGroupSession(msg, client); // Deliver locally, directly - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( - "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms", + "[GROUPS-MESSAGING]: Delivering to {0} locally took {1} ms", member.AgentID, Environment.TickCount - startTick); } } @@ -385,9 +385,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups m_msgTransferModule.HandleUndeliverableMessage(msg, delegate(bool success) { }); - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( - "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms", + "[GROUPS-MESSAGING]: Handling undeliverable message for {0} took {1} ms", member.AgentID, Environment.TickCount - startTick); } } @@ -397,7 +397,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups "[GROUPS-MESSAGING]: Total SendMessageToGroup for group {0} with {1} members, {2} candidates for delivery took {3} ms", groupID, groupMembersCount, attemptDeliveryUuidSet.Count(), Environment.TickCount - requestStartTick); } - + #region SimGridEventHandlers void OnClientLogin(IClientAPI client) @@ -417,7 +417,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // The instant message module will only deliver messages of dialog types: // MessageFromAgent, StartTyping, StopTyping, MessageFromObject // - // Any other message type will not be delivered to a client by the + // Any other message type will not be delivered to a client by the // Instant Message Module if (m_debugEnabled) @@ -428,7 +428,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } // Incoming message from a group - if ((msg.fromGroup == true) && + if ((msg.fromGroup == true) && ((msg.dialog == (byte)InstantMessageDialog.SessionSend) || (msg.dialog == (byte)InstantMessageDialog.SessionAdd) || (msg.dialog == (byte)InstantMessageDialog.SessionDrop))) @@ -450,7 +450,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private void ProcessMessageFromGroupSession(GridInstantMessage msg, IClientAPI client) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( "[GROUPS-MESSAGING]: Session message from {0} going to agent {1}, sessionID {2}, type {3}", msg.fromAgentName, msg.toAgentID, msg.imSessionID, (InstantMessageDialog)msg.dialog); @@ -522,7 +522,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } } } - else + else { client.SendInstantMessage(msg); } @@ -570,7 +570,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (m_debugEnabled) m_log.InfoFormat("[GROUPS-MESSAGING]: imSessionID({0}) toAgentID({1})", im.imSessionID, im.toAgentID); GroupRecord groupInfo = m_groupData.GetGroupRecord(UUID.Zero, GroupID, null); - + if (groupInfo != null) { m_groupData.AgentInvitedToGroupChatSession(AgentID, GroupID); @@ -586,7 +586,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // Send a message from locally connected client to a group if ((im.dialog == (byte)InstantMessageDialog.SessionSend)) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); //If this agent is sending a message, then they want to be in the session @@ -597,7 +597,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if ((im.dialog == (byte)InstantMessageDialog.SessionDrop)) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Send message to session for group {0} with session ID {1}", GroupID, im.imSessionID.ToString()); m_groupData.AgentDroppedFromGroupChatSession(AgentID, GroupID); @@ -659,7 +659,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups /// private IClientAPI GetActiveClient(UUID agentID) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Looking for local client {0}", agentID); IClientAPI child = null; @@ -672,14 +672,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (!sp.IsChildAgent) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Found root agent for client : {0}", sp.ControllingClient.Name); return sp.ControllingClient; } else { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Found child agent for client : {0}", sp.ControllingClient.Name); child = sp.ControllingClient; @@ -690,12 +690,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // If we didn't find a root, then just return whichever child we found, or null if none if (child == null) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Could not find local client for agent : {0}", agentID); } else { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat("[GROUPS-MESSAGING]: Returning child agent for client : {0}", child.Name); } diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs index 81add13..f0de7d4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/GroupsModule.cs @@ -50,19 +50,19 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups /// ; To use this module, you must specify the following in your OpenSim.ini /// [GROUPS] /// Enabled = true - /// + /// /// Module = GroupsModule /// NoticesEnabled = true /// DebugEnabled = true - /// + /// /// GroupsServicesConnectorModule = XmlRpcGroupsServicesConnector /// XmlRpcServiceURL = http://osflotsam.org/xmlrpc.php /// XmlRpcServiceReadKey = 1234 /// XmlRpcServiceWriteKey = 1234 - /// + /// /// MessagingModule = GroupsMessagingModule /// MessagingEnabled = true - /// + /// /// ; Disables HTTP Keep-Alive for Groups Module HTTP Requests, work around for /// ; a problem discovered on some Windows based region servers. Only disable /// ; if you see a large number (dozens) of the following Exceptions: @@ -332,7 +332,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups remoteClient.SendAvatarGroupsReply(avatarID, avatarGroups); } - + private void OnClientClosed(UUID AgentId, Scene scene) { if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); @@ -387,7 +387,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); string GroupName; - + GroupRecord group = m_groupData.GetGroupRecord(GetRequestingAgentID(remoteClient), GroupID, null); if (group != null) { @@ -403,9 +403,9 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private void OnInstantMessage(IClientAPI remoteClient, GridInstantMessage im) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( - "[GROUPS]: {0} called for {1}, message type {2}", + "[GROUPS]: {0} called for {1}, message type {2}", System.Reflection.MethodBase.GetCurrentMethod().Name, remoteClient.Name, (InstantMessageDialog)im.dialog); // Group invitations @@ -569,20 +569,20 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (targetUser != null) { m_log.DebugFormat( - "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", + "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, targetUser.FirstName + " " + targetUser.LastName, member.AcceptNotices); } else { m_log.DebugFormat( - "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", + "[GROUPS]: Prepping group notice {0} for agent: {1} who Accepts Notices ({2})", NoticeID, member.AgentID, member.AcceptNotices); } } } } - GridInstantMessage msg + GridInstantMessage msg = CreateGroupNoticeIM(UUID.Zero, NoticeID, (byte)OpenMetaverse.InstantMessageDialog.GroupNotice); if (m_groupsMessagingModule != null) @@ -599,7 +599,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups UUID noticeID = new UUID(im.imSessionID); - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: Requesting notice {0} for {1}", noticeID, remoteClient.AgentId); GroupNoticeInfo notice = m_groupData.GetGroupNotice(GetRequestingAgentID(remoteClient), noticeID); @@ -625,10 +625,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } else { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( - "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.", - noticeID, remoteClient.AgentId); + "[GROUPS]: Could not find notice {0} for {1} on GroupNoticeInventoryAccepted.", + noticeID, remoteClient.AgentId); } } @@ -698,7 +698,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { return m_groupData.GetGroupRecord(UUID.Zero, UUID.Zero, name); } - + public void ActivateGroup(IClientAPI remoteClient, UUID groupID) { if (m_debugEnabled) m_log.DebugFormat("[GROUPS]: {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); @@ -739,10 +739,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public List GroupMembersRequest(IClientAPI remoteClient, UUID groupID) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( "[GROUPS]: GroupMembersRequest called for {0} from client {1}", groupID, remoteClient.Name); - + List data = m_groupData.GetGroupMembers(GetRequestingAgentID(remoteClient), groupID); if (m_debugEnabled) @@ -829,7 +829,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups public GroupMembershipData GetMembershipData(UUID groupID, UUID agentID) { - if (m_debugEnabled) + if (m_debugEnabled) m_log.DebugFormat( "[GROUPS]: {0} called with groupID={1}, agentID={2}", System.Reflection.MethodBase.GetCurrentMethod().Name, groupID, agentID); @@ -926,7 +926,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (membership != null) { return membership.GroupTitle; - } + } return string.Empty; } @@ -999,7 +999,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups case 1: // Remove m_groupData.RemoveAgentFromGroupRole(GetRequestingAgentID(remoteClient), memberID, groupID, roleID); - + break; default: m_log.ErrorFormat("[GROUPS]: {0} does not understand changes == {1}", System.Reflection.MethodBase.GetCurrentMethod().Name, changes); @@ -1185,7 +1185,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // Send Message to Ejectee GridInstantMessage msg = new GridInstantMessage(); - + string ejecteeName = "Unknown member"; // if local send a normal message if(ejecteeClient != null) @@ -1219,7 +1219,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups msg.timestamp = 0; msg.fromAgentName = agentName; msg.message = string.Format("You have been ejected from '{1}' by {0}.", agentName, groupInfo.GroupName); -// +// msg.fromGroup = false; msg.offline = (byte)0; msg.ParentEstateID = 0; @@ -1470,7 +1470,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups membershipArray = membershipData.ToArray(); } } - + if (m_debugEnabled) { m_log.InfoFormat("[GROUPS]: Get group membership information for {0} requested by {1}", dataForAgentID, requestingClient.AgentId); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs index cff3212..08c7096 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/IGroupsServicesConnector.cs @@ -43,7 +43,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups /// /// The UUID of the user making the request. /// - /// The ID of the record to retrieve. + /// The ID of the record to retrieve. /// GroupName may be specified instead, in which case this parameter will be UUID.Zero /// /// @@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups /// If the user is a member of the group then the data structure is returned. If not, then null is returned. /// GroupMembershipData GetAgentGroupMembership(UUID RequestingAgentID, UUID AgentID, UUID GroupID); - + /// /// Get information about the groups to which a user belongs. /// diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs index 2c45712..98c7ed4 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/SimianGroupsServicesConnectorModule.cs @@ -48,16 +48,16 @@ using OpenSim.Services.Interfaces; /*************************************************************************** * Simian Data Map * =============== - * + * * OwnerID -> Type -> Key * ----------------------- - * + * * UserID -> Group -> ActiveGroup * + GroupID - * + * * UserID -> GroupSessionDropped -> GroupID * UserID -> GroupSessionInvited -> GroupID - * + * * UserID -> GroupMember -> GroupID * + SelectedRoleID [UUID] * + AcceptNotices [bool] @@ -65,9 +65,9 @@ using OpenSim.Services.Interfaces; * + Contribution [int] * * UserID -> GroupRole[GroupID] -> RoleID - * - * - * GroupID -> Group -> GroupName + * + * + * GroupID -> Group -> GroupName * + Charter * + ShowInList * + InsigniaID @@ -79,17 +79,17 @@ using OpenSim.Services.Interfaces; * + EveryonePowers * + OwnerRoleID * + OwnersPowers - * + * * GroupID -> GroupRole -> RoleID * + Name * + Description * + Title * + Powers - * + * * GroupID -> GroupMemberInvite -> InviteID * + AgentID * + RoleID - * + * * GroupID -> GroupNotice -> NoticeID * + TimeStamp [uint] * + FromName [string] @@ -106,12 +106,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | - GroupPowers.Accountable | - GroupPowers.JoinChat | - GroupPowers.AllowVoiceChat | - GroupPowers.ReceiveNotices | - GroupPowers.StartProposal | + public const GroupPowers m_DefaultEveryonePowers = GroupPowers.AllowSetHome | + GroupPowers.Accountable | + GroupPowers.JoinChat | + GroupPowers.AllowVoiceChat | + GroupPowers.ReceiveNotices | + GroupPowers.StartProposal | GroupPowers.VoteOnProposal; // Would this be cleaner as (GroupPowers)ulong.MaxValue; @@ -168,12 +168,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private bool m_debugEnabled = false; private Dictionary m_pendingRequests = new Dictionary(); - + private ExpiringCache m_memoryCache; private int m_cacheTimeout = 30; // private IUserAccountService m_accountService = null; - + #region Region Module interfaceBase Members @@ -229,10 +229,10 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] Groups Cache Timeout set to {0}.", m_cacheTimeout); } - + m_memoryCache = new ExpiringCache(); - + // If we got all the config options we need, lets start'er'up m_connectorEnabled = true; @@ -287,8 +287,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups /// /// Create a Group, including Everyone and Owners Role, place FounderID in both groups, select Owner as selected role, and newly created group as agent's active role. /// - public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, - int membershipFee, bool openEnrollment, bool allowPublish, + public UUID CreateGroup(UUID requestingAgentID, string name, string charter, bool showInList, UUID insigniaID, + int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish, UUID founderID) { if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); @@ -313,7 +313,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { AddGroupRole(requestingAgentID, GroupID, UUID.Zero, "Everyone", "Members of " + name, "Member of " + name, (ulong)m_DefaultEveryonePowers); AddGroupRole(requestingAgentID, GroupID, OwnerRoleID, "Owners", "Owners of " + name, "Owner of " + name, (ulong)m_DefaultOwnerPowers); - + AddAgentToGroup(requestingAgentID, requestingAgentID, GroupID, OwnerRoleID); return GroupID; @@ -325,8 +325,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } - public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, - UUID insigniaID, int membershipFee, bool openEnrollment, + public void UpdateGroup(UUID requestingAgentID, UUID groupID, string charter, bool showInList, + UUID insigniaID, int membershipFee, bool openEnrollment, bool allowPublish, bool maturePublish) { if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); @@ -350,7 +350,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } - public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, + public void AddGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers) { if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); @@ -393,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups } - public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, + public void UpdateGroupRole(UUID requestingAgentID, UUID groupID, UUID roleID, string name, string description, string title, ulong powers) { if (m_debugEnabled) m_log.InfoFormat("[SIMIAN-GROUPS-CONNECTOR] {0} called", System.Reflection.MethodBase.GetCurrentMethod().Name); @@ -434,7 +434,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { return null; } - } + } else if (!string.IsNullOrEmpty(groupName)) { if (!SimianGetFirstGenericEntry("Group", groupName, out groupID, out GroupInfoMap)) @@ -481,7 +481,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { MemberGroupProfile.Charter = groupProfile["Charter"].AsString(); } - + MemberGroupProfile.ShowInList = groupProfile["ShowInList"].AsString() == "1"; MemberGroupProfile.InsigniaID = groupProfile["InsigniaID"].AsUUID(); MemberGroupProfile.MembershipFee = groupProfile["MembershipFee"].AsInteger(); @@ -489,7 +489,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups MemberGroupProfile.AllowPublish = groupProfile["AllowPublish"].AsBoolean(); MemberGroupProfile.MaturePublish = groupProfile["MaturePublish"].AsBoolean(); MemberGroupProfile.FounderID = groupProfile["FounderID"].AsUUID();; - MemberGroupProfile.OwnerRole = groupProfile["OwnerRoleID"].AsUUID(); + MemberGroupProfile.OwnerRole = groupProfile["OwnerRoleID"].AsUUID(); Dictionary Members; if (SimianGetGenericEntries("GroupMember",groupID.ToString(), out Members)) @@ -546,7 +546,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { GroupMemberInfo = new OSDMap(); } - + GroupMemberInfo["AcceptNotices"] = OSD.FromBoolean(acceptNotices); GroupMemberInfo["ListInProfile"] = OSD.FromBoolean(listInProfile); GroupMemberInfo["Contribution"] = OSD.FromInteger(0); @@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // Remove Group Member information for this group SimianRemoveGenericEntry(agentID, "GroupMember", groupID.ToString()); - // By using a Simian Generics Type consisting of a prefix and a groupID, + // By using a Simian Generics Type consisting of a prefix and a groupID, // combined with RoleID as key allows us to get a list of roles a particular member // of a group is assigned to. string GroupRoleMemberType = "GroupRole" + groupID.ToString(); @@ -696,7 +696,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { data.members = 0; } - + // TODO: sort results? // data.searchOrder = order; @@ -721,8 +721,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups data.AcceptNotices = UserGroupMemberInfo["AcceptNotices"].AsBoolean(); data.Contribution = UserGroupMemberInfo["Contribution"].AsInteger(); data.ListInProfile = UserGroupMemberInfo["ListInProfile"].AsBoolean(); - data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID(); - + data.ActiveRole = UserGroupMemberInfo["SelectedRoleID"].AsUUID(); + /////////////////////////////// // Agent Specific Information: // @@ -730,7 +730,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (SimianGetGenericEntry(agentID, "Group", "ActiveGroup", out UserActiveGroup)) { data.Active = UserActiveGroup["GroupID"].AsUUID().Equals(groupID); - } + } /////////////////////////////// // Role Specific Information: @@ -740,8 +740,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { data.GroupTitle = GroupRoleInfo["Title"].AsString(); data.GroupPowers = GroupRoleInfo["Powers"].AsULong(); - } - + } + /////////////////////////////// // Group Specific Information: // @@ -759,7 +759,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups data.MembershipFee = GroupInfo["MembershipFee"].AsInteger(); data.OpenEnrollment = GroupInfo["OpenEnrollment"].AsBoolean(); data.ShowInList = GroupInfo["ShowInList"].AsBoolean(); - } + } } return data; @@ -794,7 +794,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups memberships.Add(GetAgentGroupMembership(requestingAgentID, agentID, UUID.Parse(key))); } } - + return memberships; } @@ -1017,7 +1017,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups Notice["BinaryBucket"] = OSD.FromBinary(binaryBucket); SimianAddGeneric(groupID, "GroupNotice", noticeID.ToString(), Notice); - + } #endregion @@ -1250,7 +1250,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { "OwnerID", ownerID.ToString() }, { "Type", type } }; - + OSDMap response = CachedPostRequest(requestArgs); @@ -1357,7 +1357,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups || requestArgs["RequestMethod"] == "AddGeneric") { m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: clearing generics cache"); - + // Any and all updates cause the cache to clear m_memoryCache.Clear(); @@ -1383,14 +1383,14 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { if (m_memoryCache.TryGetValue(CacheKey, out response)) return response; - + if (! m_pendingRequests.ContainsKey(CacheKey)) { m_pendingRequests.Add(CacheKey,true); firstRequest = true; } } - + if (firstRequest) { // if it wasn't in the cache, pass the request to the Simian Grid Services @@ -1402,7 +1402,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups { m_log.ErrorFormat("[SIMIAN GROUPS CONNECTOR]: request failed {0}", CacheKey); } - + // and cache the response lock (m_memoryCache) { @@ -1420,7 +1420,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups // { // m_log.WarnFormat("[SIMIAN GROUPS CONNECTOR]: query not in the cache"); // Util.PrintCallStack(); - + // // if it wasn't in the cache, pass the request to the Simian Grid Services // response = WebUtil.PostToService(m_groupsServerURI, requestArgs); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs index a942516..ccfcd8b 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/Tests/GroupsModuleTests.cs @@ -77,12 +77,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests /* AgentGroupDataUpdate is udp TestHelpers.InMethod(); // TestHelpers.EnableLogging(); - + TestScene scene = new SceneHelpers().SetupScene(); IConfigSource configSource = new IniConfigSource(); - IConfig config = configSource.AddConfig("Groups"); + IConfig config = configSource.AddConfig("Groups"); config.Set("Enabled", true); - config.Set("Module", "GroupsModule"); + config.Set("Module", "GroupsModule"); config.Set("DebugEnabled", true); GroupsModule gm = new GroupsModule(); @@ -124,8 +124,8 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests Assert.That(foundUpdate, Is.True, "Did not find AgentGroupDataUpdate in response"); - // TODO: More checking of more actual event data. -*/ + // TODO: More checking of more actual event data. +*/ } [Test] @@ -133,7 +133,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests { TestHelpers.InMethod(); // TestHelpers.EnableLogging(); - + TestScene scene = new SceneHelpers().SetupScene(); MessageTransferModule mtm = new MessageTransferModule(); @@ -144,12 +144,12 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups.Tests IConfigSource configSource = new IniConfigSource(); { - IConfig config = configSource.AddConfig("Messaging"); + IConfig config = configSource.AddConfig("Messaging"); config.Set("MessageTransferModule", mtm.Name); } { - IConfig config = configSource.AddConfig("Groups"); + IConfig config = configSource.AddConfig("Groups"); config.Set("Enabled", true); config.Set("Module", gm.Name); config.Set("DebugEnabled", true); diff --git a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs index eb64f71..50d3f94 100644 --- a/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/Avatar/XmlRpcGroups/XmlRpcGroupsServicesConnectorModule.cs @@ -53,17 +53,17 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private bool m_debugEnabled = false; - public const GroupPowers DefaultEveryonePowers - = GroupPowers.AllowSetHome - | GroupPowers.Accountable - | GroupPowers.JoinChat - | GroupPowers.AllowVoiceChat - | GroupPowers.ReceiveNotices - | GroupPowers.StartProposal + public const GroupPowers DefaultEveryonePowers + = GroupPowers.AllowSetHome + | GroupPowers.Accountable + | GroupPowers.JoinChat + | GroupPowers.AllowVoiceChat + | GroupPowers.ReceiveNotices + | GroupPowers.StartProposal | GroupPowers.VoteOnProposal; // Would this be cleaner as (GroupPowers)ulong.MaxValue? - public const GroupPowers DefaultOwnerPowers + public const GroupPowers DefaultOwnerPowers = GroupPowers.Accountable | GroupPowers.AllowEditLand | GroupPowers.AllowFly @@ -823,7 +823,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups if (!m_groupsAgentsInvitedToChatSession[groupID].Contains(agentID)) m_groupsAgentsInvitedToChatSession[groupID].Add(agentID); - } + } private void CreateGroupChatSessionTracking(UUID groupID) { @@ -1051,7 +1051,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.XmlRpcGroups private void LogRespDataToConsoleError(UUID requestingAgentID, string function, Hashtable param, Hashtable respData) { m_log.ErrorFormat( - "[XMLRPC-GROUPS-CONNECTOR]: Error when calling {0} for {1} with params {2}. Response params are {3}", + "[XMLRPC-GROUPS-CONNECTOR]: Error when calling {0} for {1} with params {2}. Response params are {3}", function, requestingAgentID, Util.PrettyFormatToSingleLine(param), Util.PrettyFormatToSingleLine(respData)); } @@ -1151,7 +1151,7 @@ namespace Nwc.XmlRpc { _serializer.Serialize(xml, this); xml.Flush(); - } + } } XmlRpcResponse resp; diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs index 4e766eb..0436f96 100644 --- a/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs +++ b/OpenSim/Region/OptionalModules/DataSnapshot/DataSnapshotManager.cs @@ -101,7 +101,7 @@ namespace OpenSim.Region.DataSnapshot public void Initialise(IConfigSource config) { - if (!m_configLoaded) + if (!m_configLoaded) { m_configLoaded = true; //m_log.Debug("[DATASNAPSHOT]: Loading configuration"); @@ -248,7 +248,7 @@ namespace OpenSim.Region.DataSnapshot m_snapStore.ForceSceneStale(scene); } - public void Close() + public void Close() { if (!m_enabled) return; diff --git a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs index eb2867d..8e6a30e 100644 --- a/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs +++ b/OpenSim/Region/OptionalModules/DataSnapshot/LandSnapshot.cs @@ -143,7 +143,7 @@ namespace OpenSim.Region.DataSnapshot.Providers LandData parcel = land.LandData; if (m_parent.ExposureLevel.Equals("all") || - (m_parent.ExposureLevel.Equals("minimum") && + (m_parent.ExposureLevel.Equals("minimum") && (parcel.Flags & (uint)ParcelFlags.ShowDirectory) == (uint)ParcelFlags.ShowDirectory)) { diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs index bbf7168..95a2dd6 100644 --- a/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs +++ b/OpenSim/Region/OptionalModules/Example/BareBonesNonShared/BareBonesNonSharedModule.cs @@ -46,12 +46,12 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared /// /// /// This module is the simplest possible example of a non-shared region module (a module where each scene/region - /// in the simulator has its own copy). If anybody wants to create a more complex example in the future then + /// in the simulator has its own copy). If anybody wants to create a more complex example in the future then /// please create a separate class. - /// - /// This module is not active by default. If you want to see it in action, + /// + /// This module is not active by default. If you want to see it in action, /// then just uncomment the line below starting with [Extension(Path... - /// + /// /// When the module is enabled it will print messages when it receives certain events to the screen and the log /// file. /// @@ -59,34 +59,34 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesNonShared public class BareBonesNonSharedModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - public string Name { get { return "Bare Bones Non Shared Module"; } } - + + public string Name { get { return "Bare Bones Non Shared Module"; } } + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { m_log.DebugFormat("[BARE BONES NON SHARED]: INITIALIZED MODULE"); } - + public void Close() { m_log.DebugFormat("[BARE BONES NON SHARED]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - } - + } + public void RegionLoaded(Scene scene) { m_log.DebugFormat("[BARE BONES NON SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); - } + } } } \ No newline at end of file diff --git a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs index 46fea3e..1271e3f 100644 --- a/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs +++ b/OpenSim/Region/OptionalModules/Example/BareBonesShared/BareBonesSharedModule.cs @@ -46,52 +46,52 @@ namespace OpenSim.Region.OptionalModules.Example.BareBonesShared /// /// /// This module is the simplest possible example of a shared region module (a module which is shared by every - /// scene/region running on the simulator). If anybody wants to create a more complex example in the future then + /// scene/region running on the simulator). If anybody wants to create a more complex example in the future then /// please create a separate class. - /// - /// This module is not active by default. If you want to see it in action, + /// + /// This module is not active by default. If you want to see it in action, /// then just uncomment the line below starting with [Extension(Path... - /// + /// /// When the module is enabled it will print messages when it receives certain events to the screen and the log /// file. /// //[Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "BareBonesSharedModule")] public class BareBonesSharedModule : ISharedRegionModule { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - public string Name { get { return "Bare Bones Shared Module"; } } - + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + public string Name { get { return "Bare Bones Shared Module"; } } + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { m_log.DebugFormat("[BARE BONES SHARED]: INITIALIZED MODULE"); } - + public void PostInitialise() { m_log.DebugFormat("[BARE BONES SHARED]: POST INITIALIZED MODULE"); } - + public void Close() { m_log.DebugFormat("[BARE BONES SHARED]: CLOSED MODULE"); } - + public void AddRegion(Scene scene) { m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} ADDED", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} REMOVED", scene.RegionInfo.RegionName); - } - + } + public void RegionLoaded(Scene scene) { m_log.DebugFormat("[BARE BONES SHARED]: REGION {0} LOADED", scene.RegionInfo.RegionName); - } + } } } \ No newline at end of file diff --git a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs index 5bf0ed4..0747cc0 100644 --- a/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs +++ b/OpenSim/Region/OptionalModules/Example/WebSocketEchoTest/WebSocketEchoModule.cs @@ -40,7 +40,7 @@ using OpenSim.Framework.Servers.HttpServer; namespace OpenSim.Region.OptionalModules.WebSocketEchoModule { - + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "WebSocketEchoModule")] public class WebSocketEchoModule : ISharedRegionModule { @@ -111,7 +111,7 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule obj.SendPingCheck(); } - + private void HandlerOnOnUpgradeCompleted(object sender, UpgradeCompletedEventArgs completeddata) { WebSocketHttpServerHandler obj = sender as WebSocketHttpServerHandler; @@ -136,14 +136,14 @@ namespace OpenSim.Region.OptionalModules.WebSocketEchoModule obj.Dispose(); } - // Shutting down.. so shut down all sockets. + // Shutting down.. so shut down all sockets. // Note.. this should be done outside of an ienumerable if you're also hook to the close event. public void Close() { if (!enabled) return; - - // We convert this to a for loop so we're not in in an IEnumerable when the close + + // We convert this to a for loop so we're not in in an IEnumerable when the close //call triggers an event which then removes item from _activeHandlers that we're enumerating WebSocketHttpServerHandler[] items = new WebSocketHttpServerHandler[_activeHandlers.Count]; _activeHandlers.CopyTo(items); diff --git a/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs b/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs index a25e034..95bb13e 100644 --- a/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs +++ b/OpenSim/Region/OptionalModules/Framework/Monitoring/MonitorServicesModule.cs @@ -48,11 +48,11 @@ namespace OpenSim.Region.OptionalModules.Framework.Monitoring protected Scene m_scene; // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + public string Name { get { return "Services Health Monitoring Module"; } } - + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { } @@ -64,7 +64,7 @@ namespace OpenSim.Region.OptionalModules.Framework.Monitoring public void Close() { } - + public void AddRegion(Scene scene) { if (m_scene == null) diff --git a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs index b259f52..52fa908 100644 --- a/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs +++ b/OpenSim/Region/OptionalModules/Materials/MaterialsModule.cs @@ -59,8 +59,8 @@ namespace OpenSim.Region.OptionalModules.Materials { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public string Name { get { return "MaterialsModule"; } } - + public string Name { get { return "MaterialsModule"; } } + public Type ReplaceableInterface { get { return null; } } IAssetCache m_cache; @@ -88,13 +88,13 @@ namespace OpenSim.Region.OptionalModules.Materials if (m_enabled) m_log.DebugFormat("[Materials]: Initialized"); } - + public void Close() { if (!m_enabled) return; } - + public void AddRegion(Scene scene) { if (!m_enabled) @@ -152,7 +152,7 @@ namespace OpenSim.Region.OptionalModules.Materials m_scene.AssetService.Store(a); } }); - } + } } private void EventManager_OnObjectAddedToScene(SceneObjectGroup obj) @@ -166,7 +166,7 @@ namespace OpenSim.Region.OptionalModules.Materials { string capsBase = "/CAPS/" + caps.CapsObjectPath; - IRequestHandler renderMaterialsPostHandler + IRequestHandler renderMaterialsPostHandler = new RestStreamHandler("POST", capsBase + "/", (request, path, param, httpRequest, httpResponse) => RenderMaterialsPostCap(request, agentID), @@ -177,7 +177,7 @@ namespace OpenSim.Region.OptionalModules.Materials // and POST handlers, (at least at the time this was originally written), so we first set up a POST // handler normally and then add a GET handler via MainServer - IRequestHandler renderMaterialsGetHandler + IRequestHandler renderMaterialsGetHandler = new RestStreamHandler("GET", capsBase + "/", (request, path, param, httpRequest, httpResponse) => RenderMaterialsGetCap(request), @@ -185,14 +185,14 @@ namespace OpenSim.Region.OptionalModules.Materials MainServer.Instance.AddStreamHandler(renderMaterialsGetHandler); // materials viewer seems to use either POST or PUT, so assign POST handler for PUT as well - IRequestHandler renderMaterialsPutHandler + IRequestHandler renderMaterialsPutHandler = new RestStreamHandler("PUT", capsBase + "/", (request, path, param, httpRequest, httpResponse) => RenderMaterialsPutCap(request, agentID), "RenderMaterials", null); MainServer.Instance.AddStreamHandler(renderMaterialsPutHandler); } - + public void RemoveRegion(Scene scene) { if (!m_enabled) @@ -201,8 +201,8 @@ namespace OpenSim.Region.OptionalModules.Materials m_scene.EventManager.OnRegisterCaps -= OnRegisterCaps; m_scene.EventManager.OnObjectAddedToScene -= EventManager_OnObjectAddedToScene; m_scene.EventManager.OnBackup -= EventManager_OnBackup; - } - + } + public void RegionLoaded(Scene scene) { if (!m_enabled) return; @@ -285,7 +285,7 @@ namespace OpenSim.Region.OptionalModules.Materials /// Find the materials used in the SOP, and add them to 'm_regionMaterials'. /// private void GetStoredMaterialsInPart(SceneObjectPart part) - { + { if (part.Shape == null) return; @@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.Materials GetStoredMaterialInFace(part, te.DefaultTexture); else m_log.WarnFormat( - "[Materials]: Default texture for part {0} (part of object {1}) in {2} unexpectedly null. Ignoring.", + "[Materials]: Default texture for part {0} (part of object {1}) in {2} unexpectedly null. Ignoring.", part.Name, part.ParentGroup.Name, m_scene.Name); foreach (Primitive.TextureEntryFace face in te.FaceTextures) @@ -363,7 +363,7 @@ namespace OpenSim.Region.OptionalModules.Materials byte[] inBytes = req["Zipped"].AsBinary(); - try + try { osd = ZDecompressBytesToOsd(inBytes); @@ -409,7 +409,7 @@ namespace OpenSim.Region.OptionalModules.Materials //return ""; } } - + resp["Zipped"] = ZCompressOSD(respArr, false); string response = OSDParser.SerializeLLSDXmlString(resp); @@ -435,7 +435,7 @@ namespace OpenSim.Region.OptionalModules.Materials byte[] inBytes = req["Zipped"].AsBinary(); - try + try { osd = ZDecompressBytesToOsd(inBytes); @@ -493,7 +493,7 @@ namespace OpenSim.Region.OptionalModules.Materials m_log.WarnFormat("[Materials]: Error in TextureEntry for SOP {0} {1}", sop.Name, sop.UUID); continue; } - + UUID id; if (mat == null) { @@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.Materials //return ""; } } - + resp["Zipped"] = ZCompressOSD(respArr, false); string response = OSDParser.SerializeLLSDXmlString(resp); @@ -684,7 +684,7 @@ namespace OpenSim.Region.OptionalModules.Materials if (sop.Name != "Primitive") return sop.Name; - + if ((sop.ParentGroup != null) && (sop.ParentGroup.Name != "Primitive")) return sop.ParentGroup.Name; @@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.Materials using (MemoryStream msSinkCompressed = new MemoryStream()) { - using (Ionic.Zlib.ZlibStream zOut = new Ionic.Zlib.ZlibStream(msSinkCompressed, + using (Ionic.Zlib.ZlibStream zOut = new Ionic.Zlib.ZlibStream(msSinkCompressed, Ionic.Zlib.CompressionMode.Compress, CompressionLevel.BestCompression, true)) { zOut.Write(data, 0, data.Length); diff --git a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs index 1d9179c..bcfb34d 100755 --- a/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs +++ b/OpenSim/Region/OptionalModules/PhysicsParameters/PhysicsParameters.cs @@ -54,10 +54,10 @@ namespace OpenSim.Region.OptionalModules.PhysicsParameters private static bool m_commandsLoaded = false; #region ISharedRegionModule - public string Name { get { return "Runtime Physics Parameter Module"; } } - + public string Name { get { return "Runtime Physics Parameter Module"; } } + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource source) { // m_log.DebugFormat("{0}: INITIALIZED MODULE", LogHeader); @@ -68,29 +68,29 @@ namespace OpenSim.Region.OptionalModules.PhysicsParameters // m_log.DebugFormat("[{0}: POST INITIALIZED MODULE", LogHeader); InstallInterfaces(); } - + public void Close() { // m_log.DebugFormat("{0}: CLOSED MODULE", LogHeader); } - + public void AddRegion(Scene scene) { // m_log.DebugFormat("{0}: REGION {1} ADDED", LogHeader, scene.RegionInfo.RegionName); m_scenes.Add(scene); } - + public void RemoveRegion(Scene scene) { // m_log.DebugFormat("{0}: REGION {1} REMOVED", LogHeader, scene.RegionInfo.RegionName); if (m_scenes.Contains(scene)) m_scenes.Remove(scene); - } - + } + public void RegionLoaded(Scene scene) { // m_log.DebugFormat("{0}: REGION {1} LOADED", LogHeader, scene.RegionInfo.RegionName); - } + } #endregion INonSharedRegionModule private const string getInvocation = "physics get [|ALL]"; diff --git a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs index 4ffb03b..9c0fa75 100644 --- a/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs +++ b/OpenSim/Region/OptionalModules/PrimLimitsModule/PrimLimitsModule.cs @@ -52,14 +52,14 @@ namespace OpenSim.Region.OptionalModules private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private bool m_enabled; - public string Name { get { return "PrimLimitsModule"; } } - + public string Name { get { return "PrimLimitsModule"; } } + public Type ReplaceableInterface { get { return null; } } - + public void Initialise(IConfigSource config) { string permissionModules = Util.GetConfigVarFromSections(config, "permissionmodules", - new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); + new string[] { "Startup", "Permissions" }, "DefaultPermissionsModule"); List modules = new List(permissionModules.Split(',').Select(m => m.Trim())); @@ -69,11 +69,11 @@ namespace OpenSim.Region.OptionalModules m_log.DebugFormat("[PRIM LIMITS]: Initialized module"); m_enabled = true; } - + public void Close() { } - + public void AddRegion(Scene scene) { if (!m_enabled) @@ -86,7 +86,7 @@ namespace OpenSim.Region.OptionalModules m_log.DebugFormat("[PRIM LIMITS]: Region {0} added", scene.RegionInfo.RegionName); } - + public void RemoveRegion(Scene scene) { if (m_enabled) @@ -97,8 +97,8 @@ namespace OpenSim.Region.OptionalModules scene.Permissions.OnRezObject -= CanRezObject; scene.Permissions.OnObjectEntry -= CanObjectEnter; scene.Permissions.OnDuplicateObject -= CanDuplicateObject; - } - + } + public void RegionLoaded(Scene scene) { m_dialogModule = scene.RequestModuleInterface(); @@ -158,7 +158,7 @@ namespace OpenSim.Region.OptionalModules Vector3 oldPoint = obj.GroupPosition; ILandObject oldParcel = scene.LandChannel.GetLandObject(oldPoint.X, oldPoint.Y); - + // The prim hasn't crossed a region boundry so we don't need to worry // about prim counts here if(oldParcel != null && oldParcel.Equals(newParcel)) diff --git a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs index 78a9c58..cbfd2d2 100644 --- a/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs +++ b/OpenSim/Region/OptionalModules/Properties/AssemblyInfo.cs @@ -3,7 +3,7 @@ using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Mono.Addins; -// General Information about an assembly is controlled through the following +// General Information about an assembly is controlled through the following // set of attributes. Change these attribute values to modify the information // associated with an assembly. [assembly: AssemblyTitle("OpenSim.Region.OptionalModules")] @@ -15,8 +15,8 @@ using Mono.Addins; [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] -// Setting ComVisible to false makes the types in this assembly not visible -// to COM components. If you need to access a type in this assembly from +// Setting ComVisible to false makes the types in this assembly not visible +// to COM components. If you need to access a type in this assembly from // COM, set the ComVisible attribute to true on that type. [assembly: ComVisible(false)] @@ -26,7 +26,7 @@ using Mono.Addins; // Version information for an assembly consists of the following four values: // // Major Version -// Minor Version +// Minor Version // Build Number // Revision // diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs index c38bb3e..9343aab 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStore.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) Contributors + * Copyright (c) Contributors * See CONTRIBUTORS.TXT for a full list of copyright holders. * * Redistribution and use in source and binary forms, with or without @@ -67,7 +67,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore protected List m_TakeStore; protected List m_ReadStore; - + // add separators for quoted paths and array references protected static Regex m_ParsePassOne = new Regex("({[^}]+}|\\[[0-9]+\\]|\\[\\+\\])"); @@ -98,10 +98,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore /// // ----------------------------------------------------------------- public int StringSpace { get; set; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public static bool CanonicalPathExpression(string ipath, out string opath) @@ -116,13 +116,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore opath = PathExpressionToKey(path); return true; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- - public JsonStore() + public JsonStore() { StringSpace = 0; m_TakeStore = new List(); @@ -132,17 +132,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore public JsonStore(string value) : this() { // This is going to throw an exception if the value is not - // a valid JSON chunk. Calling routines should catch the + // a valid JSON chunk. Calling routines should catch the // exception and handle it appropriately if (String.IsNullOrEmpty(value)) ValueStore = new OSDMap(); else ValueStore = OSDParser.DeserializeJson(value); } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public JsonStoreNodeType GetNodeType(string expr) @@ -150,27 +150,27 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore Stack path; if (! ParsePathExpression(expr,out path)) return JsonStoreNodeType.Undefined; - + OSD result = ProcessPathExpression(ValueStore,path); if (result == null) return JsonStoreNodeType.Undefined; - + if (result is OSDMap) return JsonStoreNodeType.Object; - + if (result is OSDArray) return JsonStoreNodeType.Array; - + if (OSDBaseType(result.Type)) return JsonStoreNodeType.Value; - + return JsonStoreNodeType.Undefined; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public JsonStoreValueType GetValueType(string expr) @@ -178,18 +178,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore Stack path; if (! ParsePathExpression(expr,out path)) return JsonStoreValueType.Undefined; - + OSD result = ProcessPathExpression(ValueStore,path); if (result == null) return JsonStoreValueType.Undefined; - + if (result is OSDMap) return JsonStoreValueType.Undefined; - + if (result is OSDArray) return JsonStoreValueType.Undefined; - + if (result is OSDBoolean) return JsonStoreValueType.Boolean; @@ -204,10 +204,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return JsonStoreValueType.Undefined; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public int ArrayLength(string expr) @@ -228,7 +228,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool GetValue(string expr, out string value, bool useJson) @@ -241,23 +241,23 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore } OSD result = ProcessPathExpression(ValueStore,path); - return ConvertOutputValue(result,out value,useJson); + return ConvertOutputValue(result,out value,useJson); } - - + + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool RemoveValue(string expr) { return SetValueFromExpression(expr,null); } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool SetValue(string expr, string value, bool useJson) @@ -272,7 +272,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { // There doesn't appear to be a good way to determine if the // value is valid Json other than to let the parser crash - try + try { ovalue = OSDParser.DeserializeJson(value); } @@ -292,13 +292,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { ovalue = new OSDString(value); } - + return SetValueFromExpression(expr,ovalue); } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool TakeValue(string expr, bool useJson, TakeValueCallback cback) @@ -315,7 +315,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore m_TakeStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback)); return false; } - + string value = String.Empty; if (! ConvertOutputValue(result,out value,useJson)) { @@ -332,7 +332,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool ReadValue(string expr, bool useJson, TakeValueCallback cback) @@ -349,7 +349,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore m_ReadStore.Add(new TakeValueCallbackClass(pexpr,useJson,cback)); return false; } - + string value = String.Empty; if (! ConvertOutputValue(result,out value,useJson)) { @@ -362,10 +362,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return true; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- protected bool SetValueFromExpression(string expr, OSD ovalue) @@ -447,7 +447,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore Match match = hmatches[0]; GroupCollection groups = match.Groups; string hkey = groups[1].Value; - + if (result is OSDMap) { // this is the assignment case @@ -456,7 +456,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { StringSpace -= ComputeSizeOf(hmap[hkey]); StringSpace += ComputeSizeOf(ovalue); - + hmap[hkey] = ovalue; InvokeNextCallback(pexpr + pkey); return true; @@ -483,13 +483,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- protected bool InvokeNextCallback(string pexpr) { // Process all of the reads that match the expression first - List reads = + List reads = m_ReadStore.FindAll(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); }); foreach (TakeValueCallbackClass readcb in reads) @@ -501,7 +501,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // Process one take next TakeValueCallbackClass takecb = m_TakeStore.Find(delegate(TakeValueCallbackClass tb) { return pexpr.StartsWith(tb.Path); }); - + if (takecb != null) { m_TakeStore.Remove(takecb); @@ -525,13 +525,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // add front and rear separators expr = "." + expr + "."; - + // add separators for quoted exprs and array references expr = m_ParsePassOne.Replace(expr,".$1.",-1,0); - + // add quotes to bare identifier expr = m_ParsePassThree.Replace(expr,".{$1}",-1,0); - + // remove extra separators expr = m_ParsePassFour.Replace(expr,".",-1,0); @@ -550,7 +550,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// /// path is a stack where the top level of the path is at the bottom of the stack // ----------------------------------------------------------------- @@ -558,13 +558,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { if (path.Count == 0) return map; - + string pkey = path.Pop(); OSD rmap = ProcessPathExpression(map,path); if (rmap == null) return null; - + // ---------- Check for an array index ---------- MatchCollection amatches = m_SimpleArrayPattern.Matches(pkey,0); @@ -582,7 +582,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore GroupCollection groups = match.Groups; string akey = groups[1].Value; int aval = Convert.ToInt32(akey); - + if (aval < amap.Count) return (OSD) amap[aval]; @@ -599,13 +599,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore m_log.WarnFormat("[JsonStore] wrong type for key {2}, expecting {0}, got {1}",OSDType.Map,rmap.Type,pkey); return null; } - + OSDMap hmap = rmap as OSDMap; Match match = hmatches[0]; GroupCollection groups = match.Groups; string hkey = groups[1].Value; - + if (hmap.ContainsKey(hkey)) return (OSD) hmap[hkey]; @@ -619,13 +619,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- protected static bool ConvertOutputValue(OSD result, out string value, bool useJson) { value = String.Empty; - + // If we couldn't process the path if (result == null) return false; @@ -646,13 +646,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return true; } - value = "'" + result.AsString() + "'"; + value = "'" + result.AsString() + "'"; return true; } if (OSDBaseType(result.Type)) { - value = result.AsString(); + value = result.AsString(); return true; } @@ -661,24 +661,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- protected static string PathExpressionToKey(Stack path) { if (path.Count == 0) return ""; - + string pkey = ""; foreach (string k in path) pkey = (pkey == "") ? k : (k + "." + pkey); - + return pkey; } // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- protected static bool OSDBaseType(OSDType type) @@ -705,7 +705,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- protected static int ComputeSizeOf(OSD value) @@ -731,7 +731,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore private Scene m_scene; private UUID m_objectID; - protected override OSD ValueStore + protected override OSD ValueStore { get { @@ -741,7 +741,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // This is bad return null; } - + return sop.DynAttrs.TopLevelMap; } @@ -761,5 +761,5 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore StringSpace = ComputeSizeOf(ValueStore); } } - + } diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs index d4b19dd..9bf9cb0 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreCommands.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) Contributors + * Copyright (c) Contributors * See CONTRIBUTORS.TXT for a full list of copyright holders. * * Redistribution and use in source and binary forms, with or without @@ -79,7 +79,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- public void Initialise(IConfigSource config) { - try + try { if ((m_config = config.Configs["JsonStore"]) == null) { @@ -127,7 +127,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore if (m_enabled) { m_scene = scene; - + } } @@ -143,7 +143,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// Called when all modules have been added for a region. This is + /// Called when all modules have been added for a region. This is /// where we hook up events /// // ----------------------------------------------------------------- diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs index 26044f0..ae8341f 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreModule.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) Contributors + * Copyright (c) Contributors * See CONTRIBUTORS.TXT for a full list of copyright holders. * * Redistribution and use in source and binary forms, with or without @@ -83,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- public void Initialise(IConfigSource config) { - try + try { if ((m_config = config.Configs["JsonStore"]) == null) { @@ -159,7 +159,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// Called when all modules have been added for a region. This is + /// Called when all modules have been added for a region. This is /// where we hook up events /// // ----------------------------------------------------------------- @@ -184,7 +184,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore #region SceneEvents // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public void EventManagerOnObjectBeingRemovedFromScene(SceneObjectGroup obj) @@ -196,10 +196,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore #region ScriptInvocationInteface - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public JsonStoreStats GetStoreStats() @@ -210,13 +210,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { stats.StoreCount = m_JsonValueStore.Count; } - + return stats; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool AttachObjectStore(UUID objectID) @@ -235,17 +235,17 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { if (m_JsonValueStore.ContainsKey(objectID)) return true; - + JsonStore map = new JsonObjectStore(m_scene,objectID); m_JsonValueStore.Add(objectID,map); } - + return true; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool CreateStore(string value, ref UUID result) @@ -254,12 +254,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore result = UUID.Random(); JsonStore map = null; - + if (! m_enabled) return false; - + try - { + { map = new JsonStore(value); } catch (Exception) @@ -270,13 +270,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore lock (m_JsonValueStore) m_JsonValueStore.Add(result,map); - + return true; } // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool DestroyStore(UUID storeID) @@ -289,7 +289,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool TestStore(UUID storeID) @@ -302,7 +302,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public JsonStoreNodeType GetNodeType(UUID storeID, string path) @@ -318,7 +318,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return JsonStoreNodeType.Undefined; } } - + try { lock (map) @@ -334,7 +334,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public JsonStoreValueType GetValueType(UUID storeID, string path) @@ -350,7 +350,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return JsonStoreValueType.Undefined; } } - + try { lock (map) @@ -366,7 +366,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool SetValue(UUID storeID, string path, string value, bool useJson) @@ -382,7 +382,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return false; } } - + try { lock (map) @@ -393,7 +393,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore storeID,map.StringSpace,m_maxStringSpace); return false; } - + return map.SetValue(path,value,useJson); } } @@ -404,10 +404,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return false; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool RemoveValue(UUID storeID, string path) @@ -423,7 +423,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return false; } } - + try { lock (map) @@ -436,10 +436,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore return false; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public int GetArrayLength(UUID storeID, string path) @@ -464,19 +464,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { m_log.Error("[JsonStore]: unable to retrieve value", e); } - + return -1; } // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public bool GetValue(UUID storeID, string path, bool useJson, out string value) { value = String.Empty; - + if (! m_enabled) return false; JsonStore map = null; @@ -497,13 +497,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { m_log.Error("[JsonStore]: unable to retrieve value", e); } - + return false; } // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public void TakeValue(UUID storeID, string path, bool useJson, TakeValueCallback cback) @@ -536,13 +536,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { m_log.Error("[JsonStore] unable to retrieve value", e); } - + cback(String.Empty); } // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- public void ReadValue(UUID storeID, string path, bool useJson, TakeValueCallback cback) @@ -575,7 +575,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { m_log.Error("[JsonStore]: unable to retrieve value", e); } - + cback(String.Empty); } diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs index 7a0370a..a9fdb66 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/JsonStoreScriptModule.cs @@ -1,5 +1,5 @@ /* - * Copyright (c) Contributors + * Copyright (c) Contributors * See CONTRIBUTORS.TXT for a full list of copyright holders. * * Redistribution and use in source and binary forms, with or without @@ -83,7 +83,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- public void Initialise(IConfigSource config) { - try + try { if ((m_config = config.Configs["JsonStore"]) == null) { @@ -166,7 +166,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// Called when all modules have been added for a region. This is + /// Called when all modules have been added for a region. This is /// where we hook up events /// // ----------------------------------------------------------------- @@ -251,7 +251,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore #region ScriptInvocationInteface // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -260,13 +260,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore UUID uuid = UUID.Zero; if (! m_store.AttachObjectStore(hostID)) GenerateRuntimeError("Failed to create Json store"); - + return hostID; } // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -275,12 +275,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore UUID uuid = UUID.Zero; if (! m_store.CreateStore(value, ref uuid)) GenerateRuntimeError("Failed to create Json store"); - + lock (m_scriptStores) { if (! m_scriptStores.ContainsKey(scriptID)) m_scriptStores[scriptID] = new HashSet(); - + m_scriptStores[scriptID].Add(uuid); } return uuid; @@ -288,7 +288,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -305,7 +305,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -316,7 +316,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -330,7 +330,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -341,10 +341,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore o => DoJsonReadNotecard(reqID, hostID, scriptID, storeID, path, notecardIdentifier), null, "JsonStoreScriptModule.JsonReadNotecard"); return reqID; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -358,7 +358,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -366,7 +366,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { string ipath = ConvertList2Path(pathlist); string opath; - + if (JsonStore.CanonicalPathExpression(ipath,out opath)) return opath; @@ -375,10 +375,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // the entire store return "**INVALID**"; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -389,7 +389,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -400,7 +400,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -417,7 +417,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -425,10 +425,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { return m_store.RemoveValue(storeID,path) ? 1 : 0; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -436,10 +436,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { return m_store.GetArrayLength(storeID,path); } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -457,10 +457,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore m_store.GetValue(storeID,path,true, out value); return value; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -480,10 +480,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore o => DoJsonTakeValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonTakeValueJson"); return reqID; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- [ScriptInvocation] @@ -503,12 +503,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore o => DoJsonReadValue(scriptID,reqID,storeID,path,true), null, "JsonStoreScriptModule.DoJsonReadValueJson"); return reqID; } - + #endregion // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- protected void GenerateRuntimeError(string msg) @@ -516,10 +516,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore m_log.InfoFormat("[JsonStore] runtime error: {0}",msg); throw new Exception("JsonStore Runtime Error: " + msg); } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- protected void DispatchValue(UUID scriptID, UUID reqID, string value) @@ -529,7 +529,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- private void DoJsonTakeValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson) @@ -543,14 +543,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString()); } - + DispatchValue(scriptID,reqID,String.Empty); } // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- private void DoJsonReadValue(UUID scriptID, UUID reqID, UUID storeID, string path, bool useJson) @@ -564,13 +564,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { m_log.InfoFormat("[JsonStoreScripts]: unable to retrieve value; {0}",e.ToString()); } - + DispatchValue(scriptID,reqID,String.Empty); } // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- private void DoJsonReadNotecard( @@ -580,7 +580,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore if (!UUID.TryParse(notecardIdentifier, out assetID)) { - SceneObjectPart part = m_scene.GetSceneObjectPart(hostID); + SceneObjectPart part = m_scene.GetSceneObjectPart(hostID); assetID = ScriptUtils.GetAssetIdFromItemName(part, notecardIdentifier, (int)AssetType.Notecard); } @@ -590,10 +590,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore if (a.Type != (sbyte)AssetType.Notecard) GenerateRuntimeError(String.Format("Invalid notecard asset {0}", assetID)); - + m_log.DebugFormat("[JsonStoreScripts]: read notecard in context {0}",storeID); - try + try { string jsondata = SLUtil.ParseNotecardToString(a.Data); int result = m_store.SetValue(storeID, path, jsondata,true) ? 1 : 0; @@ -612,10 +612,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore GenerateRuntimeError(String.Format("Json parsing failed for {0}", assetID)); m_comms.DispatchReply(scriptID, 0, "", reqID.ToString()); } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- private void DoJsonWriteNotecard(UUID reqID, UUID hostID, UUID scriptID, UUID storeID, string path, string name) @@ -626,9 +626,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore m_comms.DispatchReply(scriptID,0,UUID.Zero.ToString(),reqID.ToString()); return; } - + SceneObjectPart host = m_scene.GetSceneObjectPart(hostID); - + // Create new asset UUID assetID = UUID.Random(); AssetBase asset = new AssetBase(assetID, name, (sbyte)AssetType.Notecard, host.OwnerID.ToString()); @@ -681,7 +681,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore for (int i = 0; i < pathlist.Length; i++) { string token = ""; - + if (pathlist[i] is string) { token = pathlist[i].ToString(); @@ -699,16 +699,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore { token = "." + pathlist[i].ToString() + "."; } - + path += token + "."; } - + return path; } - + // ----------------------------------------------------------------- /// - /// + /// /// // ----------------------------------------------------------------- private void DoJsonRezObject(UUID hostID, UUID scriptID, UUID reqID, string name, Vector3 pos, Vector3 vel, Quaternion rot, string param) @@ -801,7 +801,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore group.ScheduleGroupForFullUpdate(); - // send the reply back to the host object, use the integer param to indicate the number + // send the reply back to the host object, use the integer param to indicate the number // of remaining objects m_comms.DispatchReply(scriptID, objlist.Count-i-1, group.RootPart.UUID.ToString(), reqID.ToString()); } diff --git a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs index 99a7076..77ee785 100644 --- a/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs +++ b/OpenSim/Region/OptionalModules/Scripting/JsonStore/Tests/JsonStoreScriptModuleTests.cs @@ -180,7 +180,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests TestHelpers.InMethod(); // TestHelpers.EnableLogging(); - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); { string value = (string)InvokeOp("JsonGetValue", storeId, "Hello.World"); @@ -213,7 +213,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests TestHelpers.InMethod(); // TestHelpers.EnableLogging(); - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Two' } }"); { string value = (string)InvokeOp("JsonGetJson", storeId, "Hello.World"); @@ -246,11 +246,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // TestHelpers.InMethod(); //// TestHelpers.EnableLogging(); // -// UUID storeId +// UUID storeId // = (UUID)m_smcm.InvokeOperation( -// UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); +// UUID.Zero, UUID.Zero, "JsonCreateStore", new object[] { "{ 'Hello' : 'World' }" }); // -// string value +// string value // = (string)m_smcm.InvokeOperation( // UUID.Zero, UUID.Zero, "JsonTakeValue", new object[] { storeId, "Hello" }); // @@ -271,7 +271,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test remove of node in object pointing to a string { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); Assert.That(returnValue, Is.EqualTo(1)); @@ -285,7 +285,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test remove of node in object pointing to another object { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Wally' } }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'Wally' } }"); int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello"); Assert.That(returnValue, Is.EqualTo(1)); @@ -299,7 +299,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test remove of node in an array { - UUID storeId + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : [ 'value1', 'value2' ] }"); int returnValue = (int)InvokeOp( "JsonRemoveValue", storeId, "Hello[0]"); @@ -320,7 +320,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test remove of non-existing value { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : 'World' }"); int fakeValueRemove = (int)InvokeOp("JsonRemoveValue", storeId, "Cheese"); Assert.That(fakeValueRemove, Is.EqualTo(0)); @@ -340,7 +340,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // TestHelpers.InMethod(); //// TestHelpers.EnableLogging(); // -// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); +// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); // // { // int result = (int)InvokeOp("JsonTestPath", storeId, "Hello.World"); @@ -372,7 +372,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // TestHelpers.InMethod(); //// TestHelpers.EnableLogging(); // -// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); +// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : 'One' } }"); // // { // int result = (int)InvokeOp("JsonTestPathJson", storeId, "Hello.World"); @@ -437,7 +437,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests TestHelpers.InMethod(); // TestHelpers.EnableLogging(); - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello' : { 'World' : [ 'one', 2 ] } }"); { int result = (int)InvokeOp("JsonGetNodeType", storeId, "."); @@ -509,7 +509,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // TestHelpers.EnableLogging(); { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "Fun", "Times"); Assert.That(result, Is.EqualTo(1)); @@ -520,7 +520,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing periods with delineation { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun.Circus}", "Times"); Assert.That(result, Is.EqualTo(1)); @@ -533,7 +533,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing unbalanced ] without delineation. Expecting failure { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "Fun]Circus", "Times"); Assert.That(result, Is.EqualTo(0)); @@ -544,7 +544,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing unbalanced [ without delineation. Expecting failure { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[Circus", "Times"); Assert.That(result, Is.EqualTo(0)); @@ -555,7 +555,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing unbalanced [] without delineation. Expecting failure { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "Fun[]Circus", "Times"); Assert.That(result, Is.EqualTo(0)); @@ -566,7 +566,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing unbalanced ] with delineation { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun]Circus}", "Times"); Assert.That(result, Is.EqualTo(1)); @@ -577,7 +577,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing unbalanced [ with delineation { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[Circus}", "Times"); Assert.That(result, Is.EqualTo(1)); @@ -588,7 +588,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing empty balanced [] with delineation { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[]Circus}", "Times"); Assert.That(result, Is.EqualTo(1)); @@ -600,7 +600,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // // Commented out as this currently unexpectedly fails. // // Test setting a key containing brackets around an integer with delineation // { -// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); +// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); // // int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun[0]Circus}", "Times"); // Assert.That(result, Is.EqualTo(1)); @@ -610,10 +610,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // } // *** Test {} *** - + // Test setting a key containing unbalanced } without delineation. Expecting failure (?) { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "Fun}Circus", "Times"); Assert.That(result, Is.EqualTo(0)); @@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing unbalanced { without delineation. Expecting failure (?) { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "Fun{Circus", "Times"); Assert.That(result, Is.EqualTo(0)); @@ -636,7 +636,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // // Commented out as this currently unexpectedly fails. // // Test setting a key containing unbalanced } // { -// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); +// UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); // // int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun}Circus}", "Times"); // Assert.That(result, Is.EqualTo(0)); @@ -644,7 +644,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing unbalanced { with delineation { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Circus}", "Times"); Assert.That(result, Is.EqualTo(1)); @@ -655,7 +655,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting a key containing balanced {} with delineation. This should fail. { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "{Fun{Filled}Circus}", "Times"); Assert.That(result, Is.EqualTo(0)); @@ -666,7 +666,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting to location that does not exist. This should fail. { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{}"); int result = (int)InvokeOp("JsonSetValue", storeId, "Fun.Circus", "Times"); Assert.That(result, Is.EqualTo(0)); @@ -691,7 +691,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Single quoted token case { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "'Times'"); Assert.That(result, Is.EqualTo(1)); @@ -702,7 +702,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Sub-tree case { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "{ 'Filled' : 'Times' }"); Assert.That(result, Is.EqualTo(1)); @@ -713,7 +713,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // If setting single strings in JsonSetValueJson, these must be single quoted tokens, not bare strings. { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); int result = (int)InvokeOp("JsonSetJson", storeId, "Fun", "Times"); Assert.That(result, Is.EqualTo(0)); @@ -724,7 +724,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests // Test setting to location that does not exist. This should fail. { - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ }"); int result = (int)InvokeOp("JsonSetJson", storeId, "Fun.Circus", "'Times'"); Assert.That(result, Is.EqualTo(0)); @@ -757,7 +757,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); m_scene.AddSceneObject(so); - UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); + UUID storeId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); { string notecardName = "nc1"; @@ -820,14 +820,14 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests SceneObjectGroup so = SceneHelpers.CreateSceneObject(1, TestHelpers.ParseTail(0x1)); m_scene.AddSceneObject(so); - UUID creatingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); + UUID creatingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'Hello':'World' }"); // Write notecard InvokeOpOnHost("JsonWriteNotecard", so.UUID, creatingStoreId, "", notecardName); { // Read notecard - UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "", notecardName); Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); @@ -837,10 +837,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests { // Read notecard to new single component path - UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make", notecardName); Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); - + string value = (string)InvokeOp("JsonGetValue", receivingStoreId, "Hello"); Assert.That(value, Is.EqualTo("")); @@ -850,7 +850,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests { // Read notecard to new multi-component path. This should not work. - UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); + UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{}"); UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); @@ -863,7 +863,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests { // Read notecard to existing multi-component path. This should work - UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); + UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "make.it", notecardName); Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); @@ -876,7 +876,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.JsonStore.Tests { // Read notecard to invalid path. This should not work. - UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); + UUID receivingStoreId = (UUID)InvokeOp("JsonCreateStore", "{ 'make' : { 'it' : 'so' } }"); UUID readNotecardRequestId = (UUID)InvokeOpOnHost("JsonReadNotecard", so.UUID, receivingStoreId, "/", notecardName); Assert.That(readNotecardRequestId, Is.Not.EqualTo(UUID.Zero)); diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs index 1993948..2368a23 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IAvatarAttachment.cs @@ -33,7 +33,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// Describes where on the avatar the attachment is located /// int Location { get ; } - + //// /// Accessor to the rez'ed asset, representing the attachment /// diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs index a8e545c..d61f52a 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IInventoryItem.cs @@ -30,7 +30,7 @@ using OpenMetaverse; using OpenMetaverse.Assets; namespace OpenSim.Region.OptionalModules.Scripting.Minimodule -{ +{ /// /// This implements the methods needed to operate on individual inventory items. /// diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs index e189489..dc2edd9 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Interfaces/IObject.cs @@ -60,19 +60,19 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// /// Returns whether or not this object is still in the world. /// Eg, if you store an IObject reference, however the object - /// is deleted before you use it, it will throw a NullReference + /// is deleted before you use it, it will throw a NullReference /// exception. 'Exists' allows you to check the object is still /// in play before utilizing it. /// /// /// IObject deleteMe = World.Objects[0]; - /// + /// /// if (deleteMe.Exists) { /// deleteMe.Say("Hello, I still exist!"); /// } - /// + /// /// World.Objects.Remove(deleteMe); - /// + /// /// if (!deleteMe.Exists) { /// Host.Console.Info("I was deleted"); /// } @@ -81,7 +81,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule /// Objects should be near-guarunteed to exist for any event which /// passes them as an argument. Storing an object for a longer period /// of time however will limit their reliability. - /// + /// /// It is a good practice to use Try/Catch blocks handling for /// NullReferenceException, when accessing remote objects. /// @@ -118,8 +118,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule IObject[] Children { get; } /// - /// Returns a list of materials attached to this object. Each may contain unique texture - /// and other visual information. For primitive based objects, this correlates with + /// Returns a list of materials attached to this object. Each may contain unique texture + /// and other visual information. For primitive based objects, this correlates with /// Object Faces. For mesh based objects, this correlates with Materials. /// IObjectMaterial[] Materials { get; } @@ -152,7 +152,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule String TouchText { get; set; } /// - /// Text to be associated with this object, in the + /// Text to be associated with this object, in the /// Second Life(r) viewer, this is shown above the /// object. /// diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs index bf85cbc..bec8f38 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/InventoryItem.cs @@ -40,7 +40,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { TaskInventoryItem m_privateItem; Scene m_rootScene; - + public InventoryItem(Scene rootScene, TaskInventoryItem internalItem) { m_rootScene = rootScene; @@ -77,10 +77,10 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule throw new ApplicationException("[MRM] There is no legal conversion from IInventoryItem to InventoryItem"); } } - + public int Type { get { return m_privateItem.Type; } } public UUID AssetID { get { return m_privateItem.AssetID; } } - + // This method exposes OpenSim/OpenMetaverse internals and needs to be replaced with a IAsset specific to MRM. public T RetrieveAsset() where T : OpenMetaverse.Assets.Asset, new() { @@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule if ((sbyte)result.AssetType != a.Type) throw new ApplicationException("[MRM] The supplied asset class does not match the found asset"); - + result.AssetData = a.Data; result.Decode(); return result; diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs index 73fe8b8..5861486 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/MicroScheduler.cs @@ -35,7 +35,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.Interfaces; namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { - public class MicroScheduler : System.MarshalByRefObject, IMicrothreader + public class MicroScheduler : System.MarshalByRefObject, IMicrothreader { private readonly List m_threads = new List(); diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs index 47b9c09..5513cd5 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObject.cs @@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule get { return GetSOP().Description; } set { - if (CanEdit()) + if (CanEdit()) GetSOP().Description = value; } } @@ -192,7 +192,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule rets = new IObject[total]; int i = 0; - + foreach (SceneObjectPart part in my.ParentGroup.Parts) { rets[i++] = new SOPObject(m_rootScene, part.LocalId, m_security); @@ -273,8 +273,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public Vector3 SitTarget { get { return GetSOP().SitTargetPosition; } - set - { + set + { if (CanEdit()) { GetSOP().SitTargetPosition = value; @@ -285,8 +285,8 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public string SitTargetText { get { return GetSOP().SitName; } - set - { + set + { if (CanEdit()) { GetSOP().SitName = value; @@ -297,7 +297,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public string TouchText { get { return GetSOP().TouchName; } - set + set { if (CanEdit()) { @@ -309,7 +309,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule public string Text { get { return GetSOP().Text; } - set + set { if (CanEdit()) { @@ -382,11 +382,11 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule get { return this; } } - public IObjectInventory Inventory + public IObjectInventory Inventory { get { return new SOPObjectInventory(m_rootScene, GetSOP().TaskInventory); } } - + #region Public Functions public void Say(string msg) @@ -406,7 +406,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule SceneObjectPart sop = GetSOP(); m_rootScene.SimChat(Utils.StringToBytes(msg), ChatTypeEnum.Say,channel, sop.AbsolutePosition, sop.Name, sop.UUID, false); } - + public void Dialog(UUID avatar, string message, string[] buttons, int chat_channel) { if (!CanEdit()) @@ -445,9 +445,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule dm.SendDialogToUser( avatar, GetSOP().Name, GetSOP().UUID, GetSOP().OwnerID, message, new UUID("00000000-0000-2222-3333-100000001000"), chat_channel, buttons); - + } - + #endregion @@ -540,7 +540,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule if (hasCut) ret += 2; if (hasDimple) ret += 2; if (hasHollow) - ret += 1; // GOTCHA: LSL shows 2 additional sides here. + ret += 1; // GOTCHA: LSL shows 2 additional sides here. // This has been fixed, but may cause porting issues. break; case (int) PrimType.Torus: diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs index d20f4a4..8c3158c 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SOPObjectInventory.cs @@ -61,25 +61,25 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object if (!m_publicInventory.ContainsKey(privateItem.ItemID)) m_publicInventory.Add(privateItem.ItemID, new InventoryItem(m_rootScene, privateItem)); } - + #region IDictionary implementation public void Add (UUID key, IInventoryItem value) { m_publicInventory.Add(key, value); m_privateInventory.Add(key, InventoryItem.FromInterface(value).ToTaskInventoryItem()); } - + public bool ContainsKey (UUID key) { return m_privateInventory.ContainsKey(key); } - + public bool Remove (UUID key) { m_publicInventory.Remove(key); return m_privateInventory.Remove(key); } - + public bool TryGetValue (UUID key, out IInventoryItem value) { value = null; @@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object { // wasn't found in the public inventory TaskInventoryItem privateItem; - + result = m_privateInventory.TryGetValue(key, out privateItem); if (result) { @@ -98,16 +98,16 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object } } else return true; - + return result; } - + public ICollection Keys { get { return m_privateInventory.Keys; } } - + public ICollection Values { get { SynchronizeDictionaries(); @@ -139,41 +139,41 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object { Add(item.Key, item.Value); } - + public void Clear () { m_publicInventory.Clear(); m_privateInventory.Clear(); } - + public bool Contains (KeyValuePair item) { return m_privateInventory.ContainsKey(item.Key); } - + public void CopyTo (KeyValuePair[] array, int arrayIndex) { throw new NotImplementedException(); } - + public bool Remove (KeyValuePair item) { return Remove(item.Key); } - + public int Count { get { return m_privateInventory.Count; } } - + public bool IsReadOnly { get { return false; } } #endregion - + #region Explicit implementations IInventoryItem System.Collections.Generic.IDictionary.this[UUID key] { @@ -189,13 +189,13 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object m_privateInventory[key] = InventoryItem.FromInterface(value).ToTaskInventoryItem(); } } - + void System.Collections.Generic.ICollection>.CopyTo(System.Collections.Generic.KeyValuePair[] array, int offset) { throw new NotImplementedException(); } #endregion - + public IInventoryItem this[string name] { get { @@ -204,7 +204,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule.Object { if (!m_publicInventory.ContainsKey(i.ItemID)) m_publicInventory.Add(i.ItemID, new InventoryItem(m_rootScene, i)); - + return m_publicInventory[i.ItemID]; } throw new KeyNotFoundException(); diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs index d192309..a380f66 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatar.cs @@ -70,18 +70,18 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule get { return GetSP().AbsolutePosition; } set { GetSP().Teleport(value); } } - + public bool IsChildAgent { get { return GetSP().IsChildAgent; } } - + #region IAvatar implementation public IAvatarAttachment[] Attachments { get { List attachments = new List(); - + List internalAttachments = GetSP().Appearance.GetAttachments(); foreach (AvatarAttachment attach in internalAttachments) { @@ -89,7 +89,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule new UUID(attach.ItemID), new UUID(attach.AssetID), m_security)); } - + return attachments.ToArray(); } } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs index 570459a..bcf6053 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/SPAvatarAttachment.cs @@ -41,7 +41,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule private readonly UUID m_assetId; private readonly ISecurityCredential m_security; - + public SPAvatarAttachment(Scene rootScene, IAvatar self, int location, UUID itemId, UUID assetId, ISecurityCredential security) { m_rootScene = rootScene; @@ -51,9 +51,9 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule //m_itemId = itemId; m_assetId = assetId; } - + public int Location { get { return m_location; } } - + public IObject Asset { get diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs index 13d0140..724c2a9 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/Test/TestModule.cs @@ -51,7 +51,7 @@ namespace OpenSim public void Microthread(IEnumerable thread) { - + } public void RunMicrothread() @@ -92,7 +92,7 @@ namespace OpenSim public override void Stop() { - + } } } diff --git a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs index f2324d2..36f70d0 100644 --- a/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs +++ b/OpenSim/Region/OptionalModules/Scripting/Minimodule/World.cs @@ -34,7 +34,7 @@ using OpenSim.Region.OptionalModules.Scripting.Minimodule.WorldX; namespace OpenSim.Region.OptionalModules.Scripting.Minimodule { - public class World : System.MarshalByRefObject, IWorld, IWorldAudio + public class World : System.MarshalByRefObject, IWorld, IWorldAudio { private readonly Scene m_internalScene; private readonly ISecurityCredential m_security; @@ -149,7 +149,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule e.Sender = new SOPObject(m_internalScene, ((SceneObjectPart) chat.SenderObject).LocalId, m_security); e.Text = chat.Message; e.Channel = chat.Channel; - + _OnChat(this, e); return; } @@ -160,7 +160,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.Minimodule e.Sender = new SPAvatar(m_internalScene, chat.SenderUUID, m_security); e.Text = chat.Message; e.Channel = chat.Channel; - + _OnChat(this, e); return; } diff --git a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs index 1725eb4..a1dd711 100644 --- a/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/RegionReadyModule/RegionReadyModule.cs @@ -46,7 +46,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "RegionReadyModule")] public class RegionReadyModule : IRegionReadyModule, INonSharedRegionModule { - private static readonly ILog m_log = + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IConfig m_config = null; @@ -57,24 +57,24 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady private bool m_enabled = false; private bool m_disable_logins; private string m_uri = string.Empty; - + Scene m_scene; - + #region INonSharedRegionModule interface - public Type ReplaceableInterface - { + public Type ReplaceableInterface + { get { return null; } } - + public void Initialise(IConfigSource config) { m_config = config.Configs["RegionReady"]; - if (m_config != null) + if (m_config != null) { m_enabled = m_config.GetBoolean("enabled", false); - - if (m_enabled) + + if (m_enabled) { m_channelNotify = m_config.GetInt("channel_notify", m_channelNotify); m_disable_logins = m_config.GetBoolean("login_disable", false); @@ -106,7 +106,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady m_scene.EventManager.OnEmptyScriptCompileQueue += OnEmptyScriptCompileQueue; // This should always show up to the user but should not trigger warn/errors as these messages are - // expected and are not simulator problems. Ideally, there would be a status level in log4net but + // expected and are not simulator problems. Ideally, there would be a status level in log4net but // failing that, we will print out to console instead. MainConsole.Instance.OutputFormat("Region {0} - LOGINS DISABLED DURING INITIALIZATION.", m_scene.Name); @@ -152,12 +152,12 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady { m_log.DebugFormat("[RegionReady]: Script compile queue empty!"); - if (m_firstEmptyCompileQueue || m_oarFileLoading) + if (m_firstEmptyCompileQueue || m_oarFileLoading) { OSChatMessage c = new OSChatMessage(); - if (m_firstEmptyCompileQueue) + if (m_firstEmptyCompileQueue) c.Message = "server_startup,"; - else + else c.Message = "oar_file_load,"; m_firstEmptyCompileQueue = false; m_oarFileLoading = false; @@ -165,7 +165,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady m_scene.Backup(false); c.From = "RegionReady"; - if (m_lastOarLoadedOk) + if (m_lastOarLoadedOk) c.Message += "1,"; else c.Message += "0,"; @@ -193,7 +193,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady { m_oarFileLoading = true; - if (message==String.Empty) + if (message==String.Empty) { m_lastOarLoadedOk = true; } @@ -226,7 +226,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady // m_scene.RegionInfo.RegionName, m_oarFileLoading.ToString()); // Putting this out to console to make it eye-catching for people who are running OpenSimulator - // without info log messages enabled. Making this a warning is arguably misleading since it isn't a + // without info log messages enabled. Making this a warning is arguably misleading since it isn't a // warning, and monitor scripts looking for warn/error/fatal messages will received false positives. // Arguably, log4net needs a status log level (like Apache). MainConsole.Instance.OutputFormat("INITIALIZATION COMPLETE FOR {0} - LOGINS ENABLED", m_scene.Name); @@ -256,7 +256,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.RegionReady // m_scene.EventManager.OnRezScript += OnRezScript; // m_oarFileLoading = true; // m_firstEmptyCompileQueue = true; -// +// // m_scene.LoginsDisabled = true; // m_scene.LoginLock = true; // if ( m_uri != string.Empty ) diff --git a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs index 4b7295d..bf33996 100644 --- a/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs +++ b/OpenSim/Region/OptionalModules/Scripting/XmlRpcRouterModule/XmlRpcGridRouterModule.cs @@ -54,7 +54,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule public class XmlRpcGridRouter : INonSharedRegionModule, IXmlRpcRouter { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - + private Dictionary m_Channels = new Dictionary(); @@ -94,7 +94,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule { scriptEngine.OnScriptRemoved += this.ScriptRemoved; scriptEngine.OnObjectRemoved += this.ObjectRemoved; - + } } @@ -131,7 +131,7 @@ namespace OpenSim.Region.OptionalModules.Scripting.XmlRpcGridRouterModule if (!m_Enabled) return; - m_log.InfoFormat("[XMLRPC GRID ROUTER]: New receiver Obj: {0} Ch: {1} ID: {2} URI: {3}", + m_log.InfoFormat("[XMLRPC GRID ROUTER]: New receiver Obj: {0} Ch: {1} ID: {2} URI: {3}", objectID.ToString(), channel.ToString(), itemID.ToString(), uri); XmlRpcInfo info = new XmlRpcInfo(); diff --git a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs index 78c870a..8654896 100644 --- a/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs +++ b/OpenSim/Region/OptionalModules/ServiceConnectorsIn/Freeswitch/FreeswitchServiceInConnectorModule.cs @@ -44,7 +44,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private static bool m_Enabled = false; - + private IConfigSource m_Config; bool m_Registered = false; @@ -73,7 +73,7 @@ namespace OpenSim.Region.CoreModules.ServiceConnectorsIn.Freeswitch { } - public Type ReplaceableInterface + public Type ReplaceableInterface { get { return null; } } diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs index 3f36e32..d3b97b1 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/Clients_report.cs @@ -115,7 +115,7 @@ namespace OpenSim.Region.UserStatistics udata.fps = Convert.ToSingle(sdr["simfps"]); clidata.Add(udata); totalclients += udata.count; - + } } sdr.Close(); @@ -126,9 +126,9 @@ namespace OpenSim.Region.UserStatistics sql = "select region_id, client_version, count(*) as cnt, avg(avg_sim_fps) as simfps from stats_session_data group by region_id, client_version order by region_id, count(*) desc;"; cmd = new SqliteCommand(sql, dbConn); - + sdr = cmd.ExecuteReader(); - + if (sdr.HasRows) { while (sdr.Read()) @@ -145,10 +145,10 @@ namespace OpenSim.Region.UserStatistics cmd.Dispose(); } } - + foreach (ClientVersionData cvd in cliRegData) { - + if (regionTotals.ContainsKey(cvd.region_id)) { int regiontotal = (int)regionTotals[cvd.region_id]; diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs index 8745acd..fcc7cee 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/Default_Report.cs @@ -61,7 +61,7 @@ namespace OpenSim.Region.UserStatistics Hashtable nh = new Hashtable(); nh.Add("hdata", mData); nh.Add("Reports", pParams["Reports"]); - + return nh; } @@ -76,7 +76,7 @@ namespace OpenSim.Region.UserStatistics public string rep_Default_report_view(stats_default_page_values values) { - + StringBuilder output = new StringBuilder(); @@ -105,7 +105,7 @@ TD.align_top { vertical-align: top; } "; HTMLUtil.HtmlHeaders_O(ref output); - + HTMLUtil.InsertProtoTypeAJAX(ref output); string[] ajaxUpdaterDivs = new string[3]; int[] ajaxUpdaterSeconds = new int[3]; @@ -124,7 +124,7 @@ TD.align_top { vertical-align: top; } ajaxUpdaterReportFragments[2] = "activelogajax.html"; HTMLUtil.InsertPeriodicUpdaters(ref output, ajaxUpdaterDivs, ajaxUpdaterSeconds, ajaxUpdaterReportFragments); - + output.Append(STYLESHEET); HTMLUtil.HtmlHeaders_C(ref output); HTMLUtil.AddReportLinks(ref output, values.stats_reports, ""); @@ -200,7 +200,7 @@ TD.align_top { vertical-align: top; } return output.ToString(); } - + public stats_default_page_values rep_DefaultReport_data(SqliteConnection db, List m_scene) { @@ -208,8 +208,8 @@ TD.align_top { vertical-align: top; } returnstruct.all_scenes = m_scene.ToArray(); lock (db) { - string SQL = @"SELECT COUNT(DISTINCT agent_id) as agents, COUNT(*) as sessions, AVG(avg_fps) as client_fps, - AVG(avg_sim_fps) as savg_sim_fps, AVG(avg_ping) as sav_ping, SUM(n_out_kb) as num_in_kb, + string SQL = @"SELECT COUNT(DISTINCT agent_id) as agents, COUNT(*) as sessions, AVG(avg_fps) as client_fps, + AVG(avg_sim_fps) as savg_sim_fps, AVG(avg_ping) as sav_ping, SUM(n_out_kb) as num_in_kb, SUM(n_out_pk) as num_in_packets, SUM(n_in_kb) as num_out_kb, SUM(n_in_pk) as num_out_packets, AVG(mem_use) as sav_mem_use FROM stats_session_data;"; SqliteCommand cmd = new SqliteCommand(SQL, db); @@ -230,7 +230,7 @@ TD.align_top { vertical-align: top; } sdr.Close(); cmd.Dispose(); } - + return returnstruct; } @@ -276,5 +276,5 @@ TD.align_top { vertical-align: top; } public Dictionary sim_stat_data; public Dictionary stats_reports; } - + } diff --git a/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs b/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs index c07619f..20e045a 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/HTMLUtil.cs @@ -95,7 +95,7 @@ namespace OpenSim.Region.UserStatistics { o.Append("\n"); } - + public static void BLOCKQUOTE_O(ref StringBuilder o, string pclass) { o.Append("ActiveLog\n"); @@ -102,13 +102,13 @@ namespace OpenSim.Region.UserStatistics } } StringBuilder replaceStr = new StringBuilder(); - //string titlecolorresults = - + //string titlecolorresults = + string formatresult = Regex.Replace(TitleColor.Replace(result[i], "$1"), "[^ABCDEFabcdef0-9]", ""); if (formatresult.Length > 6) { formatresult = formatresult.Substring(0, 6); - + } for (int j = formatresult.Length; j <= 5; j++) formatresult += "0"; @@ -116,12 +116,12 @@ namespace OpenSim.Region.UserStatistics replaceStr.Append(formatresult); replaceStr.Append("\">$3] $4
"); string repstr = replaceStr.ToString(); - + output.Append(formatopen); output.Append(webFormat.Replace(result[i], repstr)); output.Append(formatclose); } - + return output.ToString(); } diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs b/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs index 6f8b2aa..63dc87e 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/Prototype_distributor.cs @@ -44,7 +44,7 @@ namespace OpenSim.Region.UserStatistics jsFileName = "prototype.js"; } - public Prototype_distributor(string jsName) + public Prototype_distributor(string jsName) { jsFileName = jsName; } diff --git a/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs b/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs index 74e9c66..8d5434f 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/Sessions_Report.cs @@ -52,7 +52,7 @@ namespace OpenSim.Region.UserStatistics SqliteConnection dbConn = (SqliteConnection)pParams["DatabaseConnection"]; List lstSessions = new List(); Hashtable requestvars = (Hashtable) pParams["RequestVars"]; - + string puserUUID = string.Empty; string clientVersionString = string.Empty; @@ -113,7 +113,7 @@ namespace OpenSim.Region.UserStatistics cmd.Parameters.Add(new SqliteParameter(":client_version", clientVersionString)); SqliteDataReader sdr = cmd.ExecuteReader(); - + if (sdr.HasRows) { UUID userUUID = UUID.Zero; @@ -134,7 +134,7 @@ namespace OpenSim.Region.UserStatistics } ShortSessionData ssd = new ShortSessionData(); - + ssd.last_update = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["last_updated"])); ssd.start_time = Utils.UnixTimeToDateTime((uint)Convert.ToInt32(sdr["start_time"])); ssd.session_id = UUID.Parse(sdr["session_id"].ToString()); @@ -145,7 +145,7 @@ namespace OpenSim.Region.UserStatistics } } sdr.Close(); - cmd.Dispose(); + cmd.Dispose(); } modeldata["SessionData"] = lstSessions; return modeldata; @@ -248,7 +248,7 @@ TD.align_top { vertical-align: top; } output.Append(sesdata.client_version); HTMLUtil.TD_C(ref output); HTMLUtil.TR_C(ref output); - + } HTMLUtil.TR_O(ref output, ""); HTMLUtil.TD_O(ref output, "align_top", 1, 5); diff --git a/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs b/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs index 06d9e91..513686d 100644 --- a/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs +++ b/OpenSim/Region/OptionalModules/UserStatistics/SimStatsAJAX.cs @@ -50,7 +50,7 @@ namespace OpenSim.Region.UserStatistics public Hashtable ProcessModel(Hashtable pParams) { List m_scene = (List)pParams["Scenes"]; - + Hashtable nh = new Hashtable(); nh.Add("hdata", m_scene); nh.Add("simstats", pParams["SimStats"]); @@ -207,9 +207,9 @@ namespace OpenSim.Region.UserStatistics HTMLUtil.TD_C(ref output); HTMLUtil.TR_C(ref output); HTMLUtil.TABLE_C(ref output); - + } - + return output.ToString(); } @@ -218,7 +218,7 @@ namespace OpenSim.Region.UserStatistics ///
         /// {"REGIONNAME": {
         ///     "region": "REGIONNAME",
-        ///     "timeDilation": "101", 
+        ///     "timeDilation": "101",
         ///     ...     // the rest of the stat info
         ///     },
         ///  ...    // entries for each region
diff --git a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
index bd5289f..c15b194 100644
--- a/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
+++ b/OpenSim/Region/OptionalModules/UserStatistics/WebStatsModule.cs
@@ -57,7 +57,7 @@ namespace OpenSim.Region.UserStatistics
     {
         private static readonly ILog m_log =
             LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
-        
+
         private static SqliteConnection dbConn;
 
         /// 
@@ -67,7 +67,7 @@ namespace OpenSim.Region.UserStatistics
 
         private List m_scenes = new List();
         private Dictionary reports = new Dictionary();
-        private Dictionary m_simstatsCounters = new Dictionary(); 
+        private Dictionary m_simstatsCounters = new Dictionary();
         private const int updateStatsMod = 6;
         private int updateLogMod = 1;
         private volatile int updateLogCounter = 0;
@@ -217,7 +217,7 @@ namespace OpenSim.Region.UserStatistics
                     {
                         m_loglines = readLogLines(10);
 
-                        if (updateLogCounter > 10000) 
+                        if (updateLogCounter > 10000)
                             updateLogCounter = 1;
                     }
 
@@ -228,12 +228,12 @@ namespace OpenSim.Region.UserStatistics
                         ss.ConsumeSimStats(stats);
                     }
                 }
-            } 
+            }
             catch (KeyNotFoundException)
             {
             }
         }
-        
+
         private Hashtable HandleUnknownCAPSRequest(Hashtable request)
         {
             //string regpath = request["uri"].ToString();
@@ -257,7 +257,7 @@ namespace OpenSim.Region.UserStatistics
             int response_code = 404;
             string contenttype = "text/html";
             bool jsonFormatOutput = false;
-            
+
             string strOut = string.Empty;
 
             // The request patch should be "/SStats/reportName" where 'reportName'
@@ -288,15 +288,15 @@ namespace OpenSim.Region.UserStatistics
                 repParams["SimStats"] = m_simstatsCounters;
                 repParams["LogLines"] = m_loglines;
                 repParams["Reports"] = reports;
-                
+
                 concurrencyCounter++;
 
-                if (jsonFormatOutput) 
+                if (jsonFormatOutput)
                 {
                     strOut = rep.RenderJson(rep.ProcessModel(repParams));
                     contenttype = "text/json";
                 }
-                else 
+                else
                 {
                     strOut = rep.RenderView(rep.ProcessModel(repParams));
                 }
@@ -312,7 +312,7 @@ namespace OpenSim.Region.UserStatistics
                 }
 
                 concurrencyCounter--;
-                
+
                 response_code = 200;
             }
             else
@@ -463,7 +463,7 @@ namespace OpenSim.Region.UserStatistics
                                       UUID agentID, Caps caps)
         {
 //            m_log.DebugFormat("[WEB STATS MODULE]: Received viewer starts report from {0}", agentID);
- 
+
             UpdateUserStats(ParseViewerStats(request, agentID), dbConn);
 
             return String.Empty;
@@ -525,7 +525,7 @@ namespace OpenSim.Region.UserStatistics
                     }
                 }
             }
-           
+
             usd = uid.session_data;
 
             if (message.Type != OSDType.Map)
@@ -747,16 +747,16 @@ namespace OpenSim.Region.UserStatistics
             );";
 
         private const string SQL_STATS_TABLE_INSERT = @"INSERT OR REPLACE INTO stats_session_data (
-session_id, agent_id, region_id, last_updated, remote_ip, name_f, name_l, avg_agents_in_view, min_agents_in_view, max_agents_in_view, 
-mode_agents_in_view, avg_fps, min_fps, max_fps, mode_fps, a_language, mem_use, meters_traveled, avg_ping, min_ping, max_ping, mode_ping, 
+session_id, agent_id, region_id, last_updated, remote_ip, name_f, name_l, avg_agents_in_view, min_agents_in_view, max_agents_in_view,
+mode_agents_in_view, avg_fps, min_fps, max_fps, mode_fps, a_language, mem_use, meters_traveled, avg_ping, min_ping, max_ping, mode_ping,
 regions_visited, run_time, avg_sim_fps, min_sim_fps, max_sim_fps, mode_sim_fps, start_time, client_version, s_cpu, s_gpu, s_os, s_ram,
 d_object_kb, d_texture_kb, d_world_kb, n_in_kb, n_in_pk, n_out_kb, n_out_pk, f_dropped, f_failed_resends, f_invalid, f_off_circuit,
 f_resent, f_send_packet
 )
 VALUES
 (
-:session_id, :agent_id, :region_id, :last_updated, :remote_ip, :name_f, :name_l, :avg_agents_in_view, :min_agents_in_view, :max_agents_in_view, 
-:mode_agents_in_view, :avg_fps, :min_fps, :max_fps, :mode_fps, :a_language, :mem_use, :meters_traveled, :avg_ping, :min_ping, :max_ping, :mode_ping, 
+:session_id, :agent_id, :region_id, :last_updated, :remote_ip, :name_f, :name_l, :avg_agents_in_view, :min_agents_in_view, :max_agents_in_view,
+:mode_agents_in_view, :avg_fps, :min_fps, :max_fps, :mode_fps, :a_language, :mem_use, :meters_traveled, :avg_ping, :min_ping, :max_ping, :mode_ping,
 :regions_visited, :run_time, :avg_sim_fps, :min_sim_fps, :max_sim_fps, :mode_sim_fps, :start_time, :client_version, :s_cpu, :s_gpu, :s_os, :s_ram,
 :d_object_kb, :d_texture_kb, :d_world_kb, :n_in_kb, :n_in_pk, :n_out_kb, :n_out_pk, :f_dropped, :f_failed_resends, :f_invalid, :f_off_circuit,
 :f_resent, :f_send_packet
@@ -980,7 +980,7 @@ VALUES
 
             if ((srtArr[srtArr.Length - 1]) == 0 || (srtArr[srtArr.Length - 1]) == 1)
                 return 0;
-           
+
             float freqtest = (float)freq.Length / freq.Rank;
 
             for (i = 0; i < freqtest; i++)
@@ -1116,7 +1116,7 @@ VALUES
         public List _sim_fps;
         public List _agents_in_view;
     }
-  
+
     #endregion
 
     public class USimStatsData
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
index 770b1f2..54f3ab6 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/CameraOnlyModeModule.cs
@@ -161,7 +161,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
                 {
                     foreach (SceneObjectGroup sog in attachs)
                     {
-                        m_log.DebugFormat("[CAMERA-ONLY MODE]: Forcibly detaching attach {0} from {1} in {2}", 
+                        m_log.DebugFormat("[CAMERA-ONLY MODE]: Forcibly detaching attach {0} from {1} in {2}",
                             sog.Name, sp.Name, m_scene.RegionInfo.RegionName);
 
                         m_scene.AttachmentsModule.DetachSingleAttachmentToInv(sp, sog);
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
index 709a16d..9833086 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/DynamicMenuModule.cs
@@ -159,7 +159,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
 
                     if (loc == null)
                         continue;
-                    
+
                     loc[d.Title] = OSD.FromString(d.Title);
                 }
             }
@@ -193,7 +193,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
 
                     if (loc == null)
                         continue;
-                    
+
                     loc[d.Title] = OSD.FromString(d.Title);
                 }
             }
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs b/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
index e0537a4..8ed0bb3 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/GodNamesModule.cs
@@ -50,7 +50,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
         private static List m_lastNames = new List();
         private static List m_fullNames = new List();
 
-        public void Initialise(IConfigSource config) 
+        public void Initialise(IConfigSource config)
         {
             IConfig moduleConfig = config.Configs["GodNames"];
 
@@ -133,7 +133,7 @@ namespace OpenSim.Region.OptionalModules.ViewerSupport
                 fnames.Add(name);
             }
             ((OSDMap)namesmap)["full_names"] = fnames;
-            
+
             OSDArray lnames = new OSDArray();
             foreach (string name in m_lastNames) {
                 lnames.Add(name);
diff --git a/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs b/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
index 1ae18dd..2c2042d 100644
--- a/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
+++ b/OpenSim/Region/OptionalModules/ViewerSupport/SimulatorFeaturesHelper.cs
@@ -49,7 +49,7 @@ using TeleportFlags = OpenSim.Framework.Constants.TeleportFlags;
 
 namespace OpenSim.Region.OptionalModules.ViewerSupport
 {
-    public class SimulatorFeaturesHelper 
+    public class SimulatorFeaturesHelper
     {
         private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
 
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
index ceb3332..79b80f8 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModule.cs
@@ -63,28 +63,28 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
     /// If specified in Regions.ini, the settings should be within the region's section name.
     /// If specified in OpenSim.ini, the settings should be within the [AutoBackupModule] section.
     /// Region-specific settings take precedence.
-    /// 
+    ///
     /// AutoBackupModuleEnabled: True/False. Default: False. If True, use the auto backup module. This setting does not support per-region basis.
     ///     All other settings under [AutoBackupModule] are ignored if AutoBackupModuleEnabled is false, even per-region settings!
-    /// AutoBackup: True/False. Default: False. If True, activate auto backup functionality. 
-    /// 	This is the only required option for enabling auto-backup; the other options have sane defaults. 
+    /// AutoBackup: True/False. Default: False. If True, activate auto backup functionality.
+    /// 	This is the only required option for enabling auto-backup; the other options have sane defaults.
     /// 	If False for a particular region, the auto-backup module becomes a no-op for the region, and all other AutoBackup* settings are ignored.
     /// 	If False globally (the default), only regions that specifically override it in Regions.ini will get AutoBackup functionality.
-    /// AutoBackupInterval: Double, non-negative value. Default: 720 (12 hours). 
-    /// 	The number of minutes between each backup attempt. 
+    /// AutoBackupInterval: Double, non-negative value. Default: 720 (12 hours).
+    /// 	The number of minutes between each backup attempt.
     /// 	If a negative or zero value is given, it is equivalent to setting AutoBackup = False.
-    /// AutoBackupBusyCheck: True/False. Default: True. 
-    /// 	If True, we will only take an auto-backup if a set of conditions are met. 
+    /// AutoBackupBusyCheck: True/False. Default: True.
+    /// 	If True, we will only take an auto-backup if a set of conditions are met.
     /// 	These conditions are heuristics to try and avoid taking a backup when the sim is busy.
     /// AutoBackupSkipAssets
     ///     If true, assets are not saved to the oar file. Considerably reduces impact on simulator when backing up. Intended for when assets db is backed up separately
     /// AutoBackupKeepFilesForDays
     ///     Backup files older than this value (in days) are deleted during the current backup process, 0 will disable this and keep all backup files indefinitely
-    /// AutoBackupScript: String. Default: not specified (disabled). 
+    /// AutoBackupScript: String. Default: not specified (disabled).
     /// 	File path to an executable script or binary to run when an automatic backup is taken.
     ///  The file should really be (Windows) an .exe or .bat, or (Linux/Mac) a shell script or binary.
     ///  Trying to "run" directories, or things with weird file associations on Win32, might cause unexpected results!
-    /// 	argv[1] of the executed file/script will be the file name of the generated OAR. 
+    /// 	argv[1] of the executed file/script will be the file name of the generated OAR.
     /// 	If the process can't be spawned for some reason (file not found, no execute permission, etc), write a warning to the console.
     /// AutoBackupNaming: string. Default: Time.
     /// 	One of three strings (case insensitive):
@@ -295,7 +295,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
             if (args.Length != 2) {
                 MainConsole.Instance.OutputFormat ("Usage: dobackup ");
                 return;
-            }  
+            }
             bool found = false;
             string name = args [1];
             lock (m_Scenes) {
diff --git a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
index ce7c368..b90f0c4 100644
--- a/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
+++ b/OpenSim/Region/OptionalModules/World/AutoBackup/AutoBackupModuleState.cs
@@ -35,7 +35,7 @@ namespace OpenSim.Region.OptionalModules.World.AutoBackup
     /// If you use this class in any way outside of AutoBackupModule, you should treat the class as opaque.
     /// Since it is not part of the framework, you really should not rely upon it outside of the AutoBackupModule implementation.
     /// 
-    /// 
+    ///
     public class AutoBackupModuleState
     {
         private Dictionary m_liveRequests = null;
diff --git a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
index 8565f5a..47edeb9 100644
--- a/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
+++ b/OpenSim/Region/OptionalModules/World/MoneyModule/SampleMoneyModule.cs
@@ -151,13 +151,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
                         // to the command line parameters you use to start up your client
                         // This commonly looks like -helperuri http://127.0.0.1:9000/
 
-                       
+
                         // Local Server..  enables functionality only.
                         httpServer.AddXmlRPCHandler("getCurrencyQuote", quote_func);
                         httpServer.AddXmlRPCHandler("buyCurrency", buy_func);
                         httpServer.AddXmlRPCHandler("preflightBuyLandPrep", preflightBuyLandPrep_func);
                         httpServer.AddXmlRPCHandler("buyLandPrep", landBuy_func);
-                       
+
                     }
 
                     if (m_scenel.ContainsKey(scene.RegionInfo.RegionHandle))
@@ -212,7 +212,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
 
             bool give_result = doMoneyTransfer(fromID, toID, amount, 2, description);
 
-            
+
             BalanceUpdate(fromID, toID, give_result, description);
 
             return give_result;
@@ -303,7 +303,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
         private bool doMoneyTransfer(UUID Sender, UUID Receiver, int amount, int transactiontype, string description)
         {
             bool result = true;
-            
+
             return result;
         }
 
@@ -377,10 +377,10 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
             else
             {
                 m_log.ErrorFormat(
-                    "[MONEY]: Could not resolve user {0}", 
+                    "[MONEY]: Could not resolve user {0}",
                     agentID);
             }
-            
+
             return String.Empty;
         }
 
@@ -464,7 +464,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
             Hashtable quoteResponse = new Hashtable();
             XmlRpcResponse returnval = new XmlRpcResponse();
 
-            
+
             Hashtable currencyResponse = new Hashtable();
             currencyResponse.Add("estimatedCost", 0);
             currencyResponse.Add("currencyBuy", amount);
@@ -475,7 +475,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
 
             returnval.Value = quoteResponse;
             return returnval;
-            
+
 
 
         }
@@ -485,7 +485,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
             // Hashtable requestData = (Hashtable) request.Params[0];
             // UUID agentId = UUID.Zero;
             // int amount = 0;
-           
+
             XmlRpcResponse returnval = new XmlRpcResponse();
             Hashtable returnresp = new Hashtable();
             returnresp.Add("success", true);
@@ -536,7 +536,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
 
             // UUID agentId = UUID.Zero;
             // int amount = 0;
-           
+
             retparam.Add("success", true);
             ret.Value = retparam;
 
@@ -553,7 +553,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
         /// 
         private void CheckExistAndRefreshFunds(UUID agentID)
         {
-            
+
         }
 
         /// 
@@ -564,13 +564,13 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
         private int GetFundsForAgentID(UUID AgentID)
         {
             int returnfunds = 0;
-            
+
             return returnfunds;
         }
 
         // private void SetLocalFundsForAgentID(UUID AgentID, int amount)
         // {
-            
+
         // }
 
         #endregion
@@ -689,7 +689,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
         /// 
         public void ClientClosed(UUID AgentID, Scene scene)
         {
-            
+
         }
 
         /// 
@@ -708,19 +708,19 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
 
         private void ValidateLandBuy(Object osender, EventManager.LandBuyArgs e)
         {
-            
-            
+
+
             lock (e)
             {
                 e.economyValidated = true;
             }
-       
-            
+
+
         }
 
         private void processLandBuy(Object osender, EventManager.LandBuyArgs e)
         {
-            
+
         }
 
         /// 
@@ -730,7 +730,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
         /// 
         private void MoneyTransferAction(Object osender, EventManager.MoneyTransferArgs e)
         {
-            
+
         }
 
         /// 
@@ -739,7 +739,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
         /// 
         private void MakeChildAgent(ScenePresence avatar)
         {
-            
+
         }
 
         /// 
@@ -748,7 +748,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
         /// 
         private void ClientLoggedOut(UUID AgentId, Scene scene)
         {
-            
+
         }
 
         /// 
@@ -768,7 +768,7 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
         /// 
         private void AvatarEnteringParcel(ScenePresence avatar, int localLandID, UUID regionID)
         {
-            
+
             //m_log.Info("[FRIEND]: " + avatar.Name + " status:" + (!avatar.IsChildAgent).ToString());
         }
 
@@ -809,12 +809,12 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
 
             Scene s = LocateSceneClientIn(remoteClient.AgentId);
 
-            // Implmenting base sale data checking here so the default OpenSimulator implementation isn't useless 
+            // Implmenting base sale data checking here so the default OpenSimulator implementation isn't useless
             // combined with other implementations.  We're actually validating that the client is sending the data
             // that it should.   In theory, the client should already know what to send here because it'll see it when it
-            // gets the object data.   If the data sent by the client doesn't match the object, the viewer probably has an 
-            // old idea of what the object properties are.   Viewer developer Hazim informed us that the base module 
-            // didn't check the client sent data against the object do any.   Since the base modules are the 
+            // gets the object data.   If the data sent by the client doesn't match the object, the viewer probably has an
+            // old idea of what the object properties are.   Viewer developer Hazim informed us that the base module
+            // didn't check the client sent data against the object do any.   Since the base modules are the
             // 'crowning glory' examples of good practice..
 
             // Validate that the object exists in the scene the user is in
@@ -824,15 +824,15 @@ namespace OpenSim.Region.OptionalModules.World.MoneyModule
                 remoteClient.SendAgentAlertMessage("Unable to buy now. The object was not found.", false);
                 return;
             }
-            
-            // Validate that the client sent the price that the object is being sold for 
+
+            // Validate that the client sent the price that the object is being sold for
             if (part.SalePrice != salePrice)
             {
                 remoteClient.SendAgentAlertMessage("Cannot buy at this price. Buy Failed. If you continue to get this relog.", false);
                 return;
             }
 
-            // Validate that the client sent the proper sale type the object has set 
+            // Validate that the client sent the proper sale type the object has set
             if (part.ObjectSaleType != saleType)
             {
                 remoteClient.SendAgentAlertMessage("Cannot buy this way. Buy Failed. If you continue to get this relog.", false);
diff --git a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
index 0cabe47..6a7c735 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/NPCAvatar.cs
@@ -49,7 +49,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         }
 
         public delegate void ChatToNPC(
-            string message, byte type, Vector3 fromPos, string fromName, 
+            string message, byte type, Vector3 fromPos, string fromName,
             UUID fromAgentID, UUID ownerID, byte source, byte audible);
 
         /// 
@@ -223,7 +223,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         {
 
         }
-                
+
         public void SendSitResponse(UUID TargetID, Vector3 OffsetPos,
                     Quaternion SitOrientation, bool autopilot,
                     Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook)
@@ -519,7 +519,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         public event AvatarInterestUpdate OnAvatarInterestUpdate;
 
         public event PlacesQuery OnPlacesQuery;
-        
+
         public event FindAgentUpdate OnFindAgent;
         public event TrackAgentUpdate OnTrackAgent;
         public event NewUserReport OnUserReport;
@@ -931,7 +931,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
                 OnRegionHandShakeReply(this);
             }
         }
-        
+
         public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID)
         {
         }
@@ -951,7 +951,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec)
         {
         }
-        
+
         public void SendImageNotFound(UUID imageid)
         {
         }
@@ -959,7 +959,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData)
         {
         }
-        
+
         public void SendShutdownConnectionNotice()
         {
         }
@@ -970,7 +970,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
 
         public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags)
         {
-            
+
         }
 
         public void SendObjectPropertiesReply(ISceneEntity entity)
@@ -984,7 +984,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks)
         {
         }
-            
+
         public void SendViewerTime(int phase)
         {
         }
@@ -1029,7 +1029,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
             // We never start the client, so always fail.
             throw new NotImplementedException();
         }
-        
+
         public void Stop()
         {
         }
@@ -1224,11 +1224,11 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         public void SendJoinGroupReply(UUID groupID, bool success)
         {
         }
-        
+
         public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success)
         {
         }
-        
+
         public void SendLeaveGroupReply(UUID groupID, bool success)
         {
         }
@@ -1318,7 +1318,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         {
         }
         #endregion
-        
+
         public void SendRebakeAvatarTextures(UUID textureID)
         {
         }
@@ -1326,15 +1326,15 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages)
         {
         }
-        
+
         public void SendGroupAccountingDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID, int amt)
         {
         }
-        
+
         public void SendGroupAccountingSummary(IClientAPI sender,UUID groupID, uint moneyAmt, int totalTier, int usedTier)
         {
         }
-        
+
         public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt)
         {
         }
@@ -1354,7 +1354,7 @@ namespace OpenSim.Region.OptionalModules.World.NPC
         public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId)
         {
         }
-        
+
         public void SendAgentTerseUpdate(ISceneEntity presence)
         {
         }
diff --git a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
index a892cf4..9a1ea73 100644
--- a/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
+++ b/OpenSim/Region/OptionalModules/World/NPC/Tests/NPCModuleTests.cs
@@ -209,10 +209,10 @@ namespace OpenSim.Region.OptionalModules.World.NPC.Tests
             UserAccountHelpers.CreateUserWithInventory(m_scene, userId);
             ScenePresence sp = SceneHelpers.AddScenePresence(m_scene, userId);
 
-            InventoryItemBase att1Item 
+            InventoryItemBase att1Item
                 = UserInventoryHelpers.CreateInventoryItem(
                     m_scene, "att1", TestHelpers.ParseTail(0x2), TestHelpers.ParseTail(0x3), sp.UUID, InventoryType.Object);
-            InventoryItemBase att2Item 
+            InventoryItemBase att2Item
                 = UserInventoryHelpers.CreateInventoryItem(
                     m_scene, "att2", TestHelpers.ParseTail(0x12), TestHelpers.ParseTail(0x13), sp.UUID, InventoryType.Object);
 
diff --git a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
index bea3a1e..d0d726c 100644
--- a/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
+++ b/OpenSim/Region/OptionalModules/World/SceneCommands/SceneCommandsModule.cs
@@ -54,38 +54,38 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
         private Scene m_scene;
 
         public string Name { get { return "Scene Commands Module"; } }
-        
+
         public Type ReplaceableInterface { get { return null; } }
-        
+
         public void Initialise(IConfigSource source)
         {
 //            m_log.DebugFormat("[SCENE COMMANDS MODULE]: INITIALIZED MODULE");
         }
-        
+
         public void PostInitialise()
         {
 //            m_log.DebugFormat("[SCENE COMMANDS MODULE]: POST INITIALIZED MODULE");
         }
-        
+
         public void Close()
         {
 //            m_log.DebugFormat("[SCENE COMMANDS MODULE]: CLOSED MODULE");
         }
-        
+
         public void AddRegion(Scene scene)
         {
 //            m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName);
 
             m_scene = scene;
-            
+
             m_scene.RegisterModuleInterface(this);
         }
-        
+
         public void RemoveRegion(Scene scene)
         {
 //            m_log.DebugFormat("[SCENE COMMANDS MODULE]: REGION {0} REMOVED", scene.RegionInfo.RegionName);
-        }        
-        
+        }
+
         public void RegionLoaded(Scene scene)
         {
 //            m_log.DebugFormat("[ATTACHMENTS COMMAND MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName);
@@ -101,7 +101,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
                     + "client-rot-upd  - the tolerance before clients are updated with new rotation information for an avatar.\n"
                     + "client-vel-upd  - the tolerance before clients are updated with new velocity information for an avatar.\n"
                     + "root-upd-per    - if greater than 1, terse updates are only sent to root agents other than the originator on every n updates.\n"
-                    + "child-upd-per   - if greater than 1, terse updates are only sent to child agents on every n updates.\n"                    
+                    + "child-upd-per   - if greater than 1, terse updates are only sent to child agents on every n updates.\n"
                     + "collisions      - if false then collisions with other objects are turned off.\n"
                     + "pbackup         - if false then periodic scene backup is turned off.\n"
                     + "physics         - if false then all physics objects are non-physical.\n"
@@ -213,7 +213,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
 
                 // FIXME: This can only come from the console at the moment but might not always be true.
                 if (ConsoleUtil.TryParseConsoleBool(MainConsole.Instance, options["appear-refresh"], out newValue))
-                    m_scene.SendPeriodicAppearanceUpdates = newValue;     
+                    m_scene.SendPeriodicAppearanceUpdates = newValue;
             }
 
             if (options.ContainsKey("client-pos-upd"))
@@ -222,7 +222,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
 
                 // FIXME: This can only come from the console at the moment but might not always be true.
                 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-pos-upd"], out newValue))
-                    m_scene.RootPositionUpdateTolerance = newValue;    
+                    m_scene.RootPositionUpdateTolerance = newValue;
             }
 
             if (options.ContainsKey("client-rot-upd"))
@@ -231,7 +231,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
 
                 // FIXME: This can only come from the console at the moment but might not always be true.
                 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-rot-upd"], out newValue))
-                    m_scene.RootRotationUpdateTolerance = newValue;    
+                    m_scene.RootRotationUpdateTolerance = newValue;
             }
 
             if (options.ContainsKey("client-vel-upd"))
@@ -240,7 +240,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
 
                 // FIXME: This can only come from the console at the moment but might not always be true.
                 if (ConsoleUtil.TryParseConsoleFloat(MainConsole.Instance, options["client-vel-upd"], out newValue))
-                    m_scene.RootVelocityUpdateTolerance = newValue;    
+                    m_scene.RootVelocityUpdateTolerance = newValue;
             }
 
             if (options.ContainsKey("root-upd-per"))
@@ -249,7 +249,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
 
                 // FIXME: This can only come from the console at the moment but might not always be true.
                 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["root-upd-per"], out newValue))
-                    m_scene.RootTerseUpdatePeriod = newValue;    
+                    m_scene.RootTerseUpdatePeriod = newValue;
             }
 
             if (options.ContainsKey("child-upd-per"))
@@ -258,7 +258,7 @@ namespace OpenSim.Region.OptionalModules.Avatar.Attachments
 
                 // FIXME: This can only come from the console at the moment but might not always be true.
                 if (ConsoleUtil.TryParseConsoleNaturalInt(MainConsole.Instance, options["child-upd-per"], out newValue))
-                    m_scene.ChildTerseUpdatePeriod = newValue;    
+                    m_scene.ChildTerseUpdatePeriod = newValue;
             }
 
             if (options.ContainsKey("pbackup"))
diff --git a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
index e4a3382..e22c6ea 100644
--- a/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
+++ b/OpenSim/Region/OptionalModules/World/TreePopulator/TreePopulatorModule.cs
@@ -45,7 +45,7 @@ using System.IO;
 namespace OpenSim.Region.OptionalModules.World.TreePopulator
 {
     /// 
-    /// Version 2.02 - Still hacky 
+    /// Version 2.02 - Still hacky
     /// 
     [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "TreePopulatorModule")]
     public class TreePopulatorModule : INonSharedRegionModule, ICommandableModule, IVegetationModule
@@ -60,7 +60,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
             public string m_name;
             public Boolean m_frozen;
             public Tree m_tree_type;
-            public int m_tree_quantity; 
+            public int m_tree_quantity;
             public float m_treeline_low;
             public float m_treeline_high;
             public Vector3 m_seed_point;
@@ -78,7 +78,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
             {
             }
 
-            public Copse(string fileName, Boolean planted) 
+            public Copse(string fileName, Boolean planted)
             {
                 Copse cp = (Copse)DeserializeObject(fileName);
 
@@ -139,7 +139,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
             {
                 string frozen = (this.m_frozen ? "F" : "A");
 
-                return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};", 
+                return string.Format("{0}TPM: {1}; {2}; {3:0.0}; {4:0.0}; {5:0.0}; {6}; {7:0.0}; {8:0.0}; {9:0.0}; {10:0.00};",
                     frozen,
                     this.m_name,
                     this.m_tree_quantity,
@@ -156,7 +156,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
 
         private List m_copse;
 
-        private double m_update_ms = 1000.0; // msec between updates 
+        private double m_update_ms = 1000.0; // msec between updates
         private bool m_active_trees = false;
 
         Timer CalculateTrees;
@@ -174,7 +174,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
 
         public void Initialise(IConfigSource config)
         {
-            
+
             // ini file settings
             try
             {
@@ -621,11 +621,11 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
                 CalculateTrees.Elapsed += CalculateTrees_Elapsed;
                 CalculateTrees.Start();
             }
-            else 
+            else
             {
                  CalculateTrees.Stop();
             }
-        } 
+        }
 
         private void growTrees()
         {
@@ -670,7 +670,7 @@ namespace OpenSim.Region.OptionalModules.World.TreePopulator
                             if (copse.m_trees.Count < copse.m_tree_quantity)
                             {
                                 // Tree has grown enough to seed if it has grown by at least 25% of seeded to full grown height
-                                if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0) 
+                                if (s_tree.Scale.Z > copse.m_initial_scale.Z + (copse.m_maximum_scale.Z - copse.m_initial_scale.Z) / 4.0)
                                 {
                                     if (Util.RandomClass.NextDouble() > 0.75)
                                     {
-- 
cgit v1.1