From ac80b6539f81018122f211c26805d4a9f9da32ff Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 30 May 2009 03:18:09 +0000 Subject: * May partially implement a C# IRCd & IRCClientStack. --- .../InternetRelayClientView/IRCStackModule.cs | 41 + .../Server/IRCClientView.cs | 1399 ++++++++++++++++++++ .../InternetRelayClientView/Server/IRCServer.cs | 47 + 3 files changed, 1487 insertions(+) create mode 100644 OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs create mode 100644 OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs create mode 100644 OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs new file mode 100644 index 0000000..c182445 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -0,0 +1,41 @@ +using System; +using System.Collections.Generic; +using System.Text; +using Nini.Config; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView +{ + class IRCStackModule : IRegionModule + { + #region Implementation of IRegionModule + + public void Initialise(Scene scene, IConfigSource source) + { + throw new System.NotImplementedException(); + } + + public void PostInitialise() + { + throw new System.NotImplementedException(); + } + + public void Close() + { + throw new System.NotImplementedException(); + } + + public string Name + { + get { throw new System.NotImplementedException(); } + } + + public bool IsSharedModule + { + get { throw new System.NotImplementedException(); } + } + + #endregion + } +} diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs new file mode 100644 index 0000000..97731ee --- /dev/null +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -0,0 +1,1399 @@ +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading; +using OpenMetaverse; +using OpenMetaverse.Packets; +using OpenSim.Framework; +using OpenSim.Framework.Client; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server +{ + class IRCClientView : IClientAPI, IClientCore, IClientIPEndpoint + { + private readonly TcpClient m_client; + private readonly Scene m_scene; + + private string m_username; + + private bool m_hasNick = false; + private bool m_hasUser = false; + + public IRCClientView(TcpClient client, Scene scene) + { + m_client = client; + m_scene = scene; + + Thread loopThread = new Thread(InternalLoop); + loopThread.Start(); + } + + private void SendCommand(string command) + { + lock(m_client) + { + byte[] buf = Encoding.UTF8.GetBytes(command + "\r\n"); + + m_client.GetStream().Write(buf, 0, buf.Length); + } + } + + private string IrcRegionName + { + // I know &Channel is more technically correct, but people are used to seeing #Channel + // Dont shoot me! + get { return "#" + m_scene.RegionInfo.RegionName.Replace(" ", "-"); } + } + + private void InternalLoop() + { + string strbuf = ""; + + while(true) + { + string line; + byte[] buf = new byte[520]; // RFC1459 defines max message size as 512. + + lock (m_client) + { + int count = m_client.GetStream().Read(buf, 0, buf.Length); + line = Encoding.UTF8.GetString(buf, 0, count); + } + + strbuf += line; + + string message = ExtractMessage(strbuf); + if(message != null) + { + // Remove from buffer + strbuf = strbuf.Remove(0, message.Length); + + // Extract command sequence + string command = ExtractCommand(message); + ProcessInMessage(message, command); + } + + Thread.Sleep(0); + } + } + + private void ProcessInMessage(string message, string command) + { + if(command != null) + { + switch(command) + { + case "ADMIN": + case "AWAY": + case "CONNECT": + case "DIE": + case "ERROR": + case "INFO": + case "INVITE": + case "ISON": + case "KICK": + case "KILL": + case "LINKS": + case "LUSERS": + case "MODE": + case "OPER": + case "PART": + case "REHASH": + case "SERVICE": + case "SERVLIST": + case "SERVER": + case "SQUERY": + case "SQUIT": + case "STATS": + case "SUMMON": + case "TIME": + case "TRACE": + case "USERHOST": + case "VERSION": + case "WALLOPS": + case "WHOIS": + case "WHOWAS": + SendCommand("421 ERR_UNKNOWNCOMMAND \"" + command + " :Command unimplemented\""); + break; + + // Connection Commands + case "PASS": + break; // Ignore for now. I want to implement authentication later however. + + case "JOIN": + break; + + case "USER": + IRC_ProcessUser(message); + IRC_SendReplyJoin(); + + break; + case "NICK": + IRC_ProcessNick(message); + IRC_SendReplyJoin(); + + break; + case "TOPIC": + IRC_SendReplyTopic(); + break; + case "USERS": + IRC_SendReplyUsers(); + break; + + case "LIST": + break; // TODO + + case "MOTD": + IRC_SendMOTD(); + break; + + case "NOTICE": // TODO + case "WHO": // TODO + break; + + case "PING": + IRC_ProcessPing(message); + break; + + // Special case, ignore this completely. + case "PONG": + break; + + case "QUIT": + if (OnDisconnectUser != null) + OnDisconnectUser(); + break; + + case "NAMES": + IRC_SendNamesReply(); + break; + case "PRIVMSG": + IRC_ProcessPrivmsg(message); + break; + + default: + SendCommand("421 ERR_UNKNOWNCOMMAND \"" + command + " :Unknown command\""); + break; + } + } + } + + private void IRC_SendReplyJoin() + { + if (m_hasUser && m_hasNick) + { + IRC_SendReplyTopic(); + IRC_SendNamesReply(); + } + } + + private void IRC_ProcessUser(string message) + { + string[] userArgs = ExtractParameters(message); + string username = userArgs[0]; + string hostname = userArgs[1]; + string servername = userArgs[2]; + string realname = userArgs[3]; + + m_username = realname; + m_hasUser = true; + } + + private void IRC_ProcessNick(string message) + { + string[] nickArgs = ExtractParameters(message); + string nickname = nickArgs[0]; + m_hasNick = true; + } + + private void IRC_ProcessPing(string message) + { + string[] pingArgs = ExtractParameters(message); + string pingHost = pingArgs[0]; + SendCommand("PONG " + pingHost); + } + + private void IRC_ProcessPrivmsg(string message) + { + string[] privmsgArgs = ExtractParameters(message); + if (privmsgArgs[0] == IrcRegionName) + { + if (OnChatFromClient != null) + { + OSChatMessage msg = new OSChatMessage(); + msg.Sender = this; + msg.Channel = 0; + msg.From = this.Name; + msg.Message = privmsgArgs[1]; + msg.Position = Vector3.Zero; + msg.Scene = m_scene; + msg.SenderObject = null; + msg.SenderUUID = this.AgentId; + msg.Type = ChatTypeEnum.Broadcast; + + OnChatFromClient(this, msg); + } + } + else + { + // Handle as an IM, later. + } + } + + private void IRC_SendNamesReply() + { + List users = m_scene.Entities.GetAllByType(); + + foreach (EntityBase user in users) + { + SendCommand("353 RPL_NAMREPLY \"" + IrcRegionName + " :+" + user.Name.Replace(" ", "")); + } + SendCommand("366 RPL_ENDOFNAMES \"" + IrcRegionName + " :End of /NAMES list\""); + } + + private void IRC_SendMOTD() + { + SendCommand("375 RPL_MOTDSTART \":- OpenSimulator Message of the day -"); + SendCommand("372 RPL_MOTD \":- Hiya!"); + SendCommand("376 RPL_ENDOFMOTD \":End of /MOTD command\""); + } + + private void IRC_SendReplyTopic() + { + SendCommand("332 RPL_TOPIC \"" + IrcRegionName + " :OpenSimulator IRC Server\""); + } + + private void IRC_SendReplyUsers() + { + List users = m_scene.Entities.GetAllByType(); + + SendCommand("392 RPL_USERSSTART \":UserID Terminal Host\""); + foreach (EntityBase user in users) + { + char[] nom = new char[8]; + char[] term = "terminal_".ToCharArray(); + char[] host = "hostname".ToCharArray(); + + string userName = user.Name.Replace(" ",""); + for (int i = 0; i < nom.Length; i++) + { + if (userName.Length < i) + nom[i] = userName[i]; + else + nom[i] = ' '; + } + + SendCommand("393 RPL_USERS \":" + nom + " " + term + " " + host + "\""); + } + + SendCommand("394 RPL_ENDOFUSERS \":End of users\""); + } + + private static string ExtractMessage(string buffer) + { + int pos = buffer.IndexOf("\r\n"); + + if (pos == -1) + return null; + + string command = buffer.Substring(0, pos + 1); + + return command; + } + + private static string ExtractCommand(string msg) + { + string[] msgs = msg.Split(' '); + + if(msgs.Length < 2) + return null; + + if (msgs[0].StartsWith(":")) + return msgs[1]; + + return msgs[0]; + } + + private static string[] ExtractParameters(string msg) + { + string[] msgs = msg.Split(' '); + List parms = new List(msgs.Length); + + bool foundCommand = false; + string command = ExtractCommand(msg); + + + for(int i=0;i tmp = new List(); + for(int j=i;j(out T iface) + { + throw new System.NotImplementedException(); + } + + public T Get() + { + throw new System.NotImplementedException(); + } + + public UUID AgentId + { + get { return UUID.Zero; } + } + + public void Disconnect(string reason) + { + throw new System.NotImplementedException(); + } + + public void Disconnect() + { + throw new System.NotImplementedException(); + } + + public UUID SessionId + { + get { throw new System.NotImplementedException(); } + } + + public UUID SecureSessionId + { + get { throw new System.NotImplementedException(); } + } + + public UUID ActiveGroupId + { + get { throw new System.NotImplementedException(); } + } + + public string ActiveGroupName + { + get { throw new System.NotImplementedException(); } + } + + public ulong ActiveGroupPowers + { + get { throw new System.NotImplementedException(); } + } + + public ulong GetGroupPowers(UUID groupID) + { + throw new System.NotImplementedException(); + } + + public bool IsGroupMember(UUID GroupID) + { + throw new System.NotImplementedException(); + } + + public string FirstName + { + get { throw new System.NotImplementedException(); } + } + + public string LastName + { + get { throw new System.NotImplementedException(); } + } + + public IScene Scene + { + get { throw new System.NotImplementedException(); } + } + + public int NextAnimationSequenceNumber + { + get { throw new System.NotImplementedException(); } + } + + public string Name + { + get { throw new System.NotImplementedException(); } + } + + public bool IsActive + { + get { throw new System.NotImplementedException(); } + set { throw new System.NotImplementedException(); } + } + + public bool SendLogoutPacketWhenClosing + { + set { throw new System.NotImplementedException(); } + } + + public uint CircuitCode + { + get { throw new System.NotImplementedException(); } + } + + public event GenericMessage OnGenericMessage; + public event ImprovedInstantMessage OnInstantMessage; + public event ChatMessage OnChatFromClient; + public event TextureRequest OnRequestTexture; + public event RezObject OnRezObject; + public event ModifyTerrain OnModifyTerrain; + public event BakeTerrain OnBakeTerrain; + public event EstateChangeInfo OnEstateChangeInfo; + public event SetAppearance OnSetAppearance; + public event AvatarNowWearing OnAvatarNowWearing; + public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; + public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv; + public event UUIDNameRequest OnDetachAttachmentIntoInv; + public event ObjectAttach OnObjectAttach; + public event ObjectDeselect OnObjectDetach; + public event ObjectDrop OnObjectDrop; + public event StartAnim OnStartAnim; + public event StopAnim OnStopAnim; + public event LinkObjects OnLinkObjects; + public event DelinkObjects OnDelinkObjects; + public event RequestMapBlocks OnRequestMapBlocks; + public event RequestMapName OnMapNameRequest; + public event TeleportLocationRequest OnTeleportLocationRequest; + public event DisconnectUser OnDisconnectUser; + public event RequestAvatarProperties OnRequestAvatarProperties; + public event SetAlwaysRun OnSetAlwaysRun; + public event TeleportLandmarkRequest OnTeleportLandmarkRequest; + public event DeRezObject OnDeRezObject; + public event Action OnRegionHandShakeReply; + public event GenericCall2 OnRequestWearables; + public event GenericCall2 OnCompleteMovementToRegion; + public event UpdateAgent OnAgentUpdate; + public event AgentRequestSit OnAgentRequestSit; + public event AgentSit OnAgentSit; + public event AvatarPickerRequest OnAvatarPickerRequest; + public event Action OnRequestAvatarsData; + public event AddNewPrim OnAddPrim; + public event FetchInventory OnAgentDataUpdateRequest; + public event TeleportLocationRequest OnSetStartLocationRequest; + public event RequestGodlikePowers OnRequestGodlikePowers; + public event GodKickUser OnGodKickUser; + public event ObjectDuplicate OnObjectDuplicate; + public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; + public event GrabObject OnGrabObject; + public event ObjectSelect OnDeGrabObject; + public event MoveObject OnGrabUpdate; + public event SpinStart OnSpinStart; + public event SpinObject OnSpinUpdate; + public event SpinStop OnSpinStop; + public event UpdateShape OnUpdatePrimShape; + public event ObjectExtraParams OnUpdateExtraParams; + public event ObjectSelect OnObjectSelect; + public event ObjectDeselect OnObjectDeselect; + public event GenericCall7 OnObjectDescription; + public event GenericCall7 OnObjectName; + public event GenericCall7 OnObjectClickAction; + public event GenericCall7 OnObjectMaterial; + public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; + public event UpdatePrimFlags OnUpdatePrimFlags; + public event UpdatePrimTexture OnUpdatePrimTexture; + public event UpdateVector OnUpdatePrimGroupPosition; + public event UpdateVector OnUpdatePrimSinglePosition; + public event UpdatePrimRotation OnUpdatePrimGroupRotation; + public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; + public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; + public event UpdateVector OnUpdatePrimScale; + public event UpdateVector OnUpdatePrimGroupScale; + public event StatusChange OnChildAgentStatus; + public event GenericCall2 OnStopMovement; + public event Action OnRemoveAvatar; + public event ObjectPermissions OnObjectPermissions; + public event CreateNewInventoryItem OnCreateNewInventoryItem; + public event CreateInventoryFolder OnCreateNewInventoryFolder; + public event UpdateInventoryFolder OnUpdateInventoryFolder; + public event MoveInventoryFolder OnMoveInventoryFolder; + public event FetchInventoryDescendents OnFetchInventoryDescendents; + public event PurgeInventoryDescendents OnPurgeInventoryDescendents; + public event FetchInventory OnFetchInventory; + public event RequestTaskInventory OnRequestTaskInventory; + public event UpdateInventoryItem OnUpdateInventoryItem; + public event CopyInventoryItem OnCopyInventoryItem; + public event MoveInventoryItem OnMoveInventoryItem; + public event RemoveInventoryFolder OnRemoveInventoryFolder; + public event RemoveInventoryItem OnRemoveInventoryItem; + public event UDPAssetUploadRequest OnAssetUploadRequest; + public event XferReceive OnXferReceive; + public event RequestXfer OnRequestXfer; + public event ConfirmXfer OnConfirmXfer; + public event AbortXfer OnAbortXfer; + public event RezScript OnRezScript; + public event UpdateTaskInventory OnUpdateTaskInventory; + public event MoveTaskInventory OnMoveTaskItem; + public event RemoveTaskInventory OnRemoveTaskItem; + public event RequestAsset OnRequestAsset; + public event UUIDNameRequest OnNameFromUUIDRequest; + public event ParcelAccessListRequest OnParcelAccessListRequest; + public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; + public event ParcelPropertiesRequest OnParcelPropertiesRequest; + public event ParcelDivideRequest OnParcelDivideRequest; + public event ParcelJoinRequest OnParcelJoinRequest; + public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; + public event ParcelSelectObjects OnParcelSelectObjects; + public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; + public event ParcelAbandonRequest OnParcelAbandonRequest; + public event ParcelGodForceOwner OnParcelGodForceOwner; + public event ParcelReclaim OnParcelReclaim; + public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; + public event ParcelDeedToGroup OnParcelDeedToGroup; + public event RegionInfoRequest OnRegionInfoRequest; + public event EstateCovenantRequest OnEstateCovenantRequest; + public event FriendActionDelegate OnApproveFriendRequest; + public event FriendActionDelegate OnDenyFriendRequest; + public event FriendshipTermination OnTerminateFriendship; + public event MoneyTransferRequest OnMoneyTransferRequest; + public event EconomyDataRequest OnEconomyDataRequest; + public event MoneyBalanceRequest OnMoneyBalanceRequest; + public event UpdateAvatarProperties OnUpdateAvatarProperties; + public event ParcelBuy OnParcelBuy; + public event RequestPayPrice OnRequestPayPrice; + public event ObjectSaleInfo OnObjectSaleInfo; + public event ObjectBuy OnObjectBuy; + public event BuyObjectInventory OnBuyObjectInventory; + public event RequestTerrain OnRequestTerrain; + public event RequestTerrain OnUploadTerrain; + public event ObjectIncludeInSearch OnObjectIncludeInSearch; + public event UUIDNameRequest OnTeleportHomeRequest; + public event ScriptAnswer OnScriptAnswer; + public event AgentSit OnUndo; + public event ForceReleaseControls OnForceReleaseControls; + public event GodLandStatRequest OnLandStatRequest; + public event DetailedEstateDataRequest OnDetailedEstateDataRequest; + public event SetEstateFlagsRequest OnSetEstateFlagsRequest; + public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; + public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture; + public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights; + public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest; + public event SetRegionTerrainSettings OnSetRegionTerrainSettings; + public event EstateRestartSimRequest OnEstateRestartSimRequest; + public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest; + public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest; + public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest; + public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; + public event EstateDebugRegionRequest OnEstateDebugRegionRequest; + public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; + public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; + public event UUIDNameRequest OnUUIDGroupNameRequest; + public event RegionHandleRequest OnRegionHandleRequest; + public event ParcelInfoRequest OnParcelInfoRequest; + public event RequestObjectPropertiesFamily OnObjectGroupRequest; + public event ScriptReset OnScriptReset; + public event GetScriptRunning OnGetScriptRunning; + public event SetScriptRunning OnSetScriptRunning; + public event UpdateVector OnAutoPilotGo; + public event TerrainUnacked OnUnackedTerrain; + public event ActivateGesture OnActivateGesture; + public event DeactivateGesture OnDeactivateGesture; + public event ObjectOwner OnObjectOwner; + public event DirPlacesQuery OnDirPlacesQuery; + public event DirFindQuery OnDirFindQuery; + public event DirLandQuery OnDirLandQuery; + public event DirPopularQuery OnDirPopularQuery; + public event DirClassifiedQuery OnDirClassifiedQuery; + public event EventInfoRequest OnEventInfoRequest; + public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime; + public event MapItemRequest OnMapItemRequest; + public event OfferCallingCard OnOfferCallingCard; + public event AcceptCallingCard OnAcceptCallingCard; + public event DeclineCallingCard OnDeclineCallingCard; + public event SoundTrigger OnSoundTrigger; + public event StartLure OnStartLure; + public event TeleportLureRequest OnTeleportLureRequest; + public event NetworkStats OnNetworkStatsUpdate; + public event ClassifiedInfoRequest OnClassifiedInfoRequest; + public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; + public event ClassifiedDelete OnClassifiedDelete; + public event ClassifiedDelete OnClassifiedGodDelete; + public event EventNotificationAddRequest OnEventNotificationAddRequest; + public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; + public event EventGodDelete OnEventGodDelete; + public event ParcelDwellRequest OnParcelDwellRequest; + public event UserInfoRequest OnUserInfoRequest; + public event UpdateUserInfo OnUpdateUserInfo; + public event RetrieveInstantMessages OnRetrieveInstantMessages; + public event PickDelete OnPickDelete; + public event PickGodDelete OnPickGodDelete; + public event PickInfoUpdate OnPickInfoUpdate; + public event AvatarNotesUpdate OnAvatarNotesUpdate; + public event MuteListRequest OnMuteListRequest; + public event PlacesQuery OnPlacesQuery; + public void SetDebugPacketLevel(int newDebug) + { + throw new System.NotImplementedException(); + } + + public void InPacket(object NewPack) + { + throw new System.NotImplementedException(); + } + + public void ProcessInPacket(Packet NewPack) + { + throw new System.NotImplementedException(); + } + + public void Close(bool ShutdownCircuit) + { + throw new System.NotImplementedException(); + } + + public void Kick(string message) + { + throw new System.NotImplementedException(); + } + + public void Start() + { + throw new System.NotImplementedException(); + } + + public void Stop() + { + throw new System.NotImplementedException(); + } + + public void SendWearables(AvatarWearable[] wearables, int serial) + { + throw new System.NotImplementedException(); + } + + public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) + { + throw new System.NotImplementedException(); + } + + public void SendStartPingCheck(byte seq) + { + throw new System.NotImplementedException(); + } + + public void SendKillObject(ulong regionHandle, uint localID) + { + throw new System.NotImplementedException(); + } + + public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) + { + throw new System.NotImplementedException(); + } + + public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) + { + throw new System.NotImplementedException(); + } + + public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) + { + throw new System.NotImplementedException(); + } + + public void SendInstantMessage(GridInstantMessage im) + { + throw new System.NotImplementedException(); + } + + public void SendGenericMessage(string method, List message) + { + throw new System.NotImplementedException(); + } + + public void SendLayerData(float[] map) + { + throw new System.NotImplementedException(); + } + + public void SendLayerData(int px, int py, float[] map) + { + throw new System.NotImplementedException(); + } + + public void SendWindData(Vector2[] windSpeeds) + { + throw new System.NotImplementedException(); + } + + public void SendCloudData(float[] cloudCover) + { + throw new System.NotImplementedException(); + } + + public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) + { + throw new System.NotImplementedException(); + } + + public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) + { + throw new System.NotImplementedException(); + } + + public AgentCircuitData RequestClientInfo() + { + throw new System.NotImplementedException(); + } + + public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) + { + throw new System.NotImplementedException(); + } + + public void SendMapBlock(List mapBlocks, uint flag) + { + throw new System.NotImplementedException(); + } + + public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) + { + throw new System.NotImplementedException(); + } + + public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) + { + throw new System.NotImplementedException(); + } + + public void SendTeleportFailed(string reason) + { + throw new System.NotImplementedException(); + } + + public void SendTeleportLocationStart() + { + throw new System.NotImplementedException(); + } + + public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) + { + throw new System.NotImplementedException(); + } + + public void SendPayPrice(UUID objectID, int[] payPrice) + { + throw new System.NotImplementedException(); + } + + public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) + { + throw new System.NotImplementedException(); + } + + public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID agentid) + { + throw new System.NotImplementedException(); + } + + public void SendCoarseLocationUpdate(List users, List CoarseLocations) + { + throw new System.NotImplementedException(); + } + + public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) + { + throw new System.NotImplementedException(); + } + + public void SetChildAgentThrottle(byte[] throttle) + { + throw new System.NotImplementedException(); + } + + public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) + { + throw new System.NotImplementedException(); + } + + public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material) + { + throw new System.NotImplementedException(); + } + + public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint) + { + throw new System.NotImplementedException(); + } + + public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, bool fetchFolders, bool fetchItems) + { + throw new System.NotImplementedException(); + } + + public void FlushPrimUpdates() + { + throw new System.NotImplementedException(); + } + + public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) + { + throw new System.NotImplementedException(); + } + + public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) + { + throw new System.NotImplementedException(); + } + + public void SendRemoveInventoryItem(UUID itemID) + { + throw new System.NotImplementedException(); + } + + public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) + { + throw new System.NotImplementedException(); + } + + public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) + { + throw new System.NotImplementedException(); + } + + public void SendBulkUpdateInventory(InventoryNodeBase node) + { + throw new System.NotImplementedException(); + } + + public void SendXferPacket(ulong xferID, uint packet, byte[] data) + { + throw new System.NotImplementedException(); + } + + 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) + { + throw new System.NotImplementedException(); + } + + public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List Data) + { + throw new System.NotImplementedException(); + } + + public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) + { + throw new System.NotImplementedException(); + } + + public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) + { + throw new System.NotImplementedException(); + } + + public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) + { + throw new System.NotImplementedException(); + } + + public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) + { + throw new System.NotImplementedException(); + } + + public void SendAttachedSoundGainChange(UUID objectID, float gain) + { + throw new System.NotImplementedException(); + } + + public void SendNameReply(UUID profileId, string firstname, string lastname) + { + throw new System.NotImplementedException(); + } + + public void SendAlertMessage(string message) + { + throw new System.NotImplementedException(); + } + + public void SendAgentAlertMessage(string message, bool modal) + { + throw new System.NotImplementedException(); + } + + public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) + { + throw new System.NotImplementedException(); + } + + public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) + { + throw new System.NotImplementedException(); + } + + public bool AddMoney(int debit) + { + throw new System.NotImplementedException(); + } + + public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) + { + throw new System.NotImplementedException(); + } + + public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) + { + throw new System.NotImplementedException(); + } + + public void SendViewerTime(int phase) + { + throw new System.NotImplementedException(); + } + + public UUID GetDefaultAnimation(string name) + { + throw new System.NotImplementedException(); + } + + public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) + { + throw new System.NotImplementedException(); + } + + public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) + { + throw new System.NotImplementedException(); + } + + public void SendHealth(float health) + { + throw new System.NotImplementedException(); + } + + public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) + { + throw new System.NotImplementedException(); + } + + public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) + { + throw new System.NotImplementedException(); + } + + public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) + { + throw new System.NotImplementedException(); + } + + public void SendEstateCovenantInformation(UUID covenant) + { + throw new System.NotImplementedException(); + } + + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) + { + throw new System.NotImplementedException(); + } + + public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) + { + throw new System.NotImplementedException(); + } + + public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) + { + throw new System.NotImplementedException(); + } + + public void SendForceClientSelectObjects(List objectIDs) + { + throw new System.NotImplementedException(); + } + + public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) + { + throw new System.NotImplementedException(); + } + + public void SendLandParcelOverlay(byte[] data, int sequence_id) + { + throw new System.NotImplementedException(); + } + + public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) + { + throw new System.NotImplementedException(); + } + + public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) + { + throw new System.NotImplementedException(); + } + + public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) + { + throw new System.NotImplementedException(); + } + + public void SendConfirmXfer(ulong xferID, uint PacketID) + { + throw new System.NotImplementedException(); + } + + public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) + { + throw new System.NotImplementedException(); + } + + public void SendInitiateDownload(string simFileName, string clientFileName) + { + throw new System.NotImplementedException(); + } + + public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) + { + throw new System.NotImplementedException(); + } + + public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) + { + throw new System.NotImplementedException(); + } + + public void SendImageNotFound(UUID imageid) + { + throw new System.NotImplementedException(); + } + + public void SendShutdownConnectionNotice() + { + throw new System.NotImplementedException(); + } + + public void SendSimStats(SimStats stats) + { + throw new System.NotImplementedException(); + } + + public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, UUID LastOwnerID, string ObjectName, string Description) + { + throw new System.NotImplementedException(); + } + + public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice) + { + throw new System.NotImplementedException(); + } + + public void SendAgentOffline(UUID[] agentIDs) + { + throw new System.NotImplementedException(); + } + + public void SendAgentOnline(UUID[] agentIDs) + { + throw new System.NotImplementedException(); + } + + public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) + { + throw new System.NotImplementedException(); + } + + public void SendAdminResponse(UUID Token, uint AdminLevel) + { + throw new System.NotImplementedException(); + } + + public void SendGroupMembership(GroupMembershipData[] GroupMembership) + { + throw new System.NotImplementedException(); + } + + public void SendGroupNameReply(UUID groupLLUID, string GroupName) + { + throw new System.NotImplementedException(); + } + + public void SendJoinGroupReply(UUID groupID, bool success) + { + throw new System.NotImplementedException(); + } + + public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) + { + throw new System.NotImplementedException(); + } + + public void SendLeaveGroupReply(UUID groupID, bool success) + { + throw new System.NotImplementedException(); + } + + public void SendCreateGroupReply(UUID groupID, bool success, string message) + { + throw new System.NotImplementedException(); + } + + public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) + { + throw new System.NotImplementedException(); + } + + public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) + { + throw new System.NotImplementedException(); + } + + public void SendAsset(AssetRequestToClient req) + { + throw new System.NotImplementedException(); + } + + public void SendTexture(AssetBase TextureAsset) + { + throw new System.NotImplementedException(); + } + + public byte[] GetThrottlesPacked(float multiplier) + { + throw new System.NotImplementedException(); + } + + public event ViewerEffectEventHandler OnViewerEffect; + public event Action OnLogout; + public event Action OnConnectionClosed; + public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) + { + throw new System.NotImplementedException(); + } + + public void SendLogoutPacket() + { + throw new System.NotImplementedException(); + } + + public ClientInfo GetClientInfo() + { + throw new System.NotImplementedException(); + } + + public void SetClientInfo(ClientInfo info) + { + throw new System.NotImplementedException(); + } + + public void SetClientOption(string option, string value) + { + throw new System.NotImplementedException(); + } + + public string GetClientOption(string option) + { + throw new System.NotImplementedException(); + } + + public void Terminate() + { + throw new System.NotImplementedException(); + } + + public void SendSetFollowCamProperties(UUID objectID, SortedDictionary parameters) + { + throw new System.NotImplementedException(); + } + + public void SendClearFollowCamProperties(UUID objectID) + { + throw new System.NotImplementedException(); + } + + public void SendRegionHandle(UUID regoinID, ulong handle) + { + throw new System.NotImplementedException(); + } + + public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) + { + throw new System.NotImplementedException(); + } + + public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) + { + throw new System.NotImplementedException(); + } + + public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) + { + throw new System.NotImplementedException(); + } + + public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) + { + throw new System.NotImplementedException(); + } + + public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) + { + throw new System.NotImplementedException(); + } + + public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) + { + throw new System.NotImplementedException(); + } + + public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) + { + throw new System.NotImplementedException(); + } + + public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) + { + throw new System.NotImplementedException(); + } + + public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) + { + throw new System.NotImplementedException(); + } + + public void SendEventInfoReply(EventData info) + { + throw new System.NotImplementedException(); + } + + public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) + { + throw new System.NotImplementedException(); + } + + public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) + { + throw new System.NotImplementedException(); + } + + public void SendOfferCallingCard(UUID srcID, UUID transactionID) + { + throw new System.NotImplementedException(); + } + + public void SendAcceptCallingCard(UUID transactionID) + { + throw new System.NotImplementedException(); + } + + public void SendDeclineCallingCard(UUID transactionID) + { + throw new System.NotImplementedException(); + } + + public void SendTerminateFriend(UUID exFriendID) + { + throw new System.NotImplementedException(); + } + + public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) + { + throw new System.NotImplementedException(); + } + + 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) + { + throw new System.NotImplementedException(); + } + + public void SendAgentDropGroup(UUID groupID) + { + throw new System.NotImplementedException(); + } + + public void RefreshGroupMembership() + { + throw new System.NotImplementedException(); + } + + public void SendAvatarNotesReply(UUID targetID, string text) + { + throw new System.NotImplementedException(); + } + + public void SendAvatarPicksReply(UUID targetID, Dictionary picks) + { + throw new System.NotImplementedException(); + } + + 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) + { + throw new System.NotImplementedException(); + } + + public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds) + { + throw new System.NotImplementedException(); + } + + public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) + { + throw new System.NotImplementedException(); + } + + public void SendUserInfoReply(bool imViaEmail, bool visible, string email) + { + throw new System.NotImplementedException(); + } + + public void SendUseCachedMuteList() + { + throw new System.NotImplementedException(); + } + + public void SendMuteListUpdate(string filename) + { + throw new System.NotImplementedException(); + } + + public void KillEndDone() + { + throw new System.NotImplementedException(); + } + + public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) + { + throw new System.NotImplementedException(); + } + + #endregion + + #region Implementation of IClientIPEndpoint + + public IPAddress EndPoint + { + get { throw new System.NotImplementedException(); } + } + + #endregion + } +} diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs new file mode 100644 index 0000000..4b39b92 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs @@ -0,0 +1,47 @@ +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Sockets; +using System.Text; +using System.Threading; + +namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server +{ + /// + /// Adam's completely hacked up not-probably-compliant RFC1459 server class. + /// + class IRCServer + { + private TcpListener m_listener; + private bool m_running = true; + + public IRCServer(IPAddress listener, int port) + { + m_listener = new TcpListener(listener, port); + + m_listener.Start(50); + + Thread thread = new Thread(ListenLoop); + thread.Start(); + } + + public void Stop() + { + m_running = false; + m_listener.Stop(); + } + + private void ListenLoop() + { + while(m_running) + { + AcceptClient(m_listener.AcceptTcpClient()); + } + } + + private void AcceptClient(TcpClient client) + { + + } + } +} -- cgit v1.1 From 29bc2962adc2b0a297bb2c2eb70b5261d7cafc70 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 30 May 2009 03:53:04 +0000 Subject: * More IRCClientView fiddling. Now implements IClientAPI & IClientCore. --- .../InternetRelayClientView/IRCStackModule.cs | 25 +- .../Server/IRCClientView.cs | 384 ++++++++++++--------- .../InternetRelayClientView/Server/IRCServer.cs | 18 +- 3 files changed, 245 insertions(+), 182 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index c182445..1c23c66 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -1,39 +1,48 @@ -using System; -using System.Collections.Generic; -using System.Text; +using System.Net; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView { class IRCStackModule : IRegionModule { + private IRCServer m_server; + private Scene m_scene; + #region Implementation of IRegionModule public void Initialise(Scene scene, IConfigSource source) { - throw new System.NotImplementedException(); + m_scene = scene; + m_server = new IRCServer(IPAddress.Parse("0.0.0.0"),6666, scene); + m_server.OnNewIRCClient += m_server_OnNewIRCClient; + } + + void m_server_OnNewIRCClient(IRCClientView user) + { + m_scene.AddNewClient(user); } public void PostInitialise() { - throw new System.NotImplementedException(); + } public void Close() { - throw new System.NotImplementedException(); + } public string Name { - get { throw new System.NotImplementedException(); } + get { return "IRCClientStackModule"; } } public bool IsSharedModule { - get { throw new System.NotImplementedException(); } + get { return false; } } #endregion diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 97731ee..c3bc5ad 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -2,8 +2,10 @@ using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using System.Reflection; using System.Text; using System.Threading; +using log4net; using OpenMetaverse; using OpenMetaverse.Packets; using OpenSim.Framework; @@ -12,16 +14,22 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { - class IRCClientView : IClientAPI, IClientCore, IClientIPEndpoint + public class IRCClientView : IClientAPI, IClientCore, IClientIPEndpoint { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private readonly TcpClient m_client; private readonly Scene m_scene; + private UUID m_agentID = UUID.Random(); + private string m_username; private bool m_hasNick = false; private bool m_hasUser = false; + private bool m_connected = true; + public IRCClientView(TcpClient client, Scene scene) { m_client = client; @@ -35,6 +43,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { lock(m_client) { + m_log.Info("[IRCd] Sending >>> " + command); + byte[] buf = Encoding.UTF8.GetBytes(command + "\r\n"); m_client.GetStream().Write(buf, 0, buf.Length); @@ -52,7 +62,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { string strbuf = ""; - while(true) + while(m_connected) { string line; byte[] buf = new byte[520]; // RFC1459 defines max message size as 512. @@ -68,6 +78,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server string message = ExtractMessage(strbuf); if(message != null) { + m_log.Info("[IRCd] Recieving <<< " + message); + // Remove from buffer strbuf = strbuf.Remove(0, message.Length); @@ -124,6 +136,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server break; // Ignore for now. I want to implement authentication later however. case "JOIN": + IRC_SendReplyJoin(); break; case "USER": @@ -271,6 +284,13 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server List users = m_scene.Entities.GetAllByType(); SendCommand("392 RPL_USERSSTART \":UserID Terminal Host\""); + + if (users.Count == 0) + { + SendCommand("395 RPL_NOUSERS \":Nobody logged in\""); + return; + } + foreach (EntityBase user in users) { char[] nom = new char[8]; @@ -358,109 +378,122 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public Vector3 StartPos { - get { throw new System.NotImplementedException(); } - set { throw new System.NotImplementedException(); } + get { return Vector3.Zero; } + set { } } public bool TryGet(out T iface) { - throw new System.NotImplementedException(); + iface = default(T); + return false; } public T Get() { - throw new System.NotImplementedException(); + return default(T); } public UUID AgentId { - get { return UUID.Zero; } + get { return m_agentID; } } public void Disconnect(string reason) { - throw new System.NotImplementedException(); + m_connected = false; + m_client.Close(); } public void Disconnect() { - throw new System.NotImplementedException(); + m_connected = false; + m_client.Close(); } public UUID SessionId { - get { throw new System.NotImplementedException(); } + get { return m_agentID; } } public UUID SecureSessionId { - get { throw new System.NotImplementedException(); } + get { return m_agentID; } } public UUID ActiveGroupId { - get { throw new System.NotImplementedException(); } + get { return UUID.Zero; } } public string ActiveGroupName { - get { throw new System.NotImplementedException(); } + get { return "IRCd User"; } } public ulong ActiveGroupPowers { - get { throw new System.NotImplementedException(); } + get { return 0; } } public ulong GetGroupPowers(UUID groupID) { - throw new System.NotImplementedException(); + return 0; } public bool IsGroupMember(UUID GroupID) { - throw new System.NotImplementedException(); + return false; } public string FirstName { - get { throw new System.NotImplementedException(); } + get + { + string[] names = m_username.Split(' '); + return names[0]; + } } public string LastName { - get { throw new System.NotImplementedException(); } + get + { + string[] names = m_username.Split(' '); + if (names.Length > 1) + return names[1]; + return names[0]; + } } public IScene Scene { - get { throw new System.NotImplementedException(); } + get { return m_scene; } } public int NextAnimationSequenceNumber { - get { throw new System.NotImplementedException(); } + get { return 0; } } public string Name { - get { throw new System.NotImplementedException(); } + get { return m_username; } } public bool IsActive { - get { throw new System.NotImplementedException(); } - set { throw new System.NotImplementedException(); } + get { return true; } + set { if (!value) Disconnect("IsActive Disconnected?"); } } public bool SendLogoutPacketWhenClosing { - set { throw new System.NotImplementedException(); } + set { } } public uint CircuitCode { - get { throw new System.NotImplementedException(); } + get { return 0; } } public event GenericMessage OnGenericMessage; @@ -652,737 +685,744 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event AvatarNotesUpdate OnAvatarNotesUpdate; public event MuteListRequest OnMuteListRequest; public event PlacesQuery OnPlacesQuery; + public void SetDebugPacketLevel(int newDebug) { - throw new System.NotImplementedException(); + } public void InPacket(object NewPack) { - throw new System.NotImplementedException(); + } public void ProcessInPacket(Packet NewPack) { - throw new System.NotImplementedException(); + } public void Close(bool ShutdownCircuit) { - throw new System.NotImplementedException(); + Disconnect(); } public void Kick(string message) { - throw new System.NotImplementedException(); + Disconnect(message); } public void Start() { - throw new System.NotImplementedException(); + } public void Stop() { - throw new System.NotImplementedException(); + Disconnect(); } public void SendWearables(AvatarWearable[] wearables, int serial) { - throw new System.NotImplementedException(); + } public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) { - throw new System.NotImplementedException(); + } public void SendStartPingCheck(byte seq) { - throw new System.NotImplementedException(); + } public void SendKillObject(ulong regionHandle, uint localID) { - throw new System.NotImplementedException(); + } public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) { - throw new System.NotImplementedException(); + } public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) { - throw new System.NotImplementedException(); + } public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) { - throw new System.NotImplementedException(); + IRC_SendChannelPrivmsg(fromName, message); + } + + private void IRC_SendChannelPrivmsg(string fromName, string message) + { + SendCommand(":" + fromName.Replace(" ", "") + " PRIVMSG " + IrcRegionName + " :" + message); } public void SendInstantMessage(GridInstantMessage im) { - throw new System.NotImplementedException(); + // TODO } public void SendGenericMessage(string method, List message) { - throw new System.NotImplementedException(); + } public void SendLayerData(float[] map) { - throw new System.NotImplementedException(); + } public void SendLayerData(int px, int py, float[] map) { - throw new System.NotImplementedException(); + } public void SendWindData(Vector2[] windSpeeds) { - throw new System.NotImplementedException(); + } public void SendCloudData(float[] cloudCover) { - throw new System.NotImplementedException(); + } public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) { - throw new System.NotImplementedException(); + } public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) { - throw new System.NotImplementedException(); + } public AgentCircuitData RequestClientInfo() { - throw new System.NotImplementedException(); + return new AgentCircuitData(); } public void CrossRegion(ulong newRegionHandle, Vector3 pos, Vector3 lookAt, IPEndPoint newRegionExternalEndPoint, string capsURL) { - throw new System.NotImplementedException(); + } public void SendMapBlock(List mapBlocks, uint flag) { - throw new System.NotImplementedException(); + } public void SendLocalTeleport(Vector3 position, Vector3 lookAt, uint flags) { - throw new System.NotImplementedException(); + } public void SendRegionTeleport(ulong regionHandle, byte simAccess, IPEndPoint regionExternalEndPoint, uint locationID, uint flags, string capsURL) { - throw new System.NotImplementedException(); + } public void SendTeleportFailed(string reason) { - throw new System.NotImplementedException(); + } public void SendTeleportLocationStart() { - throw new System.NotImplementedException(); + } public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) { - throw new System.NotImplementedException(); + } public void SendPayPrice(UUID objectID, int[] payPrice) { - throw new System.NotImplementedException(); + } public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) { - throw new System.NotImplementedException(); + } public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID agentid) { - throw new System.NotImplementedException(); + } public void SendCoarseLocationUpdate(List users, List CoarseLocations) { - throw new System.NotImplementedException(); + } public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) { - throw new System.NotImplementedException(); + } public void SetChildAgentThrottle(byte[] throttle) { - throw new System.NotImplementedException(); + } public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) { - throw new System.NotImplementedException(); + } public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material) { - throw new System.NotImplementedException(); + } public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint) { - throw new System.NotImplementedException(); + } public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, bool fetchFolders, bool fetchItems) { - throw new System.NotImplementedException(); + } public void FlushPrimUpdates() { - throw new System.NotImplementedException(); + } public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) { - throw new System.NotImplementedException(); + } public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) { - throw new System.NotImplementedException(); + } public void SendRemoveInventoryItem(UUID itemID) { - throw new System.NotImplementedException(); + } public void SendTakeControls(int controls, bool passToAgent, bool TakeControls) { - throw new System.NotImplementedException(); + } public void SendTaskInventory(UUID taskID, short serial, byte[] fileName) { - throw new System.NotImplementedException(); + } public void SendBulkUpdateInventory(InventoryNodeBase node) { - throw new System.NotImplementedException(); + } public void SendXferPacket(ulong xferID, uint packet, byte[] data) { - throw new System.NotImplementedException(); + } 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) { - throw new System.NotImplementedException(); + } public void SendAvatarPickerReply(AvatarPickerReplyAgentDataArgs AgentData, List Data) { - throw new System.NotImplementedException(); + } public void SendAgentDataUpdate(UUID agentid, UUID activegroupid, string firstname, string lastname, ulong grouppowers, string groupname, string grouptitle) { - throw new System.NotImplementedException(); + } public void SendPreLoadSound(UUID objectID, UUID ownerID, UUID soundID) { - throw new System.NotImplementedException(); + } public void SendPlayAttachedSound(UUID soundID, UUID objectID, UUID ownerID, float gain, byte flags) { - throw new System.NotImplementedException(); + } public void SendTriggeredSound(UUID soundID, UUID ownerID, UUID objectID, UUID parentID, ulong handle, Vector3 position, float gain) { - throw new System.NotImplementedException(); + } public void SendAttachedSoundGainChange(UUID objectID, float gain) { - throw new System.NotImplementedException(); + } public void SendNameReply(UUID profileId, string firstname, string lastname) { - throw new System.NotImplementedException(); + } public void SendAlertMessage(string message) { - throw new System.NotImplementedException(); + IRC_SendChannelPrivmsg("Alert",message); } public void SendAgentAlertMessage(string message, bool modal) { - throw new System.NotImplementedException(); + } public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) { - throw new System.NotImplementedException(); + IRC_SendChannelPrivmsg(objectname,url); } public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) { - throw new System.NotImplementedException(); + } public bool AddMoney(int debit) { - throw new System.NotImplementedException(); + return true; } public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) { - throw new System.NotImplementedException(); + } public void SendViewerEffect(ViewerEffectPacket.EffectBlock[] effectBlocks) { - throw new System.NotImplementedException(); + } public void SendViewerTime(int phase) { - throw new System.NotImplementedException(); + } public UUID GetDefaultAnimation(string name) { - throw new System.NotImplementedException(); + return UUID.Zero; } public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) { - throw new System.NotImplementedException(); + } public void SendScriptQuestion(UUID taskID, string taskName, string ownerName, UUID itemID, int question) { - throw new System.NotImplementedException(); + } public void SendHealth(float health) { - throw new System.NotImplementedException(); + } public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) { - throw new System.NotImplementedException(); + } public void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID) { - throw new System.NotImplementedException(); + } public void SendRegionInfoToEstateMenu(RegionInfoForEstateMenuArgs args) { - throw new System.NotImplementedException(); + } public void SendEstateCovenantInformation(UUID covenant) { - throw new System.NotImplementedException(); + } public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) { - throw new System.NotImplementedException(); + } public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { - throw new System.NotImplementedException(); + } public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) { - throw new System.NotImplementedException(); + } public void SendForceClientSelectObjects(List objectIDs) { - throw new System.NotImplementedException(); + } public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) { - throw new System.NotImplementedException(); + } public void SendLandParcelOverlay(byte[] data, int sequence_id) { - throw new System.NotImplementedException(); + } public void SendParcelMediaCommand(uint flags, ParcelMediaCommandEnum command, float time) { - throw new System.NotImplementedException(); + } public void SendParcelMediaUpdate(string mediaUrl, UUID mediaTextureID, byte autoScale, string mediaType, string mediaDesc, int mediaWidth, int mediaHeight, byte mediaLoop) { - throw new System.NotImplementedException(); + } public void SendAssetUploadCompleteMessage(sbyte AssetType, bool Success, UUID AssetFullID) { - throw new System.NotImplementedException(); + } public void SendConfirmXfer(ulong xferID, uint PacketID) { - throw new System.NotImplementedException(); + } public void SendXferRequest(ulong XferID, short AssetType, UUID vFileID, byte FilePath, byte[] FileName) { - throw new System.NotImplementedException(); + } public void SendInitiateDownload(string simFileName, string clientFileName) { - throw new System.NotImplementedException(); + } public void SendImageFirstPart(ushort numParts, UUID ImageUUID, uint ImageSize, byte[] ImageData, byte imageCodec) { - throw new System.NotImplementedException(); + } public void SendImageNextPart(ushort partNumber, UUID imageUuid, byte[] imageData) { - throw new System.NotImplementedException(); + } public void SendImageNotFound(UUID imageid) { - throw new System.NotImplementedException(); + } public void SendShutdownConnectionNotice() { - throw new System.NotImplementedException(); + // TODO } public void SendSimStats(SimStats stats) { - throw new System.NotImplementedException(); + } public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, UUID LastOwnerID, string ObjectName, string Description) { - throw new System.NotImplementedException(); + } public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice) { - throw new System.NotImplementedException(); + } public void SendAgentOffline(UUID[] agentIDs) { - throw new System.NotImplementedException(); + } public void SendAgentOnline(UUID[] agentIDs) { - throw new System.NotImplementedException(); + } public void SendSitResponse(UUID TargetID, Vector3 OffsetPos, Quaternion SitOrientation, bool autopilot, Vector3 CameraAtOffset, Vector3 CameraEyeOffset, bool ForceMouseLook) { - throw new System.NotImplementedException(); + } public void SendAdminResponse(UUID Token, uint AdminLevel) { - throw new System.NotImplementedException(); + } public void SendGroupMembership(GroupMembershipData[] GroupMembership) { - throw new System.NotImplementedException(); + } public void SendGroupNameReply(UUID groupLLUID, string GroupName) { - throw new System.NotImplementedException(); + } public void SendJoinGroupReply(UUID groupID, bool success) { - throw new System.NotImplementedException(); + } public void SendEjectGroupMemberReply(UUID agentID, UUID groupID, bool success) { - throw new System.NotImplementedException(); + } public void SendLeaveGroupReply(UUID groupID, bool success) { - throw new System.NotImplementedException(); + } public void SendCreateGroupReply(UUID groupID, bool success, string message) { - throw new System.NotImplementedException(); + } public void SendLandStatReply(uint reportType, uint requestFlags, uint resultCount, LandStatReportItem[] lsrpia) { - throw new System.NotImplementedException(); + } public void SendScriptRunningReply(UUID objectID, UUID itemID, bool running) { - throw new System.NotImplementedException(); + } public void SendAsset(AssetRequestToClient req) { - throw new System.NotImplementedException(); + } public void SendTexture(AssetBase TextureAsset) { - throw new System.NotImplementedException(); + } public byte[] GetThrottlesPacked(float multiplier) { - throw new System.NotImplementedException(); + return new byte[0]; } public event ViewerEffectEventHandler OnViewerEffect; public event Action OnLogout; public event Action OnConnectionClosed; + public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) { - throw new System.NotImplementedException(); + IRC_SendChannelPrivmsg(FromAvatarName, Message); } public void SendLogoutPacket() { - throw new System.NotImplementedException(); + Disconnect(); } public ClientInfo GetClientInfo() { - throw new System.NotImplementedException(); + return new ClientInfo(); } public void SetClientInfo(ClientInfo info) { - throw new System.NotImplementedException(); + } public void SetClientOption(string option, string value) { - throw new System.NotImplementedException(); + } public string GetClientOption(string option) { - throw new System.NotImplementedException(); + return String.Empty; } public void Terminate() { - throw new System.NotImplementedException(); + Disconnect(); } public void SendSetFollowCamProperties(UUID objectID, SortedDictionary parameters) { - throw new System.NotImplementedException(); + } public void SendClearFollowCamProperties(UUID objectID) { - throw new System.NotImplementedException(); + } public void SendRegionHandle(UUID regoinID, ulong handle) { - throw new System.NotImplementedException(); + } public void SendParcelInfo(RegionInfo info, LandData land, UUID parcelID, uint x, uint y) { - throw new System.NotImplementedException(); + } public void SendScriptTeleportRequest(string objName, string simName, Vector3 pos, Vector3 lookAt) { - throw new System.NotImplementedException(); + } public void SendDirPlacesReply(UUID queryID, DirPlacesReplyData[] data) { - throw new System.NotImplementedException(); + } public void SendDirPeopleReply(UUID queryID, DirPeopleReplyData[] data) { - throw new System.NotImplementedException(); + } public void SendDirEventsReply(UUID queryID, DirEventsReplyData[] data) { - throw new System.NotImplementedException(); + } public void SendDirGroupsReply(UUID queryID, DirGroupsReplyData[] data) { - throw new System.NotImplementedException(); + } public void SendDirClassifiedReply(UUID queryID, DirClassifiedReplyData[] data) { - throw new System.NotImplementedException(); + } public void SendDirLandReply(UUID queryID, DirLandReplyData[] data) { - throw new System.NotImplementedException(); + } public void SendDirPopularReply(UUID queryID, DirPopularReplyData[] data) { - throw new System.NotImplementedException(); + } public void SendEventInfoReply(EventData info) { - throw new System.NotImplementedException(); + } public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) { - throw new System.NotImplementedException(); + } public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) { - throw new System.NotImplementedException(); + } public void SendOfferCallingCard(UUID srcID, UUID transactionID) { - throw new System.NotImplementedException(); + } public void SendAcceptCallingCard(UUID transactionID) { - throw new System.NotImplementedException(); + } public void SendDeclineCallingCard(UUID transactionID) { - throw new System.NotImplementedException(); + } public void SendTerminateFriend(UUID exFriendID) { - throw new System.NotImplementedException(); + } public void SendAvatarClassifiedReply(UUID targetID, UUID[] classifiedID, string[] name) { - throw new System.NotImplementedException(); + } 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) { - throw new System.NotImplementedException(); + } public void SendAgentDropGroup(UUID groupID) { - throw new System.NotImplementedException(); + } public void RefreshGroupMembership() { - throw new System.NotImplementedException(); + } public void SendAvatarNotesReply(UUID targetID, string text) { - throw new System.NotImplementedException(); + } public void SendAvatarPicksReply(UUID targetID, Dictionary picks) { - throw new System.NotImplementedException(); + } 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) { - throw new System.NotImplementedException(); + } public void SendAvatarClassifiedReply(UUID targetID, Dictionary classifieds) { - throw new System.NotImplementedException(); + } public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) { - throw new System.NotImplementedException(); + } public void SendUserInfoReply(bool imViaEmail, bool visible, string email) { - throw new System.NotImplementedException(); + } public void SendUseCachedMuteList() { - throw new System.NotImplementedException(); + } public void SendMuteListUpdate(string filename) { - throw new System.NotImplementedException(); + } public void KillEndDone() { - throw new System.NotImplementedException(); + } public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) { - throw new System.NotImplementedException(); + return true; } #endregion @@ -1391,7 +1431,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public IPAddress EndPoint { - get { throw new System.NotImplementedException(); } + get { return ((IPEndPoint) m_client.Client.RemoteEndPoint).Address; } } #endregion diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs index 4b39b92..23c213f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs @@ -2,20 +2,30 @@ using System.Collections.Generic; using System.Net; using System.Net.Sockets; +using System.Reflection; using System.Text; using System.Threading; +using log4net; +using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { + public delegate void OnNewIRCUserDelegate(IRCClientView user); + /// /// Adam's completely hacked up not-probably-compliant RFC1459 server class. /// class IRCServer { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + public event OnNewIRCUserDelegate OnNewIRCClient; + private TcpListener m_listener; + private Scene m_baseScene; private bool m_running = true; - public IRCServer(IPAddress listener, int port) + public IRCServer(IPAddress listener, int port, Scene baseScene) { m_listener = new TcpListener(listener, port); @@ -23,6 +33,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server Thread thread = new Thread(ListenLoop); thread.Start(); + m_baseScene = baseScene; } public void Stop() @@ -41,7 +52,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private void AcceptClient(TcpClient client) { - + IRCClientView cv = new IRCClientView(client, m_baseScene); + + if (OnNewIRCClient != null) + OnNewIRCClient(cv); } } } -- cgit v1.1 From 1bb98a1eb0f15da904657bc625b27751314af8dc Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 30 May 2009 04:07:58 +0000 Subject: * More Tweaks --- .../InternetRelayClientView/IRCStackModule.cs | 9 ++++- .../Server/IRCClientView.cs | 40 ++++++++++++++++++---- .../InternetRelayClientView/Server/IRCServer.cs | 4 +-- 3 files changed, 44 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 1c23c66..c807d7f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -1,4 +1,6 @@ using System.Net; +using System.Reflection; +using log4net; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -8,6 +10,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView { class IRCStackModule : IRegionModule { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + private IRCServer m_server; private Scene m_scene; @@ -22,7 +26,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView void m_server_OnNewIRCClient(IRCClientView user) { - m_scene.AddNewClient(user); + m_log.Info("[IRCd] Adding user..."); + m_scene.ClientManager.Add(user.CircuitCode, user); + user.Start(); + m_log.Info("[IRCd] Added user to Scene"); } public void PostInitialise() diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index c3bc5ad..e87749c 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -200,6 +200,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { IRC_SendReplyTopic(); IRC_SendNamesReply(); + IRC_SendChannelPrivmsg("System", "Welcome to Zork^H^H^H OpenSimulator."); + IRC_SendChannelPrivmsg("System", "You are in an open field west of a big white house"); + IRC_SendChannelPrivmsg("System", "with a boarded front door."); } } @@ -400,12 +403,16 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Disconnect(string reason) { + IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")"); + m_connected = false; m_client.Close(); } public void Disconnect() { + IRC_SendChannelPrivmsg("System", "You have been eaten by a grue."); + m_connected = false; m_client.Close(); } @@ -713,7 +720,33 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Start() { - + Scene.AddNewClient(this); + + // Mimicking LLClientView which gets always set appearance from client. + Scene scene = (Scene)Scene; + AvatarAppearance appearance; + scene.GetAvatarAppearance(this, out appearance); + List visualParams = new List(); + foreach (byte visualParam in appearance.VisualParams) + { + visualParams.Add(visualParam); + } + OnSetAppearance(appearance.Texture.GetBytes(), visualParams); + } + + public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) + { + m_log.Info("[MXP ClientStack] Completing Handshake to Region"); + + if (OnRegionHandShakeReply != null) + { + OnRegionHandShakeReply(this); + } + + if (OnCompleteMovementToRegion != null) + { + OnCompleteMovementToRegion(); + } } public void Stop() @@ -746,11 +779,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) - { - - } - public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) { IRC_SendChannelPrivmsg(fromName, message); diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs index 23c213f..b8f5afa 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs @@ -21,8 +21,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event OnNewIRCUserDelegate OnNewIRCClient; - private TcpListener m_listener; - private Scene m_baseScene; + private readonly TcpListener m_listener; + private readonly Scene m_baseScene; private bool m_running = true; public IRCServer(IPAddress listener, int port, Scene baseScene) -- cgit v1.1 From 449e167dce37f49a31564496458a9690c8b1956d Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 30 May 2009 07:02:38 +0000 Subject: * You are likely to be eaten by a grue. * Enable with [IRCd] Enabled=true (will listen on port 6666). --- .../InternetRelayClientView/IRCStackModule.cs | 21 ++- .../Server/IRCClientView.cs | 202 +++++++++++++++------ 2 files changed, 162 insertions(+), 61 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index c807d7f..9e3e1c7 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -8,7 +8,7 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView { - class IRCStackModule : IRegionModule + public class IRCStackModule : IRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -19,16 +19,25 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView public void Initialise(Scene scene, IConfigSource source) { - m_scene = scene; - m_server = new IRCServer(IPAddress.Parse("0.0.0.0"),6666, scene); - m_server.OnNewIRCClient += m_server_OnNewIRCClient; + if (source.Configs.Contains("IRCd") && + source.Configs["IRCd"].GetBoolean("Enabled",false)) + { + m_scene = scene; + m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene); + m_server.OnNewIRCClient += m_server_OnNewIRCClient; + } } void m_server_OnNewIRCClient(IRCClientView user) { + user.OnIRCReady += user_OnIRCReady; + } + + void user_OnIRCReady(IRCClientView cv) + { m_log.Info("[IRCd] Adding user..."); - m_scene.ClientManager.Add(user.CircuitCode, user); - user.Start(); + m_scene.ClientManager.Add(cv.CircuitCode, cv); + cv.Start(); m_log.Info("[IRCd] Added user to Scene"); } diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index e87749c..bb20dfd 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1,5 +1,6 @@ using System; using System.Collections.Generic; +using System.IO; using System.Net; using System.Net.Sockets; using System.Reflection; @@ -14,8 +15,12 @@ using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { + public delegate void OnIRCClientReadyDelegate(IRCClientView cv); + public class IRCClientView : IClientAPI, IClientCore, IClientIPEndpoint { + public event OnIRCClientReadyDelegate OnIRCReady; + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private readonly TcpClient m_client; @@ -24,6 +29,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private UUID m_agentID = UUID.Random(); private string m_username; + private string m_nick; private bool m_hasNick = false; private bool m_hasUser = false; @@ -39,16 +45,23 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server loopThread.Start(); } + private void SendServerCommand(string command) + { + SendCommand(":opensimircd " + command); + } + private void SendCommand(string command) { - lock(m_client) - { - m_log.Info("[IRCd] Sending >>> " + command); + m_log.Info("[IRCd] Sending >>> " + command); - byte[] buf = Encoding.UTF8.GetBytes(command + "\r\n"); + byte[] buf = Encoding.UTF8.GetBytes(command + "\r\n"); - m_client.GetStream().Write(buf, 0, buf.Length); - } + m_client.GetStream().BeginWrite(buf, 0, buf.Length, SendComplete, null); + } + + private void SendComplete(IAsyncResult result) + { + m_log.Info("[IRCd] Send Complete."); } private string IrcRegionName @@ -60,40 +73,67 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private void InternalLoop() { - string strbuf = ""; - - while(m_connected) + try { - string line; - byte[] buf = new byte[520]; // RFC1459 defines max message size as 512. + string strbuf = ""; - lock (m_client) + while (m_connected && m_client.Connected) { + byte[] buf = new byte[8]; // RFC1459 defines max message size as 512. + int count = m_client.GetStream().Read(buf, 0, buf.Length); - line = Encoding.UTF8.GetString(buf, 0, count); - } + string line = Encoding.UTF8.GetString(buf, 0, count); - strbuf += line; + strbuf += line; - string message = ExtractMessage(strbuf); - if(message != null) - { - m_log.Info("[IRCd] Recieving <<< " + message); + string message = ExtractMessage(strbuf); + if (message != null) + { + // Remove from buffer + strbuf = strbuf.Remove(0, message.Length); + + m_log.Info("[IRCd] Recieving <<< " + message); + message = message.Trim(); - // Remove from buffer - strbuf = strbuf.Remove(0, message.Length); + // Extract command sequence + string command = ExtractCommand(message); + ProcessInMessage(message, command); + } + else + { + //m_log.Info("[IRCd] Recieved data, but not enough to make a message. BufLen is " + strbuf.Length + + // "[" + strbuf + "]"); + if (strbuf.Length == 0) + { + m_connected = false; + m_log.Info("[IRCd] Buffer zero, closing..."); + if (OnDisconnectUser != null) + OnDisconnectUser(); + } + } - // Extract command sequence - string command = ExtractCommand(message); - ProcessInMessage(message, command); + Thread.Sleep(0); } + } + catch (IOException) + { + if (OnDisconnectUser != null) + OnDisconnectUser(); + + m_log.Warn("[IRCd] Disconnected client."); + } + catch (SocketException) + { + if (OnDisconnectUser != null) + OnDisconnectUser(); - Thread.Sleep(0); + m_log.Warn("[IRCd] Disconnected client."); } } private void ProcessInMessage(string message, string command) { + m_log.Info("[IRCd] Processing [MSG:" + message + "] [COM:" + command + "]"); if(command != null) { switch(command) @@ -123,12 +163,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server case "SUMMON": case "TIME": case "TRACE": - case "USERHOST": case "VERSION": case "WALLOPS": case "WHOIS": case "WHOWAS": - SendCommand("421 ERR_UNKNOWNCOMMAND \"" + command + " :Command unimplemented\""); + SendServerCommand("421 " + command + " :Command unimplemented"); break; // Connection Commands @@ -141,12 +180,20 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server case "USER": IRC_ProcessUser(message); - IRC_SendReplyJoin(); + IRC_Ready(); + break; + case "USERHOST": + string[] userhostArgs = ExtractParameters(message); + if (userhostArgs[0] == ":" + m_nick) + { + SendServerCommand("302 :" + m_nick + "=+" + m_nick + "@" + + ((IPEndPoint) m_client.Client.RemoteEndPoint).Address); + } break; case "NICK": IRC_ProcessNick(message); - IRC_SendReplyJoin(); + IRC_Ready(); break; case "TOPIC": @@ -164,7 +211,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server break; case "NOTICE": // TODO + break; + case "WHO": // TODO + IRC_SendWhoReply(); break; case "PING": @@ -188,31 +238,55 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server break; default: - SendCommand("421 ERR_UNKNOWNCOMMAND \"" + command + " :Unknown command\""); + SendServerCommand("421 " + command + " :Unknown command"); break; } } } - private void IRC_SendReplyJoin() + private void IRC_Ready() { if (m_hasUser && m_hasNick) { - IRC_SendReplyTopic(); - IRC_SendNamesReply(); - IRC_SendChannelPrivmsg("System", "Welcome to Zork^H^H^H OpenSimulator."); - IRC_SendChannelPrivmsg("System", "You are in an open field west of a big white house"); - IRC_SendChannelPrivmsg("System", "with a boarded front door."); + SendServerCommand("001 " + m_nick + " :Welcome to OpenSimulator IRCd"); + SendServerCommand("002 " + m_nick + " :Running OpenSimVersion"); + SendServerCommand("003 " + m_nick + " :This server was created over 9000 years ago"); + SendServerCommand("004 " + m_nick + " :opensimirc r1 aoOirw abeiIklmnoOpqrstv"); + SendServerCommand("251 " + m_nick + " :There are 0 users and 0 services on 1 servers"); + SendServerCommand("252 " + m_nick + " 0 :operators online"); + SendServerCommand("253 " + m_nick + " 0 :unknown connections"); + SendServerCommand("254 " + m_nick + " 1 :channels formed"); + SendServerCommand("255 " + m_nick + " :I have 1 users, 0 services and 1 servers"); + SendCommand(":" + m_nick + " MODE " + m_nick + " :+i"); + SendCommand(":" + m_nick + " JOIN :" + IrcRegionName); + + // Rename to 'Real Name' + SendCommand(":" + m_nick + " NICK :" + m_username.Replace(" ", "")); + m_nick = m_username.Replace(" ", ""); + + IRC_SendReplyJoin(); + IRC_SendChannelPrivmsg("System", "Welcome to OpenSimulator."); + IRC_SendChannelPrivmsg("System", "You are in a maze of twisty little passages, all alike."); + IRC_SendChannelPrivmsg("System", "It is pitch black. You are likely to be eaten by a grue."); + + if (OnIRCReady != null) + OnIRCReady(this); } } + private void IRC_SendReplyJoin() + { + IRC_SendReplyTopic(); + IRC_SendNamesReply(); + } + private void IRC_ProcessUser(string message) { string[] userArgs = ExtractParameters(message); string username = userArgs[0]; string hostname = userArgs[1]; string servername = userArgs[2]; - string realname = userArgs[3]; + string realname = userArgs[3].Replace(":", ""); m_username = realname; m_hasUser = true; @@ -221,7 +295,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private void IRC_ProcessNick(string message) { string[] nickArgs = ExtractParameters(message); - string nickname = nickArgs[0]; + string nickname = nickArgs[0].Replace(":",""); + m_nick = nickname; m_hasNick = true; } @@ -243,7 +318,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server msg.Sender = this; msg.Channel = 0; msg.From = this.Name; - msg.Message = privmsgArgs[1]; + msg.Message = privmsgArgs[1].Replace(":", ""); msg.Position = Vector3.Zero; msg.Scene = m_scene; msg.SenderObject = null; @@ -265,32 +340,45 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server foreach (EntityBase user in users) { - SendCommand("353 RPL_NAMREPLY \"" + IrcRegionName + " :+" + user.Name.Replace(" ", "")); + SendServerCommand("353 " + IrcRegionName + " :+" + user.Name.Replace(" ", "")); } - SendCommand("366 RPL_ENDOFNAMES \"" + IrcRegionName + " :End of /NAMES list\""); + SendServerCommand("366 " + IrcRegionName + " :End of /NAMES list"); + } + + private void IRC_SendWhoReply() + { + List users = m_scene.Entities.GetAllByType(); + + foreach (EntityBase user in users) + { + //:kubrick.freenode.net 352 toblerone3742 #freenode i=nalioth freenode/staff/ubuntu.member.nalioth irc.freenode.net nalioth G :0 http://www.ubuntu.com/donations + //:opensimircd 352 #OpenSim-Test AdamFrisbyIRC nohost.com irc.opensimulator AdamFrisbyIRC H+ :1 Adam FrisbyIRC + SendServerCommand("352 " + user.Name.Replace(" ", "") + " " + IrcRegionName + " nohost.com irc.opensimulator " + user.Name.Replace(" ", "") + " H+ " + ":1 " + user.Name); + } + SendServerCommand("315 " + IrcRegionName + " :End of /WHO list"); } private void IRC_SendMOTD() { - SendCommand("375 RPL_MOTDSTART \":- OpenSimulator Message of the day -"); - SendCommand("372 RPL_MOTD \":- Hiya!"); - SendCommand("376 RPL_ENDOFMOTD \":End of /MOTD command\""); + SendServerCommand("375 :- OpenSimulator Message of the day -"); + SendServerCommand("372 :- Hiya!"); + SendServerCommand("376 :End of /MOTD command"); } private void IRC_SendReplyTopic() { - SendCommand("332 RPL_TOPIC \"" + IrcRegionName + " :OpenSimulator IRC Server\""); + SendServerCommand("332 " + IrcRegionName + " :OpenSimulator IRC Server"); } private void IRC_SendReplyUsers() { List users = m_scene.Entities.GetAllByType(); - - SendCommand("392 RPL_USERSSTART \":UserID Terminal Host\""); + + SendServerCommand("392 :UserID Terminal Host"); if (users.Count == 0) { - SendCommand("395 RPL_NOUSERS \":Nobody logged in\""); + SendServerCommand("395 :Nobody logged in"); return; } @@ -309,10 +397,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server nom[i] = ' '; } - SendCommand("393 RPL_USERS \":" + nom + " " + term + " " + host + "\""); + SendServerCommand("393 :" + nom + " " + term + " " + host + ""); } - SendCommand("394 RPL_ENDOFUSERS \":End of users\""); + SendServerCommand("394 :End of users"); } private static string ExtractMessage(string buffer) @@ -322,7 +410,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server if (pos == -1) return null; - string command = buffer.Substring(0, pos + 1); + string command = buffer.Substring(0, pos + 2); return command; } @@ -331,8 +419,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { string[] msgs = msg.Split(' '); - if(msgs.Length < 2) + if (msgs.Length < 2) + { + m_log.Warn("[IRCd] Dropped msg: " + msg); return null; + } if (msgs[0].StartsWith(":")) return msgs[1]; @@ -500,7 +591,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public uint CircuitCode { - get { return 0; } + get { return (uint)Util.RandomClass.Next(0,int.MaxValue); } } public event GenericMessage OnGenericMessage; @@ -736,7 +827,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) { - m_log.Info("[MXP ClientStack] Completing Handshake to Region"); + m_log.Info("[IRCd ClientStack] Completing Handshake to Region"); if (OnRegionHandShakeReply != null) { @@ -781,7 +872,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) { - IRC_SendChannelPrivmsg(fromName, message); + if (audible > 0) + IRC_SendChannelPrivmsg(fromName, message); } private void IRC_SendChannelPrivmsg(string fromName, string message) -- cgit v1.1 From e70910c3e3a281ff42e886a55f0627aab1c2725f Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sat, 30 May 2009 09:37:11 +0000 Subject: * Tweaks to /WHO listings. --- .../Server/IRCClientView.cs | 32 ++++++++++++++++------ 1 file changed, 23 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index bb20dfd..eb70b71 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -150,7 +150,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server case "KILL": case "LINKS": case "LUSERS": - case "MODE": case "OPER": case "PART": case "REHASH": @@ -178,6 +177,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server IRC_SendReplyJoin(); break; + case "MODE": + IRC_SendReplyModeChannel(); + break; + case "USER": IRC_ProcessUser(message); IRC_Ready(); @@ -214,6 +217,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server break; case "WHO": // TODO + IRC_SendNamesReply(); IRC_SendWhoReply(); break; @@ -280,6 +284,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server IRC_SendNamesReply(); } + private void IRC_SendReplyModeChannel() + { + SendServerCommand("324 " + m_nick + " " + IrcRegionName + " +n"); + //SendCommand(":" + IrcRegionName + " MODE +n"); + } + private void IRC_ProcessUser(string message) { string[] userArgs = ExtractParameters(message); @@ -323,7 +333,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server msg.Scene = m_scene; msg.SenderObject = null; msg.SenderUUID = this.AgentId; - msg.Type = ChatTypeEnum.Broadcast; + msg.Type = ChatTypeEnum.Say; OnChatFromClient(this, msg); } @@ -340,7 +350,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server foreach (EntityBase user in users) { - SendServerCommand("353 " + IrcRegionName + " :+" + user.Name.Replace(" ", "")); + SendServerCommand("353 " + m_nick + " = " + IrcRegionName + " :" + user.Name.Replace(" ", "")); } SendServerCommand("366 " + IrcRegionName + " :End of /NAMES list"); } @@ -351,11 +361,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server foreach (EntityBase user in users) { - //:kubrick.freenode.net 352 toblerone3742 #freenode i=nalioth freenode/staff/ubuntu.member.nalioth irc.freenode.net nalioth G :0 http://www.ubuntu.com/donations - //:opensimircd 352 #OpenSim-Test AdamFrisbyIRC nohost.com irc.opensimulator AdamFrisbyIRC H+ :1 Adam FrisbyIRC - SendServerCommand("352 " + user.Name.Replace(" ", "") + " " + IrcRegionName + " nohost.com irc.opensimulator " + user.Name.Replace(" ", "") + " H+ " + ":1 " + user.Name); + /*SendServerCommand(String.Format("352 {0} {1} {2} {3} {4} {5} :0 {6}", IrcRegionName, + user.Name.Replace(" ", ""), "nohost.com", "opensimircd", + user.Name.Replace(" ", ""), 'H', user.Name));*/ + + SendServerCommand("352 " + m_nick + " " + IrcRegionName + " n=" + user.Name.Replace(" ", "") + " fakehost.com " + user.Name.Replace(" ", "") + " H " + ":0 " + user.Name); + + //SendServerCommand("352 " + IrcRegionName + " " + user.Name.Replace(" ", "") + " nohost.com irc.opensimulator " + user.Name.Replace(" ", "") + " H " + ":0 " + user.Name); } - SendServerCommand("315 " + IrcRegionName + " :End of /WHO list"); + SendServerCommand("315 " + m_nick + " " + IrcRegionName + " :End of /WHO list"); } private void IRC_SendMOTD() @@ -472,7 +486,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public Vector3 StartPos { - get { return Vector3.Zero; } + get { return new Vector3(128, 128, 50); } set { } } @@ -872,7 +886,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) { - if (audible > 0) + if (audible > 0 && message.Length > 0) IRC_SendChannelPrivmsg(fromName, message); } -- cgit v1.1 From 07a94fdf89e88e88513c61f7f67544e49ddcd9eb Mon Sep 17 00:00:00 2001 From: Mike Mazur Date: Sun, 31 May 2009 11:50:42 +0000 Subject: Fix IRCd init check for config section The IRCStackModule used Nini.Config.ConfigCollection.Contains() to determine whether the "IRCd" section was present in the config. This ConfigCollection, however, stores an ArrayList of IConfig objects, not strings, so calling Contains("IRCd") always returns false since "IRCd" is a string, not an IConfig object. --- .../OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 9e3e1c7..5c8bfc6 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -8,7 +8,7 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView { - public class IRCStackModule : IRegionModule + public class IRCStackModule : IRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -19,7 +19,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView public void Initialise(Scene scene, IConfigSource source) { - if (source.Configs.Contains("IRCd") && + if (null != source.Configs["IRCd"] && source.Configs["IRCd"].GetBoolean("Enabled",false)) { m_scene = scene; @@ -48,7 +48,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView public void Close() { - + } public string Name -- cgit v1.1 From db2c4ab94cc40bf16910806fd4fe0d9a2b7cbd8f Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 31 May 2009 16:26:18 +0000 Subject: Update svn properties. --- .../InternetRelayClientView/IRCStackModule.cs | 132 +- .../Server/IRCClientView.cs | 3146 ++++++++++---------- .../InternetRelayClientView/Server/IRCServer.cs | 122 +- 3 files changed, 1700 insertions(+), 1700 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 5c8bfc6..808f1f9 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -1,66 +1,66 @@ -using System.Net; -using System.Reflection; -using log4net; -using Nini.Config; -using OpenSim.Region.Framework.Interfaces; -using OpenSim.Region.Framework.Scenes; -using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; - -namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView -{ - public class IRCStackModule : IRegionModule - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private IRCServer m_server; - private Scene m_scene; - - #region Implementation of IRegionModule - - public void Initialise(Scene scene, IConfigSource source) - { - if (null != source.Configs["IRCd"] && - source.Configs["IRCd"].GetBoolean("Enabled",false)) - { - m_scene = scene; - m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene); - m_server.OnNewIRCClient += m_server_OnNewIRCClient; - } - } - - void m_server_OnNewIRCClient(IRCClientView user) - { - user.OnIRCReady += user_OnIRCReady; - } - - void user_OnIRCReady(IRCClientView cv) - { - m_log.Info("[IRCd] Adding user..."); - m_scene.ClientManager.Add(cv.CircuitCode, cv); - cv.Start(); - m_log.Info("[IRCd] Added user to Scene"); - } - - public void PostInitialise() - { - - } - - public void Close() - { - - } - - public string Name - { - get { return "IRCClientStackModule"; } - } - - public bool IsSharedModule - { - get { return false; } - } - - #endregion - } -} +using System.Net; +using System.Reflection; +using log4net; +using Nini.Config; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; +using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; + +namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView +{ + public class IRCStackModule : IRegionModule + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private IRCServer m_server; + private Scene m_scene; + + #region Implementation of IRegionModule + + public void Initialise(Scene scene, IConfigSource source) + { + if (null != source.Configs["IRCd"] && + source.Configs["IRCd"].GetBoolean("Enabled",false)) + { + m_scene = scene; + m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene); + m_server.OnNewIRCClient += m_server_OnNewIRCClient; + } + } + + void m_server_OnNewIRCClient(IRCClientView user) + { + user.OnIRCReady += user_OnIRCReady; + } + + void user_OnIRCReady(IRCClientView cv) + { + m_log.Info("[IRCd] Adding user..."); + m_scene.ClientManager.Add(cv.CircuitCode, cv); + cv.Start(); + m_log.Info("[IRCd] Added user to Scene"); + } + + public void PostInitialise() + { + + } + + public void Close() + { + + } + + public string Name + { + get { return "IRCClientStackModule"; } + } + + public bool IsSharedModule + { + get { return false; } + } + + #endregion + } +} diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index eb70b71..e3d1b59 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1,1573 +1,1573 @@ -using System; -using System.Collections.Generic; -using System.IO; -using System.Net; -using System.Net.Sockets; -using System.Reflection; -using System.Text; -using System.Threading; -using log4net; -using OpenMetaverse; -using OpenMetaverse.Packets; -using OpenSim.Framework; -using OpenSim.Framework.Client; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server -{ - public delegate void OnIRCClientReadyDelegate(IRCClientView cv); - - public class IRCClientView : IClientAPI, IClientCore, IClientIPEndpoint - { - public event OnIRCClientReadyDelegate OnIRCReady; - - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - private readonly TcpClient m_client; - private readonly Scene m_scene; - - private UUID m_agentID = UUID.Random(); - - private string m_username; - private string m_nick; - - private bool m_hasNick = false; - private bool m_hasUser = false; - - private bool m_connected = true; - - public IRCClientView(TcpClient client, Scene scene) - { - m_client = client; - m_scene = scene; - - Thread loopThread = new Thread(InternalLoop); - loopThread.Start(); - } - - private void SendServerCommand(string command) - { - SendCommand(":opensimircd " + command); - } - - private void SendCommand(string command) - { - m_log.Info("[IRCd] Sending >>> " + command); - - byte[] buf = Encoding.UTF8.GetBytes(command + "\r\n"); - - m_client.GetStream().BeginWrite(buf, 0, buf.Length, SendComplete, null); - } - - private void SendComplete(IAsyncResult result) - { - m_log.Info("[IRCd] Send Complete."); - } - - private string IrcRegionName - { - // I know &Channel is more technically correct, but people are used to seeing #Channel - // Dont shoot me! - get { return "#" + m_scene.RegionInfo.RegionName.Replace(" ", "-"); } - } - - private void InternalLoop() - { - try - { - string strbuf = ""; - - while (m_connected && m_client.Connected) - { - byte[] buf = new byte[8]; // RFC1459 defines max message size as 512. - - int count = m_client.GetStream().Read(buf, 0, buf.Length); - string line = Encoding.UTF8.GetString(buf, 0, count); - - strbuf += line; - - string message = ExtractMessage(strbuf); - if (message != null) - { - // Remove from buffer - strbuf = strbuf.Remove(0, message.Length); - - m_log.Info("[IRCd] Recieving <<< " + message); - message = message.Trim(); - - // Extract command sequence - string command = ExtractCommand(message); - ProcessInMessage(message, command); - } - else - { - //m_log.Info("[IRCd] Recieved data, but not enough to make a message. BufLen is " + strbuf.Length + - // "[" + strbuf + "]"); - if (strbuf.Length == 0) - { - m_connected = false; - m_log.Info("[IRCd] Buffer zero, closing..."); - if (OnDisconnectUser != null) - OnDisconnectUser(); - } - } - - Thread.Sleep(0); - } - } - catch (IOException) - { - if (OnDisconnectUser != null) - OnDisconnectUser(); - - m_log.Warn("[IRCd] Disconnected client."); - } - catch (SocketException) - { - if (OnDisconnectUser != null) - OnDisconnectUser(); - - m_log.Warn("[IRCd] Disconnected client."); - } - } - - private void ProcessInMessage(string message, string command) - { - m_log.Info("[IRCd] Processing [MSG:" + message + "] [COM:" + command + "]"); - if(command != null) - { - switch(command) - { - case "ADMIN": - case "AWAY": - case "CONNECT": - case "DIE": - case "ERROR": - case "INFO": - case "INVITE": - case "ISON": - case "KICK": - case "KILL": - case "LINKS": - case "LUSERS": - case "OPER": - case "PART": - case "REHASH": - case "SERVICE": - case "SERVLIST": - case "SERVER": - case "SQUERY": - case "SQUIT": - case "STATS": - case "SUMMON": - case "TIME": - case "TRACE": - case "VERSION": - case "WALLOPS": - case "WHOIS": - case "WHOWAS": - SendServerCommand("421 " + command + " :Command unimplemented"); - break; - - // Connection Commands - case "PASS": - break; // Ignore for now. I want to implement authentication later however. - - case "JOIN": - IRC_SendReplyJoin(); - break; - - case "MODE": - IRC_SendReplyModeChannel(); - break; - - case "USER": - IRC_ProcessUser(message); - IRC_Ready(); - break; - - case "USERHOST": - string[] userhostArgs = ExtractParameters(message); - if (userhostArgs[0] == ":" + m_nick) - { - SendServerCommand("302 :" + m_nick + "=+" + m_nick + "@" + - ((IPEndPoint) m_client.Client.RemoteEndPoint).Address); - } - break; - case "NICK": - IRC_ProcessNick(message); - IRC_Ready(); - - break; - case "TOPIC": - IRC_SendReplyTopic(); - break; - case "USERS": - IRC_SendReplyUsers(); - break; - - case "LIST": - break; // TODO - - case "MOTD": - IRC_SendMOTD(); - break; - - case "NOTICE": // TODO - break; - - case "WHO": // TODO - IRC_SendNamesReply(); - IRC_SendWhoReply(); - break; - - case "PING": - IRC_ProcessPing(message); - break; - - // Special case, ignore this completely. - case "PONG": - break; - - case "QUIT": - if (OnDisconnectUser != null) - OnDisconnectUser(); - break; - - case "NAMES": - IRC_SendNamesReply(); - break; - case "PRIVMSG": - IRC_ProcessPrivmsg(message); - break; - - default: - SendServerCommand("421 " + command + " :Unknown command"); - break; - } - } - } - - private void IRC_Ready() - { - if (m_hasUser && m_hasNick) - { - SendServerCommand("001 " + m_nick + " :Welcome to OpenSimulator IRCd"); - SendServerCommand("002 " + m_nick + " :Running OpenSimVersion"); - SendServerCommand("003 " + m_nick + " :This server was created over 9000 years ago"); - SendServerCommand("004 " + m_nick + " :opensimirc r1 aoOirw abeiIklmnoOpqrstv"); - SendServerCommand("251 " + m_nick + " :There are 0 users and 0 services on 1 servers"); - SendServerCommand("252 " + m_nick + " 0 :operators online"); - SendServerCommand("253 " + m_nick + " 0 :unknown connections"); - SendServerCommand("254 " + m_nick + " 1 :channels formed"); - SendServerCommand("255 " + m_nick + " :I have 1 users, 0 services and 1 servers"); - SendCommand(":" + m_nick + " MODE " + m_nick + " :+i"); - SendCommand(":" + m_nick + " JOIN :" + IrcRegionName); - - // Rename to 'Real Name' - SendCommand(":" + m_nick + " NICK :" + m_username.Replace(" ", "")); - m_nick = m_username.Replace(" ", ""); - - IRC_SendReplyJoin(); - IRC_SendChannelPrivmsg("System", "Welcome to OpenSimulator."); - IRC_SendChannelPrivmsg("System", "You are in a maze of twisty little passages, all alike."); - IRC_SendChannelPrivmsg("System", "It is pitch black. You are likely to be eaten by a grue."); - - if (OnIRCReady != null) - OnIRCReady(this); - } - } - - private void IRC_SendReplyJoin() - { - IRC_SendReplyTopic(); - IRC_SendNamesReply(); - } - - private void IRC_SendReplyModeChannel() - { - SendServerCommand("324 " + m_nick + " " + IrcRegionName + " +n"); - //SendCommand(":" + IrcRegionName + " MODE +n"); - } - - private void IRC_ProcessUser(string message) - { - string[] userArgs = ExtractParameters(message); - string username = userArgs[0]; - string hostname = userArgs[1]; - string servername = userArgs[2]; - string realname = userArgs[3].Replace(":", ""); - - m_username = realname; - m_hasUser = true; - } - - private void IRC_ProcessNick(string message) - { - string[] nickArgs = ExtractParameters(message); - string nickname = nickArgs[0].Replace(":",""); - m_nick = nickname; - m_hasNick = true; - } - - private void IRC_ProcessPing(string message) - { - string[] pingArgs = ExtractParameters(message); - string pingHost = pingArgs[0]; - SendCommand("PONG " + pingHost); - } - - private void IRC_ProcessPrivmsg(string message) - { - string[] privmsgArgs = ExtractParameters(message); - if (privmsgArgs[0] == IrcRegionName) - { - if (OnChatFromClient != null) - { - OSChatMessage msg = new OSChatMessage(); - msg.Sender = this; - msg.Channel = 0; - msg.From = this.Name; - msg.Message = privmsgArgs[1].Replace(":", ""); - msg.Position = Vector3.Zero; - msg.Scene = m_scene; - msg.SenderObject = null; - msg.SenderUUID = this.AgentId; - msg.Type = ChatTypeEnum.Say; - - OnChatFromClient(this, msg); - } - } - else - { - // Handle as an IM, later. - } - } - - private void IRC_SendNamesReply() - { - List users = m_scene.Entities.GetAllByType(); - - foreach (EntityBase user in users) - { - SendServerCommand("353 " + m_nick + " = " + IrcRegionName + " :" + user.Name.Replace(" ", "")); - } - SendServerCommand("366 " + IrcRegionName + " :End of /NAMES list"); - } - - private void IRC_SendWhoReply() - { - List users = m_scene.Entities.GetAllByType(); - - foreach (EntityBase user in users) - { - /*SendServerCommand(String.Format("352 {0} {1} {2} {3} {4} {5} :0 {6}", IrcRegionName, - user.Name.Replace(" ", ""), "nohost.com", "opensimircd", - user.Name.Replace(" ", ""), 'H', user.Name));*/ - - SendServerCommand("352 " + m_nick + " " + IrcRegionName + " n=" + user.Name.Replace(" ", "") + " fakehost.com " + user.Name.Replace(" ", "") + " H " + ":0 " + user.Name); - - //SendServerCommand("352 " + IrcRegionName + " " + user.Name.Replace(" ", "") + " nohost.com irc.opensimulator " + user.Name.Replace(" ", "") + " H " + ":0 " + user.Name); - } - SendServerCommand("315 " + m_nick + " " + IrcRegionName + " :End of /WHO list"); - } - - private void IRC_SendMOTD() - { - SendServerCommand("375 :- OpenSimulator Message of the day -"); - SendServerCommand("372 :- Hiya!"); - SendServerCommand("376 :End of /MOTD command"); - } - - private void IRC_SendReplyTopic() - { - SendServerCommand("332 " + IrcRegionName + " :OpenSimulator IRC Server"); - } - - private void IRC_SendReplyUsers() - { - List users = m_scene.Entities.GetAllByType(); - - SendServerCommand("392 :UserID Terminal Host"); - - if (users.Count == 0) - { - SendServerCommand("395 :Nobody logged in"); - return; - } - - foreach (EntityBase user in users) - { - char[] nom = new char[8]; - char[] term = "terminal_".ToCharArray(); - char[] host = "hostname".ToCharArray(); - - string userName = user.Name.Replace(" ",""); - for (int i = 0; i < nom.Length; i++) - { - if (userName.Length < i) - nom[i] = userName[i]; - else - nom[i] = ' '; - } - - SendServerCommand("393 :" + nom + " " + term + " " + host + ""); - } - - SendServerCommand("394 :End of users"); - } - - private static string ExtractMessage(string buffer) - { - int pos = buffer.IndexOf("\r\n"); - - if (pos == -1) - return null; - - string command = buffer.Substring(0, pos + 2); - - return command; - } - - private static string ExtractCommand(string msg) - { - string[] msgs = msg.Split(' '); - - if (msgs.Length < 2) - { - m_log.Warn("[IRCd] Dropped msg: " + msg); - return null; - } - - if (msgs[0].StartsWith(":")) - return msgs[1]; - - return msgs[0]; - } - - private static string[] ExtractParameters(string msg) - { - string[] msgs = msg.Split(' '); - List parms = new List(msgs.Length); - - bool foundCommand = false; - string command = ExtractCommand(msg); - - - for(int i=0;i tmp = new List(); - for(int j=i;j(out T iface) - { - iface = default(T); - return false; - } - - public T Get() - { - return default(T); - } - - public UUID AgentId - { - get { return m_agentID; } - } - - public void Disconnect(string reason) - { - IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")"); - - m_connected = false; - m_client.Close(); - } - - public void Disconnect() - { - IRC_SendChannelPrivmsg("System", "You have been eaten by a grue."); - - m_connected = false; - m_client.Close(); - } - - public UUID SessionId - { - get { return m_agentID; } - } - - public UUID SecureSessionId - { - get { return m_agentID; } - } - - public UUID ActiveGroupId - { - get { return UUID.Zero; } - } - - public string ActiveGroupName - { - get { return "IRCd User"; } - } - - public ulong ActiveGroupPowers - { - get { return 0; } - } - - public ulong GetGroupPowers(UUID groupID) - { - return 0; - } - - public bool IsGroupMember(UUID GroupID) - { - return false; - } - - public string FirstName - { - get - { - string[] names = m_username.Split(' '); - return names[0]; - } - } - - public string LastName - { - get - { - string[] names = m_username.Split(' '); - if (names.Length > 1) - return names[1]; - return names[0]; - } - } - - public IScene Scene - { - get { return m_scene; } - } - - public int NextAnimationSequenceNumber - { - get { return 0; } - } - - public string Name - { - get { return m_username; } - } - - public bool IsActive - { - get { return true; } - set { if (!value) Disconnect("IsActive Disconnected?"); } - } - - public bool SendLogoutPacketWhenClosing - { - set { } - } - - public uint CircuitCode - { - get { return (uint)Util.RandomClass.Next(0,int.MaxValue); } - } - - public event GenericMessage OnGenericMessage; - public event ImprovedInstantMessage OnInstantMessage; - public event ChatMessage OnChatFromClient; - public event TextureRequest OnRequestTexture; - public event RezObject OnRezObject; - public event ModifyTerrain OnModifyTerrain; - public event BakeTerrain OnBakeTerrain; - public event EstateChangeInfo OnEstateChangeInfo; - public event SetAppearance OnSetAppearance; - public event AvatarNowWearing OnAvatarNowWearing; - public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; - public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv; - public event UUIDNameRequest OnDetachAttachmentIntoInv; - public event ObjectAttach OnObjectAttach; - public event ObjectDeselect OnObjectDetach; - public event ObjectDrop OnObjectDrop; - public event StartAnim OnStartAnim; - public event StopAnim OnStopAnim; - public event LinkObjects OnLinkObjects; - public event DelinkObjects OnDelinkObjects; - public event RequestMapBlocks OnRequestMapBlocks; - public event RequestMapName OnMapNameRequest; - public event TeleportLocationRequest OnTeleportLocationRequest; - public event DisconnectUser OnDisconnectUser; - public event RequestAvatarProperties OnRequestAvatarProperties; - public event SetAlwaysRun OnSetAlwaysRun; - public event TeleportLandmarkRequest OnTeleportLandmarkRequest; - public event DeRezObject OnDeRezObject; - public event Action OnRegionHandShakeReply; - public event GenericCall2 OnRequestWearables; - public event GenericCall2 OnCompleteMovementToRegion; - public event UpdateAgent OnAgentUpdate; - public event AgentRequestSit OnAgentRequestSit; - public event AgentSit OnAgentSit; - public event AvatarPickerRequest OnAvatarPickerRequest; - public event Action OnRequestAvatarsData; - public event AddNewPrim OnAddPrim; - public event FetchInventory OnAgentDataUpdateRequest; - public event TeleportLocationRequest OnSetStartLocationRequest; - public event RequestGodlikePowers OnRequestGodlikePowers; - public event GodKickUser OnGodKickUser; - public event ObjectDuplicate OnObjectDuplicate; - public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; - public event GrabObject OnGrabObject; - public event ObjectSelect OnDeGrabObject; - public event MoveObject OnGrabUpdate; - public event SpinStart OnSpinStart; - public event SpinObject OnSpinUpdate; - public event SpinStop OnSpinStop; - public event UpdateShape OnUpdatePrimShape; - public event ObjectExtraParams OnUpdateExtraParams; - public event ObjectSelect OnObjectSelect; - public event ObjectDeselect OnObjectDeselect; - public event GenericCall7 OnObjectDescription; - public event GenericCall7 OnObjectName; - public event GenericCall7 OnObjectClickAction; - public event GenericCall7 OnObjectMaterial; - public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; - public event UpdatePrimFlags OnUpdatePrimFlags; - public event UpdatePrimTexture OnUpdatePrimTexture; - public event UpdateVector OnUpdatePrimGroupPosition; - public event UpdateVector OnUpdatePrimSinglePosition; - public event UpdatePrimRotation OnUpdatePrimGroupRotation; - public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; - public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; - public event UpdateVector OnUpdatePrimScale; - public event UpdateVector OnUpdatePrimGroupScale; - public event StatusChange OnChildAgentStatus; - public event GenericCall2 OnStopMovement; - public event Action OnRemoveAvatar; - public event ObjectPermissions OnObjectPermissions; - public event CreateNewInventoryItem OnCreateNewInventoryItem; - public event CreateInventoryFolder OnCreateNewInventoryFolder; - public event UpdateInventoryFolder OnUpdateInventoryFolder; - public event MoveInventoryFolder OnMoveInventoryFolder; - public event FetchInventoryDescendents OnFetchInventoryDescendents; - public event PurgeInventoryDescendents OnPurgeInventoryDescendents; - public event FetchInventory OnFetchInventory; - public event RequestTaskInventory OnRequestTaskInventory; - public event UpdateInventoryItem OnUpdateInventoryItem; - public event CopyInventoryItem OnCopyInventoryItem; - public event MoveInventoryItem OnMoveInventoryItem; - public event RemoveInventoryFolder OnRemoveInventoryFolder; - public event RemoveInventoryItem OnRemoveInventoryItem; - public event UDPAssetUploadRequest OnAssetUploadRequest; - public event XferReceive OnXferReceive; - public event RequestXfer OnRequestXfer; - public event ConfirmXfer OnConfirmXfer; - public event AbortXfer OnAbortXfer; - public event RezScript OnRezScript; - public event UpdateTaskInventory OnUpdateTaskInventory; - public event MoveTaskInventory OnMoveTaskItem; - public event RemoveTaskInventory OnRemoveTaskItem; - public event RequestAsset OnRequestAsset; - public event UUIDNameRequest OnNameFromUUIDRequest; - public event ParcelAccessListRequest OnParcelAccessListRequest; - public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; - public event ParcelPropertiesRequest OnParcelPropertiesRequest; - public event ParcelDivideRequest OnParcelDivideRequest; - public event ParcelJoinRequest OnParcelJoinRequest; - public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; - public event ParcelSelectObjects OnParcelSelectObjects; - public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; - public event ParcelAbandonRequest OnParcelAbandonRequest; - public event ParcelGodForceOwner OnParcelGodForceOwner; - public event ParcelReclaim OnParcelReclaim; - public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; - public event ParcelDeedToGroup OnParcelDeedToGroup; - public event RegionInfoRequest OnRegionInfoRequest; - public event EstateCovenantRequest OnEstateCovenantRequest; - public event FriendActionDelegate OnApproveFriendRequest; - public event FriendActionDelegate OnDenyFriendRequest; - public event FriendshipTermination OnTerminateFriendship; - public event MoneyTransferRequest OnMoneyTransferRequest; - public event EconomyDataRequest OnEconomyDataRequest; - public event MoneyBalanceRequest OnMoneyBalanceRequest; - public event UpdateAvatarProperties OnUpdateAvatarProperties; - public event ParcelBuy OnParcelBuy; - public event RequestPayPrice OnRequestPayPrice; - public event ObjectSaleInfo OnObjectSaleInfo; - public event ObjectBuy OnObjectBuy; - public event BuyObjectInventory OnBuyObjectInventory; - public event RequestTerrain OnRequestTerrain; - public event RequestTerrain OnUploadTerrain; - public event ObjectIncludeInSearch OnObjectIncludeInSearch; - public event UUIDNameRequest OnTeleportHomeRequest; - public event ScriptAnswer OnScriptAnswer; - public event AgentSit OnUndo; - public event ForceReleaseControls OnForceReleaseControls; - public event GodLandStatRequest OnLandStatRequest; - public event DetailedEstateDataRequest OnDetailedEstateDataRequest; - public event SetEstateFlagsRequest OnSetEstateFlagsRequest; - public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; - public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture; - public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights; - public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest; - public event SetRegionTerrainSettings OnSetRegionTerrainSettings; - public event EstateRestartSimRequest OnEstateRestartSimRequest; - public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest; - public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest; - public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest; - public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; - public event EstateDebugRegionRequest OnEstateDebugRegionRequest; - public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; - public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; - public event UUIDNameRequest OnUUIDGroupNameRequest; - public event RegionHandleRequest OnRegionHandleRequest; - public event ParcelInfoRequest OnParcelInfoRequest; - public event RequestObjectPropertiesFamily OnObjectGroupRequest; - public event ScriptReset OnScriptReset; - public event GetScriptRunning OnGetScriptRunning; - public event SetScriptRunning OnSetScriptRunning; - public event UpdateVector OnAutoPilotGo; - public event TerrainUnacked OnUnackedTerrain; - public event ActivateGesture OnActivateGesture; - public event DeactivateGesture OnDeactivateGesture; - public event ObjectOwner OnObjectOwner; - public event DirPlacesQuery OnDirPlacesQuery; - public event DirFindQuery OnDirFindQuery; - public event DirLandQuery OnDirLandQuery; - public event DirPopularQuery OnDirPopularQuery; - public event DirClassifiedQuery OnDirClassifiedQuery; - public event EventInfoRequest OnEventInfoRequest; - public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime; - public event MapItemRequest OnMapItemRequest; - public event OfferCallingCard OnOfferCallingCard; - public event AcceptCallingCard OnAcceptCallingCard; - public event DeclineCallingCard OnDeclineCallingCard; - public event SoundTrigger OnSoundTrigger; - public event StartLure OnStartLure; - public event TeleportLureRequest OnTeleportLureRequest; - public event NetworkStats OnNetworkStatsUpdate; - public event ClassifiedInfoRequest OnClassifiedInfoRequest; - public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; - public event ClassifiedDelete OnClassifiedDelete; - public event ClassifiedDelete OnClassifiedGodDelete; - public event EventNotificationAddRequest OnEventNotificationAddRequest; - public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; - public event EventGodDelete OnEventGodDelete; - public event ParcelDwellRequest OnParcelDwellRequest; - public event UserInfoRequest OnUserInfoRequest; - public event UpdateUserInfo OnUpdateUserInfo; - public event RetrieveInstantMessages OnRetrieveInstantMessages; - public event PickDelete OnPickDelete; - public event PickGodDelete OnPickGodDelete; - public event PickInfoUpdate OnPickInfoUpdate; - public event AvatarNotesUpdate OnAvatarNotesUpdate; - public event MuteListRequest OnMuteListRequest; - public event PlacesQuery OnPlacesQuery; - - public void SetDebugPacketLevel(int newDebug) - { - - } - - public void InPacket(object NewPack) - { - - } - - public void ProcessInPacket(Packet NewPack) - { - - } - - public void Close(bool ShutdownCircuit) - { - Disconnect(); - } - - public void Kick(string message) - { - Disconnect(message); - } - - public void Start() - { - Scene.AddNewClient(this); - - // Mimicking LLClientView which gets always set appearance from client. - Scene scene = (Scene)Scene; - AvatarAppearance appearance; - scene.GetAvatarAppearance(this, out appearance); - List visualParams = new List(); - foreach (byte visualParam in appearance.VisualParams) - { - visualParams.Add(visualParam); - } - OnSetAppearance(appearance.Texture.GetBytes(), visualParams); - } - - public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) - { - m_log.Info("[IRCd ClientStack] Completing Handshake to Region"); - - if (OnRegionHandShakeReply != null) - { - OnRegionHandShakeReply(this); - } - - if (OnCompleteMovementToRegion != null) - { - OnCompleteMovementToRegion(); - } - } - - public void Stop() - { - Disconnect(); - } - - public void SendWearables(AvatarWearable[] wearables, int serial) - { - - } - - public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) - { - - } - - public void SendStartPingCheck(byte seq) - { - - } - - public void SendKillObject(ulong regionHandle, uint localID) - { - - } - - public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) - { - - } - - public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) - { - if (audible > 0 && message.Length > 0) - IRC_SendChannelPrivmsg(fromName, message); - } - - private void IRC_SendChannelPrivmsg(string fromName, string message) - { - SendCommand(":" + fromName.Replace(" ", "") + " PRIVMSG " + IrcRegionName + " :" + message); - } - - public void SendInstantMessage(GridInstantMessage im) - { - // TODO - } - - public void SendGenericMessage(string method, List message) - { - - } - - public void SendLayerData(float[] map) - { - - } - - public void SendLayerData(int px, int py, float[] map) - { - - } - - public void SendWindData(Vector2[] windSpeeds) - { - - } - - public void SendCloudData(float[] cloudCover) - { - - } - - public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) - { - - } - - public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) - { - - } - - public AgentCircuitData RequestClientInfo() - { - return new AgentCircuitData(); - } - - 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 SendTeleportLocationStart() - { - - } - - public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) - { - - } - - public void SendPayPrice(UUID objectID, int[] payPrice) - { - - } - - public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) - { - - } - - public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID agentid) - { - - } - - public void SendCoarseLocationUpdate(List users, List CoarseLocations) - { - - } - - public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) - { - - } - - public void SetChildAgentThrottle(byte[] throttle) - { - - } - - public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) - { - - } - - public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material) - { - - } - - public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint) - { - - } - - public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, bool fetchFolders, bool fetchItems) - { - - } - - public void FlushPrimUpdates() - { - - } - - public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) - { - - } - - public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) - { - - } - - 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) - { - - } - - 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) - { - IRC_SendChannelPrivmsg("Alert",message); - } - - public void SendAgentAlertMessage(string message, bool modal) - { - - } - - public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) - { - IRC_SendChannelPrivmsg(objectname,url); - } - - public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) - { - - } - - public bool AddMoney(int debit) - { - return true; - } - - 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 UUID GetDefaultAnimation(string name) - { - return UUID.Zero; - } - - public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, 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 SendEstateManagersList(UUID invoice, UUID[] EstateManagers, 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, string abuseEmail, UUID estateOwner) - { - - } - - public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) - { - - } - - public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) - { - - } - - public void SendForceClientSelectObjects(List objectIDs) - { - - } - - 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() - { - // TODO - } - - public void SendSimStats(SimStats stats) - { - - } - - public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, UUID LastOwnerID, string ObjectName, string Description) - { - - } - - public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice) - { - - } - - public void SendAgentOffline(UUID[] agentIDs) - { - - } - - public void SendAgentOnline(UUID[] agentIDs) - { - - } - - 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 byte[] GetThrottlesPacked(float multiplier) - { - return new byte[0]; - } - - public event ViewerEffectEventHandler OnViewerEffect; - public event Action OnLogout; - public event Action OnConnectionClosed; - - public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) - { - IRC_SendChannelPrivmsg(FromAvatarName, Message); - } - - public void SendLogoutPacket() - { - Disconnect(); - } - - public ClientInfo GetClientInfo() - { - return new ClientInfo(); - } - - public void SetClientInfo(ClientInfo info) - { - - } - - public void SetClientOption(string option, string value) - { - - } - - public string GetClientOption(string option) - { - return String.Empty; - } - - public void Terminate() - { - Disconnect(); - } - - 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 SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) - { - - } - - public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) - { - - } - - 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 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 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 void KillEndDone() - { - - } - - public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) - { - return true; - } - - #endregion - - #region Implementation of IClientIPEndpoint - - public IPAddress EndPoint - { - get { return ((IPEndPoint) m_client.Client.RemoteEndPoint).Address; } - } - - #endregion - } -} +using System; +using System.Collections.Generic; +using System.IO; +using System.Net; +using System.Net.Sockets; +using System.Reflection; +using System.Text; +using System.Threading; +using log4net; +using OpenMetaverse; +using OpenMetaverse.Packets; +using OpenSim.Framework; +using OpenSim.Framework.Client; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server +{ + public delegate void OnIRCClientReadyDelegate(IRCClientView cv); + + public class IRCClientView : IClientAPI, IClientCore, IClientIPEndpoint + { + public event OnIRCClientReadyDelegate OnIRCReady; + + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + private readonly TcpClient m_client; + private readonly Scene m_scene; + + private UUID m_agentID = UUID.Random(); + + private string m_username; + private string m_nick; + + private bool m_hasNick = false; + private bool m_hasUser = false; + + private bool m_connected = true; + + public IRCClientView(TcpClient client, Scene scene) + { + m_client = client; + m_scene = scene; + + Thread loopThread = new Thread(InternalLoop); + loopThread.Start(); + } + + private void SendServerCommand(string command) + { + SendCommand(":opensimircd " + command); + } + + private void SendCommand(string command) + { + m_log.Info("[IRCd] Sending >>> " + command); + + byte[] buf = Encoding.UTF8.GetBytes(command + "\r\n"); + + m_client.GetStream().BeginWrite(buf, 0, buf.Length, SendComplete, null); + } + + private void SendComplete(IAsyncResult result) + { + m_log.Info("[IRCd] Send Complete."); + } + + private string IrcRegionName + { + // I know &Channel is more technically correct, but people are used to seeing #Channel + // Dont shoot me! + get { return "#" + m_scene.RegionInfo.RegionName.Replace(" ", "-"); } + } + + private void InternalLoop() + { + try + { + string strbuf = ""; + + while (m_connected && m_client.Connected) + { + byte[] buf = new byte[8]; // RFC1459 defines max message size as 512. + + int count = m_client.GetStream().Read(buf, 0, buf.Length); + string line = Encoding.UTF8.GetString(buf, 0, count); + + strbuf += line; + + string message = ExtractMessage(strbuf); + if (message != null) + { + // Remove from buffer + strbuf = strbuf.Remove(0, message.Length); + + m_log.Info("[IRCd] Recieving <<< " + message); + message = message.Trim(); + + // Extract command sequence + string command = ExtractCommand(message); + ProcessInMessage(message, command); + } + else + { + //m_log.Info("[IRCd] Recieved data, but not enough to make a message. BufLen is " + strbuf.Length + + // "[" + strbuf + "]"); + if (strbuf.Length == 0) + { + m_connected = false; + m_log.Info("[IRCd] Buffer zero, closing..."); + if (OnDisconnectUser != null) + OnDisconnectUser(); + } + } + + Thread.Sleep(0); + } + } + catch (IOException) + { + if (OnDisconnectUser != null) + OnDisconnectUser(); + + m_log.Warn("[IRCd] Disconnected client."); + } + catch (SocketException) + { + if (OnDisconnectUser != null) + OnDisconnectUser(); + + m_log.Warn("[IRCd] Disconnected client."); + } + } + + private void ProcessInMessage(string message, string command) + { + m_log.Info("[IRCd] Processing [MSG:" + message + "] [COM:" + command + "]"); + if(command != null) + { + switch(command) + { + case "ADMIN": + case "AWAY": + case "CONNECT": + case "DIE": + case "ERROR": + case "INFO": + case "INVITE": + case "ISON": + case "KICK": + case "KILL": + case "LINKS": + case "LUSERS": + case "OPER": + case "PART": + case "REHASH": + case "SERVICE": + case "SERVLIST": + case "SERVER": + case "SQUERY": + case "SQUIT": + case "STATS": + case "SUMMON": + case "TIME": + case "TRACE": + case "VERSION": + case "WALLOPS": + case "WHOIS": + case "WHOWAS": + SendServerCommand("421 " + command + " :Command unimplemented"); + break; + + // Connection Commands + case "PASS": + break; // Ignore for now. I want to implement authentication later however. + + case "JOIN": + IRC_SendReplyJoin(); + break; + + case "MODE": + IRC_SendReplyModeChannel(); + break; + + case "USER": + IRC_ProcessUser(message); + IRC_Ready(); + break; + + case "USERHOST": + string[] userhostArgs = ExtractParameters(message); + if (userhostArgs[0] == ":" + m_nick) + { + SendServerCommand("302 :" + m_nick + "=+" + m_nick + "@" + + ((IPEndPoint) m_client.Client.RemoteEndPoint).Address); + } + break; + case "NICK": + IRC_ProcessNick(message); + IRC_Ready(); + + break; + case "TOPIC": + IRC_SendReplyTopic(); + break; + case "USERS": + IRC_SendReplyUsers(); + break; + + case "LIST": + break; // TODO + + case "MOTD": + IRC_SendMOTD(); + break; + + case "NOTICE": // TODO + break; + + case "WHO": // TODO + IRC_SendNamesReply(); + IRC_SendWhoReply(); + break; + + case "PING": + IRC_ProcessPing(message); + break; + + // Special case, ignore this completely. + case "PONG": + break; + + case "QUIT": + if (OnDisconnectUser != null) + OnDisconnectUser(); + break; + + case "NAMES": + IRC_SendNamesReply(); + break; + case "PRIVMSG": + IRC_ProcessPrivmsg(message); + break; + + default: + SendServerCommand("421 " + command + " :Unknown command"); + break; + } + } + } + + private void IRC_Ready() + { + if (m_hasUser && m_hasNick) + { + SendServerCommand("001 " + m_nick + " :Welcome to OpenSimulator IRCd"); + SendServerCommand("002 " + m_nick + " :Running OpenSimVersion"); + SendServerCommand("003 " + m_nick + " :This server was created over 9000 years ago"); + SendServerCommand("004 " + m_nick + " :opensimirc r1 aoOirw abeiIklmnoOpqrstv"); + SendServerCommand("251 " + m_nick + " :There are 0 users and 0 services on 1 servers"); + SendServerCommand("252 " + m_nick + " 0 :operators online"); + SendServerCommand("253 " + m_nick + " 0 :unknown connections"); + SendServerCommand("254 " + m_nick + " 1 :channels formed"); + SendServerCommand("255 " + m_nick + " :I have 1 users, 0 services and 1 servers"); + SendCommand(":" + m_nick + " MODE " + m_nick + " :+i"); + SendCommand(":" + m_nick + " JOIN :" + IrcRegionName); + + // Rename to 'Real Name' + SendCommand(":" + m_nick + " NICK :" + m_username.Replace(" ", "")); + m_nick = m_username.Replace(" ", ""); + + IRC_SendReplyJoin(); + IRC_SendChannelPrivmsg("System", "Welcome to OpenSimulator."); + IRC_SendChannelPrivmsg("System", "You are in a maze of twisty little passages, all alike."); + IRC_SendChannelPrivmsg("System", "It is pitch black. You are likely to be eaten by a grue."); + + if (OnIRCReady != null) + OnIRCReady(this); + } + } + + private void IRC_SendReplyJoin() + { + IRC_SendReplyTopic(); + IRC_SendNamesReply(); + } + + private void IRC_SendReplyModeChannel() + { + SendServerCommand("324 " + m_nick + " " + IrcRegionName + " +n"); + //SendCommand(":" + IrcRegionName + " MODE +n"); + } + + private void IRC_ProcessUser(string message) + { + string[] userArgs = ExtractParameters(message); + string username = userArgs[0]; + string hostname = userArgs[1]; + string servername = userArgs[2]; + string realname = userArgs[3].Replace(":", ""); + + m_username = realname; + m_hasUser = true; + } + + private void IRC_ProcessNick(string message) + { + string[] nickArgs = ExtractParameters(message); + string nickname = nickArgs[0].Replace(":",""); + m_nick = nickname; + m_hasNick = true; + } + + private void IRC_ProcessPing(string message) + { + string[] pingArgs = ExtractParameters(message); + string pingHost = pingArgs[0]; + SendCommand("PONG " + pingHost); + } + + private void IRC_ProcessPrivmsg(string message) + { + string[] privmsgArgs = ExtractParameters(message); + if (privmsgArgs[0] == IrcRegionName) + { + if (OnChatFromClient != null) + { + OSChatMessage msg = new OSChatMessage(); + msg.Sender = this; + msg.Channel = 0; + msg.From = this.Name; + msg.Message = privmsgArgs[1].Replace(":", ""); + msg.Position = Vector3.Zero; + msg.Scene = m_scene; + msg.SenderObject = null; + msg.SenderUUID = this.AgentId; + msg.Type = ChatTypeEnum.Say; + + OnChatFromClient(this, msg); + } + } + else + { + // Handle as an IM, later. + } + } + + private void IRC_SendNamesReply() + { + List users = m_scene.Entities.GetAllByType(); + + foreach (EntityBase user in users) + { + SendServerCommand("353 " + m_nick + " = " + IrcRegionName + " :" + user.Name.Replace(" ", "")); + } + SendServerCommand("366 " + IrcRegionName + " :End of /NAMES list"); + } + + private void IRC_SendWhoReply() + { + List users = m_scene.Entities.GetAllByType(); + + foreach (EntityBase user in users) + { + /*SendServerCommand(String.Format("352 {0} {1} {2} {3} {4} {5} :0 {6}", IrcRegionName, + user.Name.Replace(" ", ""), "nohost.com", "opensimircd", + user.Name.Replace(" ", ""), 'H', user.Name));*/ + + SendServerCommand("352 " + m_nick + " " + IrcRegionName + " n=" + user.Name.Replace(" ", "") + " fakehost.com " + user.Name.Replace(" ", "") + " H " + ":0 " + user.Name); + + //SendServerCommand("352 " + IrcRegionName + " " + user.Name.Replace(" ", "") + " nohost.com irc.opensimulator " + user.Name.Replace(" ", "") + " H " + ":0 " + user.Name); + } + SendServerCommand("315 " + m_nick + " " + IrcRegionName + " :End of /WHO list"); + } + + private void IRC_SendMOTD() + { + SendServerCommand("375 :- OpenSimulator Message of the day -"); + SendServerCommand("372 :- Hiya!"); + SendServerCommand("376 :End of /MOTD command"); + } + + private void IRC_SendReplyTopic() + { + SendServerCommand("332 " + IrcRegionName + " :OpenSimulator IRC Server"); + } + + private void IRC_SendReplyUsers() + { + List users = m_scene.Entities.GetAllByType(); + + SendServerCommand("392 :UserID Terminal Host"); + + if (users.Count == 0) + { + SendServerCommand("395 :Nobody logged in"); + return; + } + + foreach (EntityBase user in users) + { + char[] nom = new char[8]; + char[] term = "terminal_".ToCharArray(); + char[] host = "hostname".ToCharArray(); + + string userName = user.Name.Replace(" ",""); + for (int i = 0; i < nom.Length; i++) + { + if (userName.Length < i) + nom[i] = userName[i]; + else + nom[i] = ' '; + } + + SendServerCommand("393 :" + nom + " " + term + " " + host + ""); + } + + SendServerCommand("394 :End of users"); + } + + private static string ExtractMessage(string buffer) + { + int pos = buffer.IndexOf("\r\n"); + + if (pos == -1) + return null; + + string command = buffer.Substring(0, pos + 2); + + return command; + } + + private static string ExtractCommand(string msg) + { + string[] msgs = msg.Split(' '); + + if (msgs.Length < 2) + { + m_log.Warn("[IRCd] Dropped msg: " + msg); + return null; + } + + if (msgs[0].StartsWith(":")) + return msgs[1]; + + return msgs[0]; + } + + private static string[] ExtractParameters(string msg) + { + string[] msgs = msg.Split(' '); + List parms = new List(msgs.Length); + + bool foundCommand = false; + string command = ExtractCommand(msg); + + + for(int i=0;i tmp = new List(); + for(int j=i;j(out T iface) + { + iface = default(T); + return false; + } + + public T Get() + { + return default(T); + } + + public UUID AgentId + { + get { return m_agentID; } + } + + public void Disconnect(string reason) + { + IRC_SendChannelPrivmsg("System", "You have been eaten by a grue. (" + reason + ")"); + + m_connected = false; + m_client.Close(); + } + + public void Disconnect() + { + IRC_SendChannelPrivmsg("System", "You have been eaten by a grue."); + + m_connected = false; + m_client.Close(); + } + + public UUID SessionId + { + get { return m_agentID; } + } + + public UUID SecureSessionId + { + get { return m_agentID; } + } + + public UUID ActiveGroupId + { + get { return UUID.Zero; } + } + + public string ActiveGroupName + { + get { return "IRCd User"; } + } + + public ulong ActiveGroupPowers + { + get { return 0; } + } + + public ulong GetGroupPowers(UUID groupID) + { + return 0; + } + + public bool IsGroupMember(UUID GroupID) + { + return false; + } + + public string FirstName + { + get + { + string[] names = m_username.Split(' '); + return names[0]; + } + } + + public string LastName + { + get + { + string[] names = m_username.Split(' '); + if (names.Length > 1) + return names[1]; + return names[0]; + } + } + + public IScene Scene + { + get { return m_scene; } + } + + public int NextAnimationSequenceNumber + { + get { return 0; } + } + + public string Name + { + get { return m_username; } + } + + public bool IsActive + { + get { return true; } + set { if (!value) Disconnect("IsActive Disconnected?"); } + } + + public bool SendLogoutPacketWhenClosing + { + set { } + } + + public uint CircuitCode + { + get { return (uint)Util.RandomClass.Next(0,int.MaxValue); } + } + + public event GenericMessage OnGenericMessage; + public event ImprovedInstantMessage OnInstantMessage; + public event ChatMessage OnChatFromClient; + public event TextureRequest OnRequestTexture; + public event RezObject OnRezObject; + public event ModifyTerrain OnModifyTerrain; + public event BakeTerrain OnBakeTerrain; + public event EstateChangeInfo OnEstateChangeInfo; + public event SetAppearance OnSetAppearance; + public event AvatarNowWearing OnAvatarNowWearing; + public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; + public event RezMultipleAttachmentsFromInv OnRezMultipleAttachmentsFromInv; + public event UUIDNameRequest OnDetachAttachmentIntoInv; + public event ObjectAttach OnObjectAttach; + public event ObjectDeselect OnObjectDetach; + public event ObjectDrop OnObjectDrop; + public event StartAnim OnStartAnim; + public event StopAnim OnStopAnim; + public event LinkObjects OnLinkObjects; + public event DelinkObjects OnDelinkObjects; + public event RequestMapBlocks OnRequestMapBlocks; + public event RequestMapName OnMapNameRequest; + public event TeleportLocationRequest OnTeleportLocationRequest; + public event DisconnectUser OnDisconnectUser; + public event RequestAvatarProperties OnRequestAvatarProperties; + public event SetAlwaysRun OnSetAlwaysRun; + public event TeleportLandmarkRequest OnTeleportLandmarkRequest; + public event DeRezObject OnDeRezObject; + public event Action OnRegionHandShakeReply; + public event GenericCall2 OnRequestWearables; + public event GenericCall2 OnCompleteMovementToRegion; + public event UpdateAgent OnAgentUpdate; + public event AgentRequestSit OnAgentRequestSit; + public event AgentSit OnAgentSit; + public event AvatarPickerRequest OnAvatarPickerRequest; + public event Action OnRequestAvatarsData; + public event AddNewPrim OnAddPrim; + public event FetchInventory OnAgentDataUpdateRequest; + public event TeleportLocationRequest OnSetStartLocationRequest; + public event RequestGodlikePowers OnRequestGodlikePowers; + public event GodKickUser OnGodKickUser; + public event ObjectDuplicate OnObjectDuplicate; + public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; + public event GrabObject OnGrabObject; + public event ObjectSelect OnDeGrabObject; + public event MoveObject OnGrabUpdate; + public event SpinStart OnSpinStart; + public event SpinObject OnSpinUpdate; + public event SpinStop OnSpinStop; + public event UpdateShape OnUpdatePrimShape; + public event ObjectExtraParams OnUpdateExtraParams; + public event ObjectSelect OnObjectSelect; + public event ObjectDeselect OnObjectDeselect; + public event GenericCall7 OnObjectDescription; + public event GenericCall7 OnObjectName; + public event GenericCall7 OnObjectClickAction; + public event GenericCall7 OnObjectMaterial; + public event RequestObjectPropertiesFamily OnRequestObjectPropertiesFamily; + public event UpdatePrimFlags OnUpdatePrimFlags; + public event UpdatePrimTexture OnUpdatePrimTexture; + public event UpdateVector OnUpdatePrimGroupPosition; + public event UpdateVector OnUpdatePrimSinglePosition; + public event UpdatePrimRotation OnUpdatePrimGroupRotation; + public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; + public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; + public event UpdateVector OnUpdatePrimScale; + public event UpdateVector OnUpdatePrimGroupScale; + public event StatusChange OnChildAgentStatus; + public event GenericCall2 OnStopMovement; + public event Action OnRemoveAvatar; + public event ObjectPermissions OnObjectPermissions; + public event CreateNewInventoryItem OnCreateNewInventoryItem; + public event CreateInventoryFolder OnCreateNewInventoryFolder; + public event UpdateInventoryFolder OnUpdateInventoryFolder; + public event MoveInventoryFolder OnMoveInventoryFolder; + public event FetchInventoryDescendents OnFetchInventoryDescendents; + public event PurgeInventoryDescendents OnPurgeInventoryDescendents; + public event FetchInventory OnFetchInventory; + public event RequestTaskInventory OnRequestTaskInventory; + public event UpdateInventoryItem OnUpdateInventoryItem; + public event CopyInventoryItem OnCopyInventoryItem; + public event MoveInventoryItem OnMoveInventoryItem; + public event RemoveInventoryFolder OnRemoveInventoryFolder; + public event RemoveInventoryItem OnRemoveInventoryItem; + public event UDPAssetUploadRequest OnAssetUploadRequest; + public event XferReceive OnXferReceive; + public event RequestXfer OnRequestXfer; + public event ConfirmXfer OnConfirmXfer; + public event AbortXfer OnAbortXfer; + public event RezScript OnRezScript; + public event UpdateTaskInventory OnUpdateTaskInventory; + public event MoveTaskInventory OnMoveTaskItem; + public event RemoveTaskInventory OnRemoveTaskItem; + public event RequestAsset OnRequestAsset; + public event UUIDNameRequest OnNameFromUUIDRequest; + public event ParcelAccessListRequest OnParcelAccessListRequest; + public event ParcelAccessListUpdateRequest OnParcelAccessListUpdateRequest; + public event ParcelPropertiesRequest OnParcelPropertiesRequest; + public event ParcelDivideRequest OnParcelDivideRequest; + public event ParcelJoinRequest OnParcelJoinRequest; + public event ParcelPropertiesUpdateRequest OnParcelPropertiesUpdateRequest; + public event ParcelSelectObjects OnParcelSelectObjects; + public event ParcelObjectOwnerRequest OnParcelObjectOwnerRequest; + public event ParcelAbandonRequest OnParcelAbandonRequest; + public event ParcelGodForceOwner OnParcelGodForceOwner; + public event ParcelReclaim OnParcelReclaim; + public event ParcelReturnObjectsRequest OnParcelReturnObjectsRequest; + public event ParcelDeedToGroup OnParcelDeedToGroup; + public event RegionInfoRequest OnRegionInfoRequest; + public event EstateCovenantRequest OnEstateCovenantRequest; + public event FriendActionDelegate OnApproveFriendRequest; + public event FriendActionDelegate OnDenyFriendRequest; + public event FriendshipTermination OnTerminateFriendship; + public event MoneyTransferRequest OnMoneyTransferRequest; + public event EconomyDataRequest OnEconomyDataRequest; + public event MoneyBalanceRequest OnMoneyBalanceRequest; + public event UpdateAvatarProperties OnUpdateAvatarProperties; + public event ParcelBuy OnParcelBuy; + public event RequestPayPrice OnRequestPayPrice; + public event ObjectSaleInfo OnObjectSaleInfo; + public event ObjectBuy OnObjectBuy; + public event BuyObjectInventory OnBuyObjectInventory; + public event RequestTerrain OnRequestTerrain; + public event RequestTerrain OnUploadTerrain; + public event ObjectIncludeInSearch OnObjectIncludeInSearch; + public event UUIDNameRequest OnTeleportHomeRequest; + public event ScriptAnswer OnScriptAnswer; + public event AgentSit OnUndo; + public event ForceReleaseControls OnForceReleaseControls; + public event GodLandStatRequest OnLandStatRequest; + public event DetailedEstateDataRequest OnDetailedEstateDataRequest; + public event SetEstateFlagsRequest OnSetEstateFlagsRequest; + public event SetEstateTerrainBaseTexture OnSetEstateTerrainBaseTexture; + public event SetEstateTerrainDetailTexture OnSetEstateTerrainDetailTexture; + public event SetEstateTerrainTextureHeights OnSetEstateTerrainTextureHeights; + public event CommitEstateTerrainTextureRequest OnCommitEstateTerrainTextureRequest; + public event SetRegionTerrainSettings OnSetRegionTerrainSettings; + public event EstateRestartSimRequest OnEstateRestartSimRequest; + public event EstateChangeCovenantRequest OnEstateChangeCovenantRequest; + public event UpdateEstateAccessDeltaRequest OnUpdateEstateAccessDeltaRequest; + public event SimulatorBlueBoxMessageRequest OnSimulatorBlueBoxMessageRequest; + public event EstateBlueBoxMessageRequest OnEstateBlueBoxMessageRequest; + public event EstateDebugRegionRequest OnEstateDebugRegionRequest; + public event EstateTeleportOneUserHomeRequest OnEstateTeleportOneUserHomeRequest; + public event EstateTeleportAllUsersHomeRequest OnEstateTeleportAllUsersHomeRequest; + public event UUIDNameRequest OnUUIDGroupNameRequest; + public event RegionHandleRequest OnRegionHandleRequest; + public event ParcelInfoRequest OnParcelInfoRequest; + public event RequestObjectPropertiesFamily OnObjectGroupRequest; + public event ScriptReset OnScriptReset; + public event GetScriptRunning OnGetScriptRunning; + public event SetScriptRunning OnSetScriptRunning; + public event UpdateVector OnAutoPilotGo; + public event TerrainUnacked OnUnackedTerrain; + public event ActivateGesture OnActivateGesture; + public event DeactivateGesture OnDeactivateGesture; + public event ObjectOwner OnObjectOwner; + public event DirPlacesQuery OnDirPlacesQuery; + public event DirFindQuery OnDirFindQuery; + public event DirLandQuery OnDirLandQuery; + public event DirPopularQuery OnDirPopularQuery; + public event DirClassifiedQuery OnDirClassifiedQuery; + public event EventInfoRequest OnEventInfoRequest; + public event ParcelSetOtherCleanTime OnParcelSetOtherCleanTime; + public event MapItemRequest OnMapItemRequest; + public event OfferCallingCard OnOfferCallingCard; + public event AcceptCallingCard OnAcceptCallingCard; + public event DeclineCallingCard OnDeclineCallingCard; + public event SoundTrigger OnSoundTrigger; + public event StartLure OnStartLure; + public event TeleportLureRequest OnTeleportLureRequest; + public event NetworkStats OnNetworkStatsUpdate; + public event ClassifiedInfoRequest OnClassifiedInfoRequest; + public event ClassifiedInfoUpdate OnClassifiedInfoUpdate; + public event ClassifiedDelete OnClassifiedDelete; + public event ClassifiedDelete OnClassifiedGodDelete; + public event EventNotificationAddRequest OnEventNotificationAddRequest; + public event EventNotificationRemoveRequest OnEventNotificationRemoveRequest; + public event EventGodDelete OnEventGodDelete; + public event ParcelDwellRequest OnParcelDwellRequest; + public event UserInfoRequest OnUserInfoRequest; + public event UpdateUserInfo OnUpdateUserInfo; + public event RetrieveInstantMessages OnRetrieveInstantMessages; + public event PickDelete OnPickDelete; + public event PickGodDelete OnPickGodDelete; + public event PickInfoUpdate OnPickInfoUpdate; + public event AvatarNotesUpdate OnAvatarNotesUpdate; + public event MuteListRequest OnMuteListRequest; + public event PlacesQuery OnPlacesQuery; + + public void SetDebugPacketLevel(int newDebug) + { + + } + + public void InPacket(object NewPack) + { + + } + + public void ProcessInPacket(Packet NewPack) + { + + } + + public void Close(bool ShutdownCircuit) + { + Disconnect(); + } + + public void Kick(string message) + { + Disconnect(message); + } + + public void Start() + { + Scene.AddNewClient(this); + + // Mimicking LLClientView which gets always set appearance from client. + Scene scene = (Scene)Scene; + AvatarAppearance appearance; + scene.GetAvatarAppearance(this, out appearance); + List visualParams = new List(); + foreach (byte visualParam in appearance.VisualParams) + { + visualParams.Add(visualParam); + } + OnSetAppearance(appearance.Texture.GetBytes(), visualParams); + } + + public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) + { + m_log.Info("[IRCd ClientStack] Completing Handshake to Region"); + + if (OnRegionHandShakeReply != null) + { + OnRegionHandShakeReply(this); + } + + if (OnCompleteMovementToRegion != null) + { + OnCompleteMovementToRegion(); + } + } + + public void Stop() + { + Disconnect(); + } + + public void SendWearables(AvatarWearable[] wearables, int serial) + { + + } + + public void SendAppearance(UUID agentID, byte[] visualParams, byte[] textureEntry) + { + + } + + public void SendStartPingCheck(byte seq) + { + + } + + public void SendKillObject(ulong regionHandle, uint localID) + { + + } + + public void SendAnimations(UUID[] animID, int[] seqs, UUID sourceAgentId, UUID[] objectIDs) + { + + } + + public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) + { + if (audible > 0 && message.Length > 0) + IRC_SendChannelPrivmsg(fromName, message); + } + + private void IRC_SendChannelPrivmsg(string fromName, string message) + { + SendCommand(":" + fromName.Replace(" ", "") + " PRIVMSG " + IrcRegionName + " :" + message); + } + + public void SendInstantMessage(GridInstantMessage im) + { + // TODO + } + + public void SendGenericMessage(string method, List message) + { + + } + + public void SendLayerData(float[] map) + { + + } + + public void SendLayerData(int px, int py, float[] map) + { + + } + + public void SendWindData(Vector2[] windSpeeds) + { + + } + + public void SendCloudData(float[] cloudCover) + { + + } + + public void MoveAgentIntoRegion(RegionInfo regInfo, Vector3 pos, Vector3 look) + { + + } + + public void InformClientOfNeighbour(ulong neighbourHandle, IPEndPoint neighbourExternalEndPoint) + { + + } + + public AgentCircuitData RequestClientInfo() + { + return new AgentCircuitData(); + } + + 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 SendTeleportLocationStart() + { + + } + + public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) + { + + } + + public void SendPayPrice(UUID objectID, int[] payPrice) + { + + } + + public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) + { + + } + + public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID agentid) + { + + } + + public void SendCoarseLocationUpdate(List users, List CoarseLocations) + { + + } + + public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) + { + + } + + public void SetChildAgentThrottle(byte[] throttle) + { + + } + + public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) + { + + } + + public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material) + { + + } + + public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint) + { + + } + + public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, bool fetchFolders, bool fetchItems) + { + + } + + public void FlushPrimUpdates() + { + + } + + public void SendInventoryItemDetails(UUID ownerID, InventoryItemBase item) + { + + } + + public void SendInventoryItemCreateUpdate(InventoryItemBase Item, uint callbackId) + { + + } + + 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) + { + + } + + 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) + { + IRC_SendChannelPrivmsg("Alert",message); + } + + public void SendAgentAlertMessage(string message, bool modal) + { + + } + + public void SendLoadURL(string objectname, UUID objectID, UUID ownerID, bool groupOwned, string message, string url) + { + IRC_SendChannelPrivmsg(objectname,url); + } + + public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) + { + + } + + public bool AddMoney(int debit) + { + return true; + } + + 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 UUID GetDefaultAnimation(string name) + { + return UUID.Zero; + } + + public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, 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 SendEstateManagersList(UUID invoice, UUID[] EstateManagers, 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, string abuseEmail, UUID estateOwner) + { + + } + + public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) + { + + } + + public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) + { + + } + + public void SendForceClientSelectObjects(List objectIDs) + { + + } + + 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() + { + // TODO + } + + public void SendSimStats(SimStats stats) + { + + } + + public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, UUID LastOwnerID, string ObjectName, string Description) + { + + } + + public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice) + { + + } + + public void SendAgentOffline(UUID[] agentIDs) + { + + } + + public void SendAgentOnline(UUID[] agentIDs) + { + + } + + 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 byte[] GetThrottlesPacked(float multiplier) + { + return new byte[0]; + } + + public event ViewerEffectEventHandler OnViewerEffect; + public event Action OnLogout; + public event Action OnConnectionClosed; + + public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) + { + IRC_SendChannelPrivmsg(FromAvatarName, Message); + } + + public void SendLogoutPacket() + { + Disconnect(); + } + + public ClientInfo GetClientInfo() + { + return new ClientInfo(); + } + + public void SetClientInfo(ClientInfo info) + { + + } + + public void SetClientOption(string option, string value) + { + + } + + public string GetClientOption(string option) + { + return String.Empty; + } + + public void Terminate() + { + Disconnect(); + } + + 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 SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) + { + + } + + public void SendAvatarGroupsReply(UUID avatarID, GroupMembershipData[] data) + { + + } + + 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 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 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 void KillEndDone() + { + + } + + public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) + { + return true; + } + + #endregion + + #region Implementation of IClientIPEndpoint + + public IPAddress EndPoint + { + get { return ((IPEndPoint) m_client.Client.RemoteEndPoint).Address; } + } + + #endregion + } +} diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs index b8f5afa..612ac48 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs @@ -1,61 +1,61 @@ -using System; -using System.Collections.Generic; -using System.Net; -using System.Net.Sockets; -using System.Reflection; -using System.Text; -using System.Threading; -using log4net; -using OpenSim.Region.Framework.Scenes; - -namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server -{ - public delegate void OnNewIRCUserDelegate(IRCClientView user); - - /// - /// Adam's completely hacked up not-probably-compliant RFC1459 server class. - /// - class IRCServer - { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - - public event OnNewIRCUserDelegate OnNewIRCClient; - - private readonly TcpListener m_listener; - private readonly Scene m_baseScene; - private bool m_running = true; - - public IRCServer(IPAddress listener, int port, Scene baseScene) - { - m_listener = new TcpListener(listener, port); - - m_listener.Start(50); - - Thread thread = new Thread(ListenLoop); - thread.Start(); - m_baseScene = baseScene; - } - - public void Stop() - { - m_running = false; - m_listener.Stop(); - } - - private void ListenLoop() - { - while(m_running) - { - AcceptClient(m_listener.AcceptTcpClient()); - } - } - - private void AcceptClient(TcpClient client) - { - IRCClientView cv = new IRCClientView(client, m_baseScene); - - if (OnNewIRCClient != null) - OnNewIRCClient(cv); - } - } -} +using System; +using System.Collections.Generic; +using System.Net; +using System.Net.Sockets; +using System.Reflection; +using System.Text; +using System.Threading; +using log4net; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server +{ + public delegate void OnNewIRCUserDelegate(IRCClientView user); + + /// + /// Adam's completely hacked up not-probably-compliant RFC1459 server class. + /// + class IRCServer + { + private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); + + public event OnNewIRCUserDelegate OnNewIRCClient; + + private readonly TcpListener m_listener; + private readonly Scene m_baseScene; + private bool m_running = true; + + public IRCServer(IPAddress listener, int port, Scene baseScene) + { + m_listener = new TcpListener(listener, port); + + m_listener.Start(50); + + Thread thread = new Thread(ListenLoop); + thread.Start(); + m_baseScene = baseScene; + } + + public void Stop() + { + m_running = false; + m_listener.Stop(); + } + + private void ListenLoop() + { + while(m_running) + { + AcceptClient(m_listener.AcceptTcpClient()); + } + } + + private void AcceptClient(TcpClient client) + { + IRCClientView cv = new IRCClientView(client, m_baseScene); + + if (OnNewIRCClient != null) + OnNewIRCClient(cv); + } + } +} -- cgit v1.1 From 35b450d41d2695aa6a82a6d8e6bda5e327f431e1 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Sun, 31 May 2009 18:35:00 +0000 Subject: Add copyright headers, formatting cleanup, ignore some generated files. --- .../InternetRelayClientView/IRCStackModule.cs | 29 ++++++++++++++- .../Server/IRCClientView.cs | 43 ++++++++++++++++++---- .../InternetRelayClientView/Server/IRCServer.cs | 31 +++++++++++++++- 3 files changed, 92 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 808f1f9..30a39b3 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -1,4 +1,31 @@ -using System.Net; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System.Net; using System.Reflection; using log4net; using Nini.Config; diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index e3d1b59..daadb87 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1,4 +1,31 @@ -using System; +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; using System.Collections.Generic; using System.IO; using System.Net; @@ -134,9 +161,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private void ProcessInMessage(string message, string command) { m_log.Info("[IRCd] Processing [MSG:" + message + "] [COM:" + command + "]"); - if(command != null) + if (command != null) { - switch(command) + switch (command) { case "ADMIN": case "AWAY": @@ -454,21 +481,21 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server string command = ExtractCommand(msg); - for(int i=0;i tmp = new List(); - for(int j=i;j class IRCServer { - private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); - public event OnNewIRCUserDelegate OnNewIRCClient; private readonly TcpListener m_listener; -- cgit v1.1 From 1adeb8ad7781beecbf1f23817eb9047e57f12027 Mon Sep 17 00:00:00 2001 From: Sean Dague Date: Fri, 19 Jun 2009 12:21:20 +0000 Subject: From: Chris Yeoh This patch ensures that the touch positions are set during touch_end events (currently only working for touch_start and touch events). --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 9c6c44d..9002a21 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -679,7 +679,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event ObjectDuplicate OnObjectDuplicate; public event ObjectDuplicateOnRay OnObjectDuplicateOnRay; public event GrabObject OnGrabObject; - public event ObjectSelect OnDeGrabObject; + public event DeGrabObject OnDeGrabObject; public event MoveObject OnGrabUpdate; public event SpinStart OnSpinStart; public event SpinObject OnSpinUpdate; -- cgit v1.1 From 7545f12c5fe4484928c938b08ac8b31b9e82e929 Mon Sep 17 00:00:00 2001 From: Charles Krinke Date: Mon, 29 Jun 2009 14:01:08 +0000 Subject: Thank you kindly, Godfrey, for a patch that: The new IRCd module causes an error when multiple instances of OpenSim are run on the same machine; since the port number (6666) is hardcoded, the second and subsequent instances crash upon startup because the port is already in use. Attached is a patch which adds a Port specifier to the [IRCd] section of the config file, which defaults to 6666 if not present. --- .../OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 30a39b3..4b199ac 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -49,8 +49,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView if (null != source.Configs["IRCd"] && source.Configs["IRCd"].GetBoolean("Enabled",false)) { + int portNo = source.Configs["IRCd"].GetInt("Port",6666); m_scene = scene; - m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), 6666, scene); + m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); m_server.OnNewIRCClient += m_server_OnNewIRCClient; } } -- cgit v1.1 From 3564271c2d4f769361e36e2a10acbeb3e5f56bdf Mon Sep 17 00:00:00 2001 From: Melanie Thielker Date: Wed, 1 Jul 2009 15:47:52 +0000 Subject: Restore the functionality that was removed in r9928. This lets the load balancer plugin work again. Create a new method, GetClientEP, to retrieve only the EndPoint for script usage. Marked the purpose of the method in IClientAPI.cs with a warning. Also restored the corresponding SetClientInfo functionality. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 9002a21..8ec1780 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1396,6 +1396,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server Disconnect(); } + public EndPoint GetClientEP() + { + return null; + } + public ClientInfo GetClientInfo() { return new ClientInfo(); -- cgit v1.1 From acea31518b00b02e2ba8b08106a76de0fbef29ab Mon Sep 17 00:00:00 2001 From: MW Date: Fri, 17 Jul 2009 14:58:54 +0000 Subject: fixed the bug where changing the rotation of a selection of prims in a linkset, made each of those prims rotate around its own centre rather than around the geometric centre of the selection like they should do (and like the client expects). This involved adding a new OnUpdatePrimSingleRotationPosition event to IClientAPI so that we can get the changed position from the client. Btw adding new events to IClientAPI is really tedious where you have to copy the change across to at least 5 or 6 other files. [Note this doesn't fix the bug where any rotation changes to the root prim (but not the whole linkset) cause rotation errors on the child prims.] --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 8ec1780..776e972 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -699,6 +699,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event UpdateVector OnUpdatePrimSinglePosition; public event UpdatePrimRotation OnUpdatePrimGroupRotation; public event UpdatePrimSingleRotation OnUpdatePrimSingleRotation; + public event UpdatePrimSingleRotationPosition OnUpdatePrimSingleRotationPosition; public event UpdatePrimGroupRotation OnUpdatePrimGroupMouseRotation; public event UpdateVector OnUpdatePrimScale; public event UpdateVector OnUpdatePrimGroupScale; -- cgit v1.1 From 08819bcbea9012d67cc4cb44e4d7ec7e5837bac6 Mon Sep 17 00:00:00 2001 From: Teravus Ovares Date: Sun, 19 Jul 2009 02:32:02 +0000 Subject: * Created a way that the OpenSimulator scene can ask the physics scene to do a raycast test safely. * Test for prim obstructions between the avatar and camera. If there are obstructions, inform the client to move the camera closer. This makes it so that walls and objects don't obstruct your view while you're moving around. Try walking inside a hollowed tori. You'll see how much easier it is now because your camera automatically moves closer so you can still see. * Created a way to know if the user's camera is alt + cammed or just following the avatar. * Changes IClientAPI interface by adding SendCameraConstraint(Vector4 CameraConstraint) --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 776e972..44bd716 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1233,6 +1233,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + public void SendCameraConstraint(Vector4 ConstraintPlane) + { + + } + public void SendLandObjectOwners(LandData land, List groups, Dictionary ownersAndCount) { -- cgit v1.1 From 2b990a61bfa88e13d5ad19602e6acef751ea473c Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Fri, 7 Aug 2009 20:31:48 -0400 Subject: This is the second part of the 'not crash on regionsize changes'. This lets you configure region sizes to be smaller without crashing the region. I remind you that regions are still square, must be a multiple of 4, and the Linden client doesn't like anything other then 256. If you set it bigger or smaller, the terrain doesn't load in the client, the map has issues, and god forbid you connect it to a grid that expects 256m regions. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 44bd716..08fc61f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -513,7 +513,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public Vector3 StartPos { - get { return new Vector3(128, 128, 50); } + get { return new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 50); } set { } } -- cgit v1.1 From a42569d89675430087d32332e168429d4185311c Mon Sep 17 00:00:00 2001 From: Adam Johnson Date: Sun, 16 Aug 2009 15:06:06 +0900 Subject: Thanks dmiles for a patch that adds PacketType.RequestMultipleObjects Packet Handler - ref mantis #4010 --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 08fc61f..a3be181 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -686,6 +686,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event SpinStop OnSpinStop; public event UpdateShape OnUpdatePrimShape; public event ObjectExtraParams OnUpdateExtraParams; + public event ObjectRequest OnObjectRequest; public event ObjectSelect OnObjectSelect; public event ObjectDeselect OnObjectDeselect; public event GenericCall7 OnObjectDescription; -- cgit v1.1 From cbd454d69231598daf6748070fb5f0baace61c59 Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Sun, 16 Aug 2009 22:01:18 +1000 Subject: * Implements ISecurityCredential member on SPAvatar, SPAvatarAttachment * Disables 'event not used' warning for IRCClientView; cuts OpenSim total warnings back. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index a3be181..4a2d7b5 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -634,7 +634,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { get { return (uint)Util.RandomClass.Next(0,int.MaxValue); } } - +#pragma warning disable 67 public event GenericMessage OnGenericMessage; public event ImprovedInstantMessage OnInstantMessage; public event ChatMessage OnChatFromClient; @@ -826,6 +826,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event AvatarNotesUpdate OnAvatarNotesUpdate; public event MuteListRequest OnMuteListRequest; public event PlacesQuery OnPlacesQuery; +#pragma warning restore 67 public void SetDebugPacketLevel(int newDebug) { -- cgit v1.1 From ee205e7e812e170f670e690a4e0fa9caa652f226 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Thu, 1 Oct 2009 01:00:09 +0900 Subject: Formatting cleanup. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 4a2d7b5..605645b 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -601,7 +601,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server if (names.Length > 1) return names[1]; return names[0]; - } + } } public IScene Scene -- cgit v1.1 From 400abed271b7d59b8038326fccfe76c28d7d1051 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 30 Sep 2009 21:23:00 +0100 Subject: Add RebakeAvatarTexturesPacket to the client view --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 4a2d7b5..2316267 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1609,5 +1609,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } #endregion + + public void SendRebakeAvatarTextures(UUID textureID) + { + } } } -- cgit v1.1 From 5dfd2643dfc530280e5dcd0056b59add7d49f313 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Wed, 30 Sep 2009 15:53:03 -0700 Subject: * Change the signature of the agent set appearance callback to prevent unnecessary serialization/deserialization of TextureEntry objects and allow TextureEntry to be inspected for missing bakes * Inspect incoming TextureEntry updates for bakes that do not exist on the simulator and request the missing textures * Properly handle appearance updates that do not have a TextureEntry set --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 2316267..57f5d29 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -861,12 +861,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server Scene scene = (Scene)Scene; AvatarAppearance appearance; scene.GetAvatarAppearance(this, out appearance); - List visualParams = new List(); - foreach (byte visualParam in appearance.VisualParams) - { - visualParams.Add(visualParam); - } - OnSetAppearance(appearance.Texture.GetBytes(), visualParams); + OnSetAppearance(appearance.Texture, (byte[])appearance.VisualParams.Clone()); } public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) -- cgit v1.1 From 387e9f7a7faeb412054383080afc3507a1522746 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 2 Oct 2009 18:31:08 -0700 Subject: * Creates Util.UTF8 and switches some references of Encoding.UTF8 to Util.UTF8 (not all references were switched since not all OpenSim libraries reference OpenSim.Framework) * Shrinks the largest in-memory object, the LLRAW.HeightmapLookupValue struct (only used for exporting to LLRAW terrain files), to the minimum possible size. This seems to have the odd side effect of cutting the size of the two double[256,256] terrain objects in half. Possibly an alignment optimization? --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 57f5d29..a31cbae 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -81,7 +81,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { m_log.Info("[IRCd] Sending >>> " + command); - byte[] buf = Encoding.UTF8.GetBytes(command + "\r\n"); + byte[] buf = Util.UTF8.GetBytes(command + "\r\n"); m_client.GetStream().BeginWrite(buf, 0, buf.Length, SendComplete, null); } @@ -109,7 +109,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server byte[] buf = new byte[8]; // RFC1459 defines max message size as 512. int count = m_client.GetStream().Read(buf, 0, buf.Length); - string line = Encoding.UTF8.GetString(buf, 0, count); + string line = Util.UTF8.GetString(buf, 0, count); strbuf += line; -- cgit v1.1 From 23a334b9f54a1ef5df3b503c165e7b76b746a2b1 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 13 Oct 2009 14:50:03 -0700 Subject: * Rewrote ClientManager to remove Lindenisms from OpenSim core, improve performance by removing locks, and replace LLUDPClientCollection * Removed the confusing (and LL-specific) shutdowncircuit parameter from IClientAPI.Close() * Updated the LLUDP code to only use ClientManager instead of trying to synchronize ClientManager and m_clients * Remove clients asynchronously since it is a very slow operation (including a 2000ms sleep) --- .../Agent/InternetRelayClientView/IRCStackModule.cs | 2 +- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 8 +++++++- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 4b199ac..c962329 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -64,7 +64,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView void user_OnIRCReady(IRCClientView cv) { m_log.Info("[IRCd] Adding user..."); - m_scene.ClientManager.Add(cv.CircuitCode, cv); + m_scene.ClientManager.Add(cv.AgentId, cv.RemoteEndPoint, cv); cv.Start(); m_log.Info("[IRCd] Added user to Scene"); } diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 4364627..a8acf0d 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -634,6 +634,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { get { return (uint)Util.RandomClass.Next(0,int.MaxValue); } } + + public IPEndPoint RemoteEndPoint + { + get { return (IPEndPoint)m_client.Client.RemoteEndPoint; } + } + #pragma warning disable 67 public event GenericMessage OnGenericMessage; public event ImprovedInstantMessage OnInstantMessage; @@ -843,7 +849,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void Close(bool ShutdownCircuit) + public void Close() { Disconnect(); } -- cgit v1.1 From dc11643c007adf7a640ec4fbabe25995352aaa18 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Tue, 13 Oct 2009 17:33:45 -0700 Subject: * Consolidated adding / removing ClientManager IClientAPIs to two places in Scene * Added some missing implementations of IClientAPI.RemoteEndPoint * Added a ClientManager.Remove(UUID) overload * Removed a reference to a missing project from prebuild.xml --- .../OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index c962329..4c2a4b9 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -64,7 +64,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView void user_OnIRCReady(IRCClientView cv) { m_log.Info("[IRCd] Adding user..."); - m_scene.ClientManager.Add(cv.AgentId, cv.RemoteEndPoint, cv); cv.Start(); m_log.Info("[IRCd] Added user to Scene"); } -- cgit v1.1 From 4b75353cbf50de3cae4c48ec90b55f30c1612c92 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 15 Oct 2009 16:35:27 -0700 Subject: Object update prioritization by Jim Greensky of Intel Labs, part one. This implements a simple distance prioritizer based on initial agent positions. Re-prioritizing and more advanced priority algorithms will follow soon --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 13 ++++--------- 1 file changed, 4 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index a8acf0d..8ad9327 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1011,12 +1011,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendAvatarData(ulong regionHandle, string firstName, string lastName, string grouptitle, UUID avatarID, uint avatarLocalID, Vector3 Pos, byte[] textureEntry, uint parentID, Quaternion rotation) + public void SendAvatarData(SendAvatarData data) { } - public void SendAvatarTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Vector3 velocity, Quaternion rotation, UUID agentid) + public void SendAvatarTerseUpdate(SendAvatarTerseData data) { } @@ -1036,17 +1036,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material, byte[] textureanim, bool attachment, uint AttachPoint, UUID AssetId, UUID SoundId, double SoundVolume, byte SoundFlags, double SoundRadius) + public void SendPrimitiveToClient(SendPrimitiveData data) { } - public void SendPrimitiveToClient(ulong regionHandle, ushort timeDilation, uint localID, PrimitiveBaseShape primShape, Vector3 pos, Vector3 vel, Vector3 acc, Quaternion rotation, Vector3 rvel, uint flags, UUID objectID, UUID ownerID, string text, byte[] color, uint parentID, byte[] particleSystem, byte clickAction, byte material) - { - - } - - public void SendPrimTerseUpdate(ulong regionHandle, ushort timeDilation, uint localID, Vector3 position, Quaternion rotation, Vector3 velocity, Vector3 rotationalvelocity, byte state, UUID AssetId, UUID owner, int attachPoint) + public void SendPrimTerseUpdate(SendPrimitiveTerseData data) { } -- cgit v1.1 From c7da13eb234d22c4d1b111fb51a4093ce49de0b7 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 17 Oct 2009 14:50:21 +0100 Subject: Adds SendAvatarInterestsUpdate to IClientAPI Thank you, Fly-Man --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index a8acf0d..434da0a 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -831,7 +831,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event PickInfoUpdate OnPickInfoUpdate; public event AvatarNotesUpdate OnAvatarNotesUpdate; public event MuteListRequest OnMuteListRequest; + public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; + #pragma warning restore 67 public void SetDebugPacketLevel(int newDebug) @@ -1570,6 +1572,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + public void SendAvatarInterestUpdate(IClientAPI client, uint wantmask, string wanttext, uint skillsmask, string skillstext, string languages) + { + + } + public void SendParcelDwellReply(int localID, UUID parcelID, float dwell) { -- cgit v1.1 From fdb2a75ad357668b860fc5055e0630ef75a3ad20 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Sat, 17 Oct 2009 18:01:22 -0700 Subject: Committing the second part of Jim Greensky @ Intel Lab's patch, re-prioritizing updates --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 1a24dec..df03b8d 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1048,6 +1048,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) + { + + } + public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, bool fetchFolders, bool fetchItems) { -- cgit v1.1 From b2ed348aa2746fbf034b713d006e40366c479d5a Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Thu, 22 Oct 2009 12:33:23 -0700 Subject: Implemented a Watchdog class. Do not manually create Thread objects anymore, use Watchdog.StartThread(). While your thread is running call Watchdog.UpdateThread(). When it is shutting down call Watchdog.RemoveThread(). Most of the threads in OpenSim have been updated --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 10 ++++++---- .../Agent/InternetRelayClientView/Server/IRCServer.cs | 7 +++++-- 2 files changed, 11 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index df03b8d..4b0d01a 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -67,9 +67,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { m_client = client; m_scene = scene; - - Thread loopThread = new Thread(InternalLoop); - loopThread.Start(); + + Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false); } private void SendServerCommand(string command) @@ -102,7 +101,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { try { - string strbuf = ""; + string strbuf = String.Empty; while (m_connected && m_client.Connected) { @@ -140,6 +139,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } Thread.Sleep(0); + Watchdog.UpdateThread(); } } catch (IOException) @@ -156,6 +156,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server m_log.Warn("[IRCd] Disconnected client."); } + + Watchdog.RemoveThread(); } private void ProcessInMessage(string message, string command) diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs index 91ce9f1..eb39026 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs @@ -33,6 +33,7 @@ using System.Reflection; using System.Text; using System.Threading; using log4net; +using OpenSim.Framework; using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server @@ -56,8 +57,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server m_listener.Start(50); - Thread thread = new Thread(ListenLoop); - thread.Start(); + Watchdog.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false); m_baseScene = baseScene; } @@ -72,7 +72,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server while (m_running) { AcceptClient(m_listener.AcceptTcpClient()); + Watchdog.UpdateThread(); } + + Watchdog.RemoveThread(); } private void AcceptClient(TcpClient client) -- cgit v1.1 From c72f78215bb3435ee2bbb507746c23eccec4dd34 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 4 Nov 2009 01:56:19 +0000 Subject: Backport the fixes to WebFetchInventoryDescendents to the UDP InventoryDescendents packet. Testing has shown that UDP inventory now works flawlessly and, unlike CAPS inventory, doesn't download the entire agent inventory on start. Neither does it incessantly re-request folder NULL_KEY. Therefore, I have disabled CAPS inventory. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 4b0d01a..f1bd705 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1055,7 +1055,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, bool fetchFolders, bool fetchItems) + public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, int version, bool fetchFolders, bool fetchItems) { } -- cgit v1.1 From 83b4b4440b7becb405840bc69d665e260fdecea0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 5 Nov 2009 02:09:07 +0000 Subject: Patch by revolution, thank you. Mantis #1789 . Implement friends permissions. Applied with major changes. Core functionality commented pending review for possible rights escalation. No user functionality yet. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index f1bd705..6c3e7eb 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -758,6 +758,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event FriendActionDelegate OnApproveFriendRequest; public event FriendActionDelegate OnDenyFriendRequest; public event FriendshipTermination OnTerminateFriendship; + public event GrantUserFriendRights OnGrantUserRights; public event MoneyTransferRequest OnMoneyTransferRequest; public event EconomyDataRequest OnEconomyDataRequest; public event MoneyBalanceRequest OnMoneyBalanceRequest; -- cgit v1.1 From 55a40694e7a0c9cf143b50d0cfa4bc682b35bb48 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Nov 2009 17:42:26 +0000 Subject: minor: remove mono compiler warning --- .../OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index 4c2a4b9..cfe1278 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -40,7 +40,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IRCServer m_server; - private Scene m_scene; +// private Scene m_scene; #region Implementation of IRegionModule @@ -50,7 +50,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView source.Configs["IRCd"].GetBoolean("Enabled",false)) { int portNo = source.Configs["IRCd"].GetInt("Port",6666); - m_scene = scene; +// m_scene = scene; m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); m_server.OnNewIRCClient += m_server_OnNewIRCClient; } -- cgit v1.1 From 88b3b98811e70709536bb41410ec88509e0460a5 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 26 Dec 2009 04:12:51 +0000 Subject: Add AvatarInterestsReply --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 6c3e7eb..8b34396 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1624,5 +1624,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendRebakeAvatarTextures(UUID textureID) { } + + public void SendAvatarInterestsReply(UUID avatarID, uint wantMask, string wantText, uint skillsMask, string skillsText, string languages) + { + } } } -- cgit v1.1 From 234d4e11059fb2e1fc9dbe879054bd84e95b502b Mon Sep 17 00:00:00 2001 From: Revolution Date: Wed, 30 Dec 2009 21:45:10 -0600 Subject: Adds tons of packets. Applied with change: Changed spelling to Summary (from Summery) Signed-off-by: Melanie --- .../Server/IRCClientView.cs | 31 ++++++++++++++++++++++ 1 file changed, 31 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 8b34396..6c2b94a 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -836,6 +836,25 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event MuteListRequest OnMuteListRequest; public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; + public event FindAgentUpdate OnFindAgentEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 @@ -1628,5 +1647,17 @@ 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) + { + } } } -- cgit v1.1 From 70d5b1c34cf2eb6621f383169fdee03966850762 Mon Sep 17 00:00:00 2001 From: Jeff Ames Date: Mon, 4 Jan 2010 06:10:45 +0900 Subject: Formatting cleanup. Add copyright headers. --- .../Server/IRCClientView.cs | 36 +++++++++++----------- 1 file changed, 18 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 6c2b94a..5d97a12 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -837,24 +837,24 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; - public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; - public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; - public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; - public event ParcelBuyPass OnParcelBuyPass; - public event ParcelGodMark OnParcelGodMark; - public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; - public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; - public event SimWideDeletesDelegate OnSimWideDeletes; - public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + public event TrackAgentUpdate OnTrackAgentEvent; + public event NewUserReport OnUserReportEvent; + public event SaveStateHandler OnSaveStateEvent; + public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; + public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; + public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; + public event FreezeUserUpdate OnParcelFreezeUserEvent; + public event EjectUserUpdate OnParcelEjectUserEvent; + public event ParcelBuyPass OnParcelBuyPass; + public event ParcelGodMark OnParcelGodMark; + public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; + public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; + public event SimWideDeletesDelegate OnSimWideDeletes; + public event SendPostcard OnSendPostcard; + public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; + public event MuteListEntryRemove OnRemoveMuteListEntryEvent; + public event GodlikeMessage onGodlikeMessageEvent; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; #pragma warning restore 67 -- cgit v1.1 From b67470af9106da24ed67db75cfe4787e58759385 Mon Sep 17 00:00:00 2001 From: Revolution Date: Wed, 6 Jan 2010 19:52:10 -0600 Subject: Fixes the newly added packets as per Melanie's request. Provisionally applied to fix the naming. Signatures are still subject to change. Signed-off-by: Melanie --- .../InternetRelayClientView/Server/IRCClientView.cs | 20 ++++++++++---------- 1 file changed, 10 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 5d97a12..10b352f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -836,25 +836,25 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event MuteListRequest OnMuteListRequest; public event AvatarInterestUpdate OnAvatarInterestUpdate; public event PlacesQuery OnPlacesQuery; - public event FindAgentUpdate OnFindAgentEvent; - public event TrackAgentUpdate OnTrackAgentEvent; - public event NewUserReport OnUserReportEvent; - public event SaveStateHandler OnSaveStateEvent; + public event FindAgentUpdate OnFindAgent; + public event TrackAgentUpdate OnTrackAgent; + public event NewUserReport OnUserReport; + public event SaveStateHandler OnSaveState; public event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; public event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; public event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - public event FreezeUserUpdate OnParcelFreezeUserEvent; - public event EjectUserUpdate OnParcelEjectUserEvent; + public event FreezeUserUpdate OnParcelFreezeUser; + public event EjectUserUpdate OnParcelEjectUser; public event ParcelBuyPass OnParcelBuyPass; public event ParcelGodMark OnParcelGodMark; public event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; public event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; public event SimWideDeletesDelegate OnSimWideDeletes; public event SendPostcard OnSendPostcard; - public event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - public event MuteListEntryRemove OnRemoveMuteListEntryEvent; - public event GodlikeMessage onGodlikeMessageEvent; - public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + public event MuteListEntryUpdate OnUpdateMuteListEntry; + public event MuteListEntryRemove OnRemoveMuteListEntry; + public event GodlikeMessage onGodlikeMessage; + public event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; #pragma warning restore 67 -- cgit v1.1 From c76c80a28aabeb1cb0556ea2ebd89f6241bb7026 Mon Sep 17 00:00:00 2001 From: Revolution Date: Fri, 8 Jan 2010 12:44:26 -0600 Subject: Adds IClientAPI voids for GroupProposals. Signed-off-by: Melanie --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 10b352f..55bbed9 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1657,7 +1657,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) - { + { + } + + public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) + { + } + + public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) + { } } } -- cgit v1.1 From 063f106cbbc2a805dc210fe16c30741ab24876cb Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 9 Jan 2010 14:17:44 +0000 Subject: Add functionality to estate "Allowed Users" and "Allowed Groups". Allowed users will be honored now, while allowed groups will not. This requires additional groups module integration work --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 55bbed9..6785c08 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1220,7 +1220,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID) + public void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID) { } -- cgit v1.1 From ec3c31e61e5e540f822891110df9bc978655bbaf Mon Sep 17 00:00:00 2001 From: Revolution Date: Fri, 22 Jan 2010 18:09:33 -0600 Subject: Updates all IRegionModules to the new style region modules. Signed-off-by: Melanie --- .../InternetRelayClientView/IRCStackModule.cs | 32 +++++++++++++++------- 1 file changed, 22 insertions(+), 10 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index cfe1278..ec040db 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -25,9 +25,11 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Net; using System.Reflection; using log4net; +using Mono.Addins; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -35,24 +37,23 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView { - public class IRCStackModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] + public class IRCStackModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IRCServer m_server; // private Scene m_scene; + private int portNo; - #region Implementation of IRegionModule + #region Implementation of ISharedRegionModule - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) { if (null != source.Configs["IRCd"] && source.Configs["IRCd"].GetBoolean("Enabled",false)) { - int portNo = source.Configs["IRCd"].GetInt("Port",6666); -// m_scene = scene; - m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); - m_server.OnNewIRCClient += m_server_OnNewIRCClient; + portNo = source.Configs["IRCd"].GetInt("Port",6666); } } @@ -68,9 +69,20 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView m_log.Info("[IRCd] Added user to Scene"); } - public void PostInitialise() + public void AddRegion(Scene scene) + { + if (portNo != null) + { + m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); + m_server.OnNewIRCClient += m_server_OnNewIRCClient; + } + } + public void RegionLoaded(Scene scene) { + } + public void RemoveRegion(Scene scene) + { } public void Close() @@ -83,9 +95,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView get { return "IRCClientStackModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return false; } + get { return null; } } #endregion -- cgit v1.1 From 8284fc8e2244eeea3915bf0485f2c7b7ef4ed153 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Tue, 26 Jan 2010 12:19:38 -0500 Subject: * Fix Endlines in IRCClientView.cs --- .../InternetRelayClientView/Server/IRCClientView.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 6785c08..b421623 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1657,15 +1657,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) - { - } - - public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) - { - } - - public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) - { + { + } + + public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) + { + } + + public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) + { } } } -- cgit v1.1 From a87a247f0548d39a8c39b1d28123d7da8db44598 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 29 Jan 2010 07:20:13 +0000 Subject: Revert "Updates all IRegionModules to the new style region modules." This reverts commit ec3c31e61e5e540f822891110df9bc978655bbaf. --- .../InternetRelayClientView/IRCStackModule.cs | 32 +++++++--------------- 1 file changed, 10 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index ec040db..cfe1278 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -25,11 +25,9 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ -using System; using System.Net; using System.Reflection; using log4net; -using Mono.Addins; using Nini.Config; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; @@ -37,23 +35,24 @@ using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView { - [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule")] - public class IRCStackModule : INonSharedRegionModule + public class IRCStackModule : IRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IRCServer m_server; // private Scene m_scene; - private int portNo; - #region Implementation of ISharedRegionModule + #region Implementation of IRegionModule - public void Initialise(IConfigSource source) + public void Initialise(Scene scene, IConfigSource source) { if (null != source.Configs["IRCd"] && source.Configs["IRCd"].GetBoolean("Enabled",false)) { - portNo = source.Configs["IRCd"].GetInt("Port",6666); + int portNo = source.Configs["IRCd"].GetInt("Port",6666); +// m_scene = scene; + m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); + m_server.OnNewIRCClient += m_server_OnNewIRCClient; } } @@ -69,20 +68,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView m_log.Info("[IRCd] Added user to Scene"); } - public void AddRegion(Scene scene) - { - if (portNo != null) - { - m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); - m_server.OnNewIRCClient += m_server_OnNewIRCClient; - } - } - public void RegionLoaded(Scene scene) + public void PostInitialise() { - } - public void RemoveRegion(Scene scene) - { } public void Close() @@ -95,9 +83,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView get { return "IRCClientStackModule"; } } - public Type ReplaceableInterface + public bool IsSharedModule { - get { return null; } + get { return false; } } #endregion -- cgit v1.1 From 5001f61c08fea2ebfcb2590be69073d04d129d70 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 29 Jan 2010 18:59:41 -0800 Subject: * HGGridConnector is no longer necessary. * Handle logout properly. This needed an addition to IClientAPI, because of how the logout packet is currently being handled -- the agent is being removed from the scene before the different event handlers are executed, which is broken. --- .../Server/IRCClientView.cs | 24 ++++++++++++++-------- 1 file changed, 15 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 6785c08..a781a1d 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -627,6 +627,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server set { if (!value) Disconnect("IsActive Disconnected?"); } } + public bool IsLoggingOut + { + get { return false; } + set { } + } + public bool SendLogoutPacketWhenClosing { set { } @@ -1657,15 +1663,15 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } public void SendGroupTransactionsSummaryDetails(IClientAPI sender,UUID groupID, UUID transactionID, UUID sessionID,int amt) - { - } - - public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) - { - } - - public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) - { + { + } + + public void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes) + { + } + + public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) + { } } } -- cgit v1.1 From 9821c4f566e11c75c8d87721777480c5b2e2bd4e Mon Sep 17 00:00:00 2001 From: Revolution Date: Sun, 14 Feb 2010 15:41:57 -0600 Subject: Revolution is on the roll again! :) Fixes: Undo, T-pose of others on login, modifiedBulletX works again, feet now stand on the ground instead of in the ground, adds checks to CombatModule. Adds: Redo, Land Undo, checks to agentUpdate (so one can not fall off of a region), more vehicle parts. Finishes almost all of LSL (1 function left, 2 events). Direct flames and kudos to Revolution, please Signed-off-by: Melanie --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index b421623..009dd37 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -774,6 +774,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event UUIDNameRequest OnTeleportHomeRequest; public event ScriptAnswer OnScriptAnswer; public event AgentSit OnUndo; + public event AgentSit OnRedo; + public event LandUndo OnLandUndo; public event ForceReleaseControls OnForceReleaseControls; public event GodLandStatRequest OnLandStatRequest; public event DetailedEstateDataRequest OnDetailedEstateDataRequest; -- cgit v1.1 From 5c5966545d14de43500b95109e8ce81058ebe2c3 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 28 Feb 2010 12:07:38 -0800 Subject: Initial Online friends notification seems to be working reliably now. All this needs more testing, but everything is there. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index f54733d..92e5a13 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -679,7 +679,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event DeRezObject OnDeRezObject; public event Action OnRegionHandShakeReply; public event GenericCall2 OnRequestWearables; - public event GenericCall2 OnCompleteMovementToRegion; + public event GenericCall1 OnCompleteMovementToRegion; public event UpdateAgent OnAgentUpdate; public event AgentRequestSit OnAgentRequestSit; public event AgentSit OnAgentSit; @@ -913,7 +913,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server if (OnCompleteMovementToRegion != null) { - OnCompleteMovementToRegion(); + OnCompleteMovementToRegion(this); } } -- cgit v1.1 From 44e7224b86dbcd369ce2569328e3b00fc3b209ab Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 28 Feb 2010 22:47:31 +0000 Subject: Add missing ChangeUserRights packet sender --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 92e5a13..cbe3c77 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1675,5 +1675,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals) { } + + public void SendChangeUserRights(UUID friendID, int rights) + { + } } } -- cgit v1.1 From 86c621fdc77fadb898cf53578e83746cd8f8711b Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 28 Feb 2010 22:56:31 +0000 Subject: Change the signature of SendChangeUserRights, because we have to send this to both parties --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index cbe3c77..96530a1 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1676,7 +1676,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { } - public void SendChangeUserRights(UUID friendID, int rights) + public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) { } } -- cgit v1.1 From 2dcf73dd93f2bc8993c2f534ef5ee8c72e24d0f3 Mon Sep 17 00:00:00 2001 From: unknown Date: Sat, 6 Mar 2010 14:13:12 -0600 Subject: - supporting llTextBox Signed-off-by: Melanie --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 96530a1..f2253f2 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1679,5 +1679,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendChangeUserRights(UUID agentID, UUID friendID, int rights) { } + + public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) + { + } } } -- cgit v1.1 From 98f91a252cade093894511110157d7fcd7e4487e Mon Sep 17 00:00:00 2001 From: unknown Date: Mon, 8 Mar 2010 01:19:45 -0600 Subject: - parcel blocking, region crossing blocking, teleport blocking Signed-off-by: Melanie --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index f2253f2..1885946 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -680,6 +680,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event Action OnRegionHandShakeReply; public event GenericCall2 OnRequestWearables; public event GenericCall1 OnCompleteMovementToRegion; + public event UpdateAgent OnPreAgentUpdate; public event UpdateAgent OnAgentUpdate; public event AgentRequestSit OnAgentRequestSit; public event AgentSit OnAgentSit; -- cgit v1.1 From ec637e2b8c089efc16bbb9faae0a1e3cf939db41 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 31 Mar 2010 04:20:20 +0100 Subject: Committing the LightShare code, which was developed by TomMeta of Meta7. This allows scripts to set WindLight parameters for clients connecting to a region. Currently, this is only supported by the Meta7 viewer. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 1885946..f5b148f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -964,7 +964,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server // TODO } - public void SendGenericMessage(string method, List message) + public void SendGenericMessage(string method, List message) { } -- cgit v1.1 From 3d0860ae616749518a40c6f6088d2644d589daf9 Mon Sep 17 00:00:00 2001 From: dahlia Date: Mon, 12 Apr 2010 17:10:51 -0700 Subject: thanks lkalif for Mantis #4676 - a patch that adds support for inventory links Signed-off-by: dahlia --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index f5b148f..69e78b3 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -724,6 +724,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event Action OnRemoveAvatar; public event ObjectPermissions OnObjectPermissions; public event CreateNewInventoryItem OnCreateNewInventoryItem; + public event LinkInventoryItem OnLinkInventoryItem; public event CreateInventoryFolder OnCreateNewInventoryFolder; public event UpdateInventoryFolder OnUpdateInventoryFolder; public event MoveInventoryFolder OnMoveInventoryFolder; -- cgit v1.1 From bf5c81d77e492cd6df5517ecab32cd64168b01c2 Mon Sep 17 00:00:00 2001 From: unknown Date: Wed, 12 May 2010 15:59:48 -0700 Subject: * Initial commit of the slimupdates2 rewrite. This pass maintains the original behavior of avatar update sending and has a simplified set of IClientAPI methods for sending avatar/prim updates --- .../Server/IRCClientView.cs | 34 ++++++++-------------- 1 file changed, 12 insertions(+), 22 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 69e78b3..84faac0 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1045,16 +1045,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendAvatarData(SendAvatarData data) - { - - } - - public void SendAvatarTerseUpdate(SendAvatarTerseData data) - { - - } - public void SendCoarseLocationUpdate(List users, List CoarseLocations) { @@ -1065,32 +1055,27 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SetChildAgentThrottle(byte[] throttle) + public void SendAvatarDataImmediate(ISceneEntity avatar) { - - } - public void SendPrimitiveToClient(SendPrimitiveData data) - { - } - public void SendPrimTerseUpdate(SendPrimitiveTerseData data) + public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) { - + } - public void ReprioritizeUpdates(StateUpdateTypes type, UpdatePriorityHandler handler) + public void ReprioritizeUpdates(UpdatePriorityHandler handler) { } - public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, int version, bool fetchFolders, bool fetchItems) + public void FlushPrimUpdates() { - + } - public void FlushPrimUpdates() + public void SendInventoryFolderDetails(UUID ownerID, UUID folderID, List items, List folders, int version, bool fetchFolders, bool fetchItems) { } @@ -1420,6 +1405,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + public virtual void SetChildAgentThrottle(byte[] throttle) + { + + } + public byte[] GetThrottlesPacked(float multiplier) { return new byte[0]; -- cgit v1.1 From 93ef65c69055157e0b7d51e544abe5a1035f40f0 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 21 May 2010 13:55:36 -0700 Subject: * Moving all of the prioritization/reprioritization code into a new file Prioritizer.cs * Simplified the interest management code to make it easier to add new policies. Prioritization and reprioritization share code paths now * Improved the distance and front back policies to always give your avatar the highest priority --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 84faac0..27de529 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1065,7 +1065,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void ReprioritizeUpdates(UpdatePriorityHandler handler) + public void ReprioritizeUpdates() { } -- cgit v1.1 From 4e45718833f72b9149aed6d503e967b8916e5d08 Mon Sep 17 00:00:00 2001 From: Mikko Pallari Date: Thu, 15 Apr 2010 08:23:51 +0300 Subject: Added overload of SendGenericMessage to LLClientView with string list as parameter. Now modules themselfs don't necessarily need to convert strings to byte arrays. Added this as it was removed in LightShare patch. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 27de529..7453eae 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -965,6 +965,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server // TODO } + public void SendGenericMessage(string method, List message) + { + + } + public void SendGenericMessage(string method, List message) { -- cgit v1.1 From c8ed9724437d9bf1972d4ef3e2b10dd9fa3e7e70 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 12 Jun 2010 01:25:25 +0100 Subject: Move "StopFlying()" into LLSpace. Try to reinstate the carefully crafted packet we used to send before slimupdates and explicitly send it --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 7453eae..754b925 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1680,5 +1680,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) { } + + public void StopFlying(ISceneEntity presence) + { + } } } -- cgit v1.1 From e1ea82b329b9346ccacb1edd25a0e2b44f07e8c8 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 14 Jul 2010 19:51:12 +0100 Subject: Major attachments cleanup. Remove unused AttachObject ClientView method Clean up use of AttachObject throughout, reduce number of overloads and number of parameters --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 754b925..ee7aa2da 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1055,11 +1055,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void AttachObject(uint localID, Quaternion rotation, byte attachPoint, UUID ownerID) - { - - } - public void SendAvatarDataImmediate(ISceneEntity avatar) { -- cgit v1.1 From 77de28965ae5fc6de3c60a28ce7d4e59643a2a70 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 16 Aug 2010 11:33:59 -0700 Subject: Work on TeleportStart: renamed method from TeleportLocationStart to TeleportStart, and now sending this upon all teleports, not just some, and in the right place (EntityTransferModule). --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index ee7aa2da..19bb002 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1035,7 +1035,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendTeleportLocationStart() + public void SendTeleportStart(uint flags) { } -- cgit v1.1 From a8b80ef800e78d9fa321bc2388b4d8336f454b1d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Mon, 16 Aug 2010 11:39:46 -0700 Subject: Added SendTeleportProgress to IClientAPI. Ya know what that means... 8 files affected. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 19bb002..6793ef6 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1040,6 +1040,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + public void SendTeleportProgress(uint flags, string message) + { + } + public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) { -- cgit v1.1 From dd277a0d02f1aa79f4fcb5d108cbc696e90500c2 Mon Sep 17 00:00:00 2001 From: John Hurliman Date: Fri, 10 Sep 2010 12:04:12 -0700 Subject: First pass at cleaning up thread safety in EntityManager and SceneGraph --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 6793ef6..159af79 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -375,8 +375,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private void IRC_SendNamesReply() { - List users = m_scene.Entities.GetAllByType(); - + EntityBase[] users = m_scene.Entities.GetAllByType(); foreach (EntityBase user in users) { SendServerCommand("353 " + m_nick + " = " + IrcRegionName + " :" + user.Name.Replace(" ", "")); @@ -386,8 +385,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private void IRC_SendWhoReply() { - List users = m_scene.Entities.GetAllByType(); - + EntityBase[] users = m_scene.Entities.GetAllByType(); foreach (EntityBase user in users) { /*SendServerCommand(String.Format("352 {0} {1} {2} {3} {4} {5} :0 {6}", IrcRegionName, @@ -415,11 +413,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private void IRC_SendReplyUsers() { - List users = m_scene.Entities.GetAllByType(); + EntityBase[] users = m_scene.Entities.GetAllByType(); SendServerCommand("392 :UserID Terminal Host"); - if (users.Count == 0) + if (users.Length == 0) { SendServerCommand("395 :Nobody logged in"); return; -- cgit v1.1 From b1c8d0588829dfa76f89460eeb8406d9c4fc479f Mon Sep 17 00:00:00 2001 From: Master ScienceSim Date: Wed, 20 Oct 2010 16:17:54 -0700 Subject: Major refactoring of appearance handling. AvatarService -- add two new methods, GetAppearance and SetAppearance to get around the lossy encoding in AvatarData. Preseve the old functions to avoid changing the behavior for ROBUST services. AvatarAppearance -- major refactor, moved the various encoding methods used by AgentCircuitData, ClientAgentUpdate and ScenePresence into one location. Changed initialization. AvatarAttachments -- added a class specifically to handle attachments in preparation for additional functionality that will be needed for viewer 2. AvatarFactory -- removed a number of unused or methods duplicated in other locations. Moved in all appearance event handling from ScenePresence. Required a change to IClientAPI that propogated throughout all the IClientAPI implementations. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 159af79..fc17192 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -676,7 +676,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event TeleportLandmarkRequest OnTeleportLandmarkRequest; public event DeRezObject OnDeRezObject; public event Action OnRegionHandShakeReply; - public event GenericCall2 OnRequestWearables; + public event GenericCall1 OnRequestWearables; public event GenericCall1 OnCompleteMovementToRegion; public event UpdateAgent OnPreAgentUpdate; public event UpdateAgent OnAgentUpdate; @@ -899,7 +899,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server Scene scene = (Scene)Scene; AvatarAppearance appearance; scene.GetAvatarAppearance(this, out appearance); - OnSetAppearance(appearance.Texture, (byte[])appearance.VisualParams.Clone()); + OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone()); } public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) -- cgit v1.1 From 25ecd62b1feed16d12d6f5e5ef00bddf7dbf0547 Mon Sep 17 00:00:00 2001 From: Teravus Ovares (Dan Olivares) Date: Tue, 21 Dec 2010 19:15:44 -0500 Subject: * Adds AbortXfer to the ClientAPI mix * Adds an item that checks to see if the top request has been there for longer then 30 seconds without an update and sends an AbortXfer if it encounters one. This allows the client to cancel the Xfer on it's side so you can re-select the prim and get the inventory when it fails the first time. * Some interesting locking... Using NewFiles to lock the rest of them. We'll see how that goes. * The goal of this is to ensure that Xfers are restartable when they fail. The client will not do that on it's own. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index fc17192..20870aa 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1117,6 +1117,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + 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) { -- cgit v1.1 From a32f80b9e3a84852558150c3b30722b6755a1ff0 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 30 Dec 2010 00:31:59 +0100 Subject: Implement SendPlacesReply --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 20870aa..49382f0 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1686,5 +1686,9 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void StopFlying(ISceneEntity presence) { } + + public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) + { + } } } -- cgit v1.1 From c383dbd06dd98ca96543c9bfdf9a7376a7e55cc2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 00:38:16 +0000 Subject: implement "show throttles" command for showing current agent throttles and the server settings. This is in a very crude state, currently. The LindenUDPModule was renamed LindenUDPInfoModule and moved to OptionalModules OptionalModules was given a direct reference to OpenSim.Region.ClientStack.LindenUDP so that it can inspect specific LindenUDP settings without having to generalize those to all client views (some of which may have no concept of the settings involved). This might be ess messy if OpenSim.Region.ClientStack.LindenUDP were a region module instead, like MXP, IRC and NPC --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 330 +++++++++++++++++++++ 1 file changed, 330 insertions(+) create mode 100644 OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs new file mode 100644 index 0000000..480df31 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -0,0 +1,330 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.Reflection; +using System.Text; +using log4net; +using Mono.Addins; +using Nini.Config; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Console; +using OpenSim.Framework.Statistics; +using OpenSim.Region.ClientStack.LindenUDP; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.CoreModules.UDP.Linden +{ + /// + /// A module that just holds commands for inspecting the current state of the Linden UDP stack. + /// + /// + /// All actual client stack functionality remains in OpenSim.Region.ClientStack.LindenUDP + /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "LindenUDPInfoModule")] + public class LindenUDPInfoModule : ISharedRegionModule + { + 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 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( + this, "show queues", + "show queues [full]", + "Show queue data for each client", + "Without the 'full' option, only root agents are shown." + + " With the 'full' option child agents are also shown.", + ShowQueuesReport); + + scene.AddCommand( + this, "show throttles", + "show throttles [full]", + "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.", + ShowThrottlesReport); + } + + 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); + } + + protected void ShowQueuesReport(string module, string[] cmd) + { + MainConsole.Instance.Output(GetQueuesReport(cmd)); + } + + protected void ShowThrottlesReport(string module, string[] cmd) + { + MainConsole.Instance.Output(GetThrottlesReport(cmd)); + } + + /// + /// Generate UDP Queue data report for each client + /// + /// + /// + protected string GetQueuesReport(string[] showParams) + { + bool showChildren = false; + + if (showParams.Length > 2 && showParams[2] == "full") + showChildren = true; + + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + + report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); + report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); + report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); + + report.AppendFormat( + "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", + "Pkts", + "Pkts", + "Bytes", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts", + "Pkts"); + + report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); + report.AppendFormat( + "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", + "Out", + "In", + "Unacked", + "Resend", + "Land", + "Wind", + "Cloud", + "Task", + "Texture", + "Asset", + "State"); + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is IStatsCollector) + { + bool isChild = scene.PresenceChildStatus(client.AgentId); + if (isChild && !showChildren) + return; + + string name = client.Name; + string regionName = scene.RegionInfo.RegionName; + + report.AppendFormat( + "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", + name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); + report.AppendFormat( + "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", + regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); + report.AppendFormat( + "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", + isChild ? "Cd" : "Rt", ""); + + IStatsCollector stats = (IStatsCollector)client; + + report.AppendLine(stats.Report()); + } + }); + } + } + + return report.ToString(); + } + + /// + /// Show throttle data + /// + /// + /// + protected string GetThrottlesReport(string[] showParams) + { + bool showChildren = false; + + if (showParams.Length > 2 && showParams[2] == "full") + showChildren = true; + + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + + report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); + report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); + report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type\n", ""); + + bool firstClient = true; + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is LLClientView) + { + LLClientView llClient = client as LLClientView; + + if (firstClient) + { + report.AppendLine(GetServerThrottlesReport(llClient.UDPServer, scene)); + firstClient = false; + } + + bool isChild = scene.PresenceChildStatus(client.AgentId); + if (isChild && !showChildren) + return; + + string name = client.Name; + string regionName = scene.RegionInfo.RegionName; + + LLUDPClient llUdpClient = llClient.UDPClient; + ClientInfo ci = llUdpClient.GetClientInfo(); + + report.AppendFormat( + "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", + name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); + report.AppendFormat( + "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", + regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); + report.AppendFormat( + "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", + isChild ? "Cd" : "Rt", ""); + + report.Append((ci.totalThrottle * 8) / 1000 + " "); + report.Append((ci.resendThrottle * 8) / 1000 + " "); + report.Append((ci.landThrottle * 8) / 1000 + " "); + report.Append((ci.windThrottle * 8) / 1000 + " "); + report.Append((ci.cloudThrottle * 8) / 1000 + " "); + report.Append((ci.taskThrottle * 8) / 1000 + " "); + report.Append((ci.textureThrottle * 8) / 1000 + " "); + report.Append((ci.assetThrottle * 8) / 1000 + " "); + + report.AppendLine(); + } + }); + } + } + + return report.ToString(); + } + + protected string GetServerThrottlesReport(LLUDPServer udpServer, Scene scene) + { + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + int maxTypeLength = 4; + int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + + string name = "SERVER LIMITS"; + string regionName = scene.RegionInfo.RegionName; + + report.AppendFormat( + "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", + name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); + report.AppendFormat( + "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", + regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); + report.AppendFormat( + "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "n/a", ""); + + ThrottleRates throttleRates = udpServer.ThrottleRates; + report.Append("n/a"); + report.Append((throttleRates.ResendLimit * 8) / 1000 + " "); + report.Append((throttleRates.LandLimit * 8) / 1000 + " "); + report.Append((throttleRates.WindLimit * 8) / 1000 + " "); + report.Append((throttleRates.CloudLimit * 8) / 1000 + " "); + report.Append((throttleRates.TaskLimit * 8) / 1000 + " "); + report.Append((throttleRates.TextureLimit * 8) / 1000 + " "); + report.Append((throttleRates.AssetLimit * 8) / 1000 + " "); + + return report.ToString(); + } + } +} \ No newline at end of file -- cgit v1.1 From 38debbc59fe29d2b0bb6ea1f075e43c960f53676 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 00:56:37 +0000 Subject: crudely refactor table generation code for "show queues" and "show throttles" --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 71 +++++++++------------- 1 file changed, 30 insertions(+), 41 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 480df31..0a256a1 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -121,6 +121,14 @@ namespace OpenSim.Region.CoreModules.UDP.Linden MainConsole.Instance.Output(GetThrottlesReport(cmd)); } + protected string GetColumnEntry(string entry, int maxLength, int columnPadding) + { + return string.Format( + "{0,-" + maxLength + "}{1,-" + columnPadding + "}", + entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, + ""); + } + /// /// Generate UDP Queue data report for each client /// @@ -140,10 +148,10 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int maxRegionNameLength = 14; int maxTypeLength = 4; int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - - report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); - report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); - report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type", ""); + + 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,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", @@ -190,15 +198,9 @@ namespace OpenSim.Region.CoreModules.UDP.Linden string name = client.Name; string regionName = scene.RegionInfo.RegionName; - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", - isChild ? "Cd" : "Rt", ""); + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); + report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); IStatsCollector stats = (IStatsCollector)client; @@ -228,12 +230,11 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; - int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; - - report.AppendFormat("{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", "User", ""); - report.AppendFormat("{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", "Region", ""); - report.AppendFormat("{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "Type\n", ""); + int maxTypeLength = 4; + + report.Append(GetColumnEntry("User", maxNameLength, columnPadding)); + report.Append(GetColumnEntry("Region", maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry("Type\n", maxTypeLength, columnPadding)); bool firstClient = true; @@ -263,16 +264,10 @@ namespace OpenSim.Region.CoreModules.UDP.Linden LLUDPClient llUdpClient = llClient.UDPClient; ClientInfo ci = llUdpClient.GetClientInfo(); - - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", - isChild ? "Cd" : "Rt", ""); + + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); + report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); report.Append((ci.totalThrottle * 8) / 1000 + " "); report.Append((ci.resendThrottle * 8) / 1000 + " "); @@ -299,23 +294,17 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; - int totalInfoFieldsLength = maxNameLength + columnPadding + maxRegionNameLength + columnPadding + maxTypeLength + columnPadding; + int maxTypeLength = 4; string name = "SERVER LIMITS"; string regionName = scene.RegionInfo.RegionName; - - report.AppendFormat( - "{0,-" + maxNameLength + "}{1,-" + columnPadding + "}", - name.Length > maxNameLength ? name.Substring(0, maxNameLength) : name, ""); - report.AppendFormat( - "{0,-" + maxRegionNameLength + "}{1,-" + columnPadding + "}", - regionName.Length > maxRegionNameLength ? regionName.Substring(0, maxRegionNameLength) : regionName, ""); - report.AppendFormat( - "{0,-" + maxTypeLength + "}{1,-" + columnPadding + "}", "n/a", ""); + + report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); + report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry("n/a", maxTypeLength, columnPadding)); ThrottleRates throttleRates = udpServer.ThrottleRates; - report.Append("n/a"); + report.Append("n/a "); report.Append((throttleRates.ResendLimit * 8) / 1000 + " "); report.Append((throttleRates.LandLimit * 8) / 1000 + " "); report.Append((throttleRates.WindLimit * 8) / 1000 + " "); -- cgit v1.1 From 9971fdbcd5910a73f81d0a970bc3d49aad6a7d95 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 22:31:46 +0000 Subject: properly format "show throttles" table --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 81 +++++++++++++++------- 1 file changed, 55 insertions(+), 26 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 0a256a1..9a5f2ed 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -230,11 +230,37 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; + 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\n", maxTypeLength, columnPadding)); + report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); + + report.AppendFormat( + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", + "Total", + "Resend", + "Land", + "Wind", + "Cloud", + "Task", + "Texture", + "Asset"); + + report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); + report.AppendFormat( + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", + "kb/s", + "kb/s", + "kb/s", + "kb/s", + "kb/s", + "kb/s", + "kb/s", + "kb/s"); + + report.AppendLine(); bool firstClient = true; @@ -251,7 +277,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden if (firstClient) { - report.AppendLine(GetServerThrottlesReport(llClient.UDPServer, scene)); + report.AppendLine(GetServerThrottlesReport(llClient.UDPServer)); firstClient = false; } @@ -268,15 +294,17 @@ namespace OpenSim.Region.CoreModules.UDP.Linden report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); - - report.Append((ci.totalThrottle * 8) / 1000 + " "); - report.Append((ci.resendThrottle * 8) / 1000 + " "); - report.Append((ci.landThrottle * 8) / 1000 + " "); - report.Append((ci.windThrottle * 8) / 1000 + " "); - report.Append((ci.cloudThrottle * 8) / 1000 + " "); - report.Append((ci.taskThrottle * 8) / 1000 + " "); - report.Append((ci.textureThrottle * 8) / 1000 + " "); - report.Append((ci.assetThrottle * 8) / 1000 + " "); + + report.AppendFormat( + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", + (ci.totalThrottle * 8) / 1000, + (ci.resendThrottle * 8) / 1000, + (ci.landThrottle * 8) / 1000, + (ci.windThrottle * 8) / 1000, + (ci.cloudThrottle * 8) / 1000, + (ci.taskThrottle * 8) / 1000, + (ci.textureThrottle * 8) / 1000, + (ci.assetThrottle * 8) / 1000); report.AppendLine(); } @@ -287,31 +315,32 @@ namespace OpenSim.Region.CoreModules.UDP.Linden return report.ToString(); } - protected string GetServerThrottlesReport(LLUDPServer udpServer, Scene scene) + protected string GetServerThrottlesReport(LLUDPServer udpServer) { StringBuilder report = new StringBuilder(); int columnPadding = 2; int maxNameLength = 18; int maxRegionNameLength = 14; - int maxTypeLength = 4; + int maxTypeLength = 4; - string name = "SERVER LIMITS"; - string regionName = scene.RegionInfo.RegionName; + string name = "SERVER AGENT LIMITS"; report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); - report.Append(GetColumnEntry(regionName, maxRegionNameLength, columnPadding)); - report.Append(GetColumnEntry("n/a", maxTypeLength, columnPadding)); + report.Append(GetColumnEntry("-", maxRegionNameLength, columnPadding)); + report.Append(GetColumnEntry("-", maxTypeLength, columnPadding)); ThrottleRates throttleRates = udpServer.ThrottleRates; - report.Append("n/a "); - report.Append((throttleRates.ResendLimit * 8) / 1000 + " "); - report.Append((throttleRates.LandLimit * 8) / 1000 + " "); - report.Append((throttleRates.WindLimit * 8) / 1000 + " "); - report.Append((throttleRates.CloudLimit * 8) / 1000 + " "); - report.Append((throttleRates.TaskLimit * 8) / 1000 + " "); - report.Append((throttleRates.TextureLimit * 8) / 1000 + " "); - report.Append((throttleRates.AssetLimit * 8) / 1000 + " "); + report.AppendFormat( + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", + "n/a", + (throttleRates.ResendLimit * 8) / 1000, + (throttleRates.LandLimit * 8) / 1000, + (throttleRates.WindLimit * 8) / 1000, + (throttleRates.CloudLimit * 8) / 1000, + (throttleRates.TaskLimit * 8) / 1000, + (throttleRates.TextureLimit * 8) / 1000, + (throttleRates.AssetLimit * 8) / 1000); return report.ToString(); } -- cgit v1.1 From 5f3f7c3405e94ef6d7ea83a89083ab16bcef5719 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 21 Jan 2011 22:48:49 +0000 Subject: minor: remove unnecessary newline from "show throttles" information --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 9a5f2ed..87d067c 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -296,7 +296,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); report.AppendFormat( - "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", + "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", (ci.totalThrottle * 8) / 1000, (ci.resendThrottle * 8) / 1000, (ci.landThrottle * 8) / 1000, -- cgit v1.1 From 2413e9eb3fe63307660202f913eee1c877340372 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 2 Feb 2011 20:00:50 +0000 Subject: Record number of resent packets in LindenUDP stack and display in stats report --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 24 ++++++++++++---------- 1 file changed, 13 insertions(+), 11 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 87d067c..6630edb 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -154,24 +154,26 @@ namespace OpenSim.Region.CoreModules.UDP.Linden report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); report.AppendFormat( - "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", + "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n", "Pkts", "Pkts", + "Pkts", "Bytes", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts", - "Pkts"); + "Q Pkts", + "Q Pkts", + "Q Pkts", + "Q Pkts", + "Q Pkts", + "Q Pkts", + "Q Pkts", + "Q Pkts"); report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( - "{0,7} {1,7} {2,9} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7} {10,7}\n", - "Out", + "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n", "In", + "Out", + "Resent", "Unacked", "Resend", "Land", -- cgit v1.1 From ac7bc78555c1dd51724790032f0711b24bc8c67d Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 8 Feb 2011 12:06:14 -0800 Subject: Added emergency monitoring of UDP Outgoing packets thread. Just type "emergency-monitoring on/off" --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 30 ++++++++++++++++++++-- 1 file changed, 28 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 6630edb..53cebb2 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -95,7 +95,15 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "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.", - ShowThrottlesReport); + ShowThrottlesReport); + + scene.AddCommand( + this, "emergency-monitoring", + "Go on/off emergency monitoring mode", + "Go on/off emergency monitoring mode", + "Go on/off emergency monitoring mode", + EmergencyMonitoring); + } public void RemoveRegion(Scene scene) @@ -120,7 +128,25 @@ namespace OpenSim.Region.CoreModules.UDP.Linden { MainConsole.Instance.Output(GetThrottlesReport(cmd)); } - + + protected void EmergencyMonitoring(string module, string[] cmd) + { + bool mode = true; + if (cmd.Length == 1 || (cmd.Length > 1 && cmd[1] == "on")) + { + mode = true; + MainConsole.Instance.Output("Emergency Monitoring ON"); + } + else + { + mode = false; + MainConsole.Instance.Output("Emergency Monitoring OFF"); + } + + foreach (Scene s in m_scenes.Values) + s.EmergencyMonitoring = mode; + } + protected string GetColumnEntry(string entry, int maxLength, int columnPadding) { return string.Format( -- cgit v1.1 From 473fac4dc71858139bd44c1e9ce4fd03d9d1bd91 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 9 Feb 2011 08:06:20 -0800 Subject: Detect negative dripAmounts in TokenBuckets. These negatives result from overflown integer operations. Also added Total to the scene throttles in show throttles. --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 53cebb2..dfeecb1 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -361,7 +361,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden ThrottleRates throttleRates = udpServer.ThrottleRates; report.AppendFormat( "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", - "n/a", + (throttleRates.Total * 8) / 1000, (throttleRates.ResendLimit * 8) / 1000, (throttleRates.LandLimit * 8) / 1000, (throttleRates.WindLimit * 8) / 1000, -- cgit v1.1 From 8efb01b3df1ea98d5e4a68aa220bafc4ab5306f4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 5 Mar 2011 01:15:27 +0000 Subject: minor: remove some mono compiler warnings --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index dfeecb1..6a24cc1 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -51,7 +51,7 @@ namespace OpenSim.Region.CoreModules.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(); -- cgit v1.1 From 6ae04448f73afdca791ea185fdc0e9c062dea87b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 25 Mar 2011 23:05:51 +0000 Subject: Start using IPrimCounts populated by PrimCountModule instead of LandData counts populated by LandManagementModule. In order to pass ILandObject into IClientAPI.SendLandProperties(), had to push ILandObject and IPrimCounts into OpenSim.Framework from OpenSim.Region.Framework.Interfaces, in order to avoid ci Counts are showing odd behaviour at the moment, this will be addressed shortly. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 49382f0..821cd4b 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1247,7 +1247,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, LandData landData, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) + public void SendLandProperties(int sequence_id, bool snap_selection, int request_result, ILandObject lo, float simObjectBonusFactor, int parcelObjectCapacity, int simObjectCapacity, uint regionFlags) { } -- cgit v1.1 From 69d014e1dcb0e05a4ec927a5501156627856bccb Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Tue, 12 Apr 2011 12:36:36 -0700 Subject: First pass at moving object property requests into a queue similar to the entity update queue. The number of property packets can become significant when selecting/deselecting large numbers of objects. This is experimental code. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 821cd4b..4b6e52e 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1332,14 +1332,13 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendObjectPropertiesFamilyData(uint RequestFlags, UUID ObjectUUID, UUID OwnerID, UUID GroupID, uint BaseMask, uint OwnerMask, uint GroupMask, uint EveryoneMask, uint NextOwnerMask, int OwnershipCost, byte SaleType, int SalePrice, uint Category, UUID LastOwnerID, string ObjectName, string Description) + public void SendObjectPropertiesFamilyData(ISceneEntity Entity, uint RequestFlags) { } - public void SendObjectPropertiesReply(UUID ItemID, ulong CreationDate, UUID CreatorUUID, UUID FolderUUID, UUID FromTaskUUID, UUID GroupUUID, short InventorySerial, UUID LastOwnerUUID, UUID ObjectUUID, UUID OwnerUUID, string TouchTitle, byte[] TextureID, string SitTitle, string ItemName, string ItemDescription, uint OwnerMask, uint NextOwnerMask, uint GroupMask, uint EveryoneMask, uint BaseMask, byte saleType, int salePrice) + public void SendObjectPropertiesReply(ISceneEntity entity) { - } public void SendAgentOffline(UUID[] agentIDs) -- cgit v1.1 From 3534f4492ae747baff492f4bc10bf06994ee1bc6 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Fri, 22 Apr 2011 14:01:12 -0700 Subject: Various clean ups. Removed some debugging code. Added a new "show pqueues" command to look at the entity update priority queue. Added a "name" parameter to show queues, show pqueues and show throttles to look at data for a specific user. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 103 ++++++++++++++++++++- 1 file changed, 101 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 6a24cc1..ddbc079 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -82,6 +82,14 @@ namespace OpenSim.Region.CoreModules.UDP.Linden m_scenes[scene.RegionInfo.RegionID] = scene; scene.AddCommand( + this, "show pqueues", + "show pqueues [full]", + "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.", + ShowPQueuesReport); + + scene.AddCommand( this, "show queues", "show queues [full]", "Show queue data for each client", @@ -119,6 +127,11 @@ namespace OpenSim.Region.CoreModules.UDP.Linden // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); } + protected void ShowPQueuesReport(string module, string[] cmd) + { + MainConsole.Instance.Output(GetPQueuesReport(cmd)); + } + protected void ShowQueuesReport(string module, string[] cmd) { MainConsole.Instance.Output(GetQueuesReport(cmd)); @@ -155,6 +168,80 @@ namespace OpenSim.Region.CoreModules.UDP.Linden ""); } + + /// + /// Generate UDP Queue data report for each client + /// + /// + /// + protected string GetPQueuesReport(string[] showParams) + { + bool showChildren = false; + string pname = ""; + + if (showParams.Length > 2 && showParams[2] == "full") + showChildren = true; + else if (showParams.Length > 3) + pname = showParams[2] + " " + showParams[3]; + + StringBuilder report = new StringBuilder(); + + int columnPadding = 2; + int maxNameLength = 18; + int maxRegionNameLength = 14; + 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.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 3", + "Pri 4", + "Pri 5", + "Pri 6", + "Pri 7", + "Pri 8", + "Pri 9", + "Pri 10", + "Pri 11"); + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is LLClientView) + { + bool isChild = scene.PresenceChildStatus(client.AgentId); + 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.AppendLine(((LLClientView)client).EntityUpdateQueue.ToString()); + } + }); + } + } + + return report.ToString(); + } + /// /// Generate UDP Queue data report for each client /// @@ -163,10 +250,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden protected string GetQueuesReport(string[] showParams) { bool showChildren = false; + string pname = ""; if (showParams.Length > 2 && showParams[2] == "full") showChildren = true; - + else if (showParams.Length > 3) + pname = showParams[2] + " " + showParams[3]; + StringBuilder report = new StringBuilder(); int columnPadding = 2; @@ -224,6 +314,9 @@ namespace OpenSim.Region.CoreModules.UDP.Linden return; string name = client.Name; + if (pname != "" && name != pname) + return; + string regionName = scene.RegionInfo.RegionName; report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); @@ -249,10 +342,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden protected string GetThrottlesReport(string[] showParams) { bool showChildren = false; + string pname = ""; if (showParams.Length > 2 && showParams[2] == "full") showChildren = true; - + else if (showParams.Length > 3) + pname = showParams[2] + " " + showParams[3]; + StringBuilder report = new StringBuilder(); int columnPadding = 2; @@ -314,6 +410,9 @@ namespace OpenSim.Region.CoreModules.UDP.Linden return; string name = client.Name; + if (pname != "" && name != pname) + return; + string regionName = scene.RegionInfo.RegionName; LLUDPClient llUdpClient = llClient.UDPClient; -- cgit v1.1 From 024c12abc3aa42432e55e322141cad1edeb5bad1 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Mon, 25 Apr 2011 10:44:41 -0700 Subject: Cleaned up various configuration options. Removed the category throttle limits because the only ones used now are the defaults (which are overwritten by the client throttles anyway). Updated the default rates to correspond to about 350kbps. Also added a configuration to disable adaptive throttle. The default is the previous behavior (no adaptation). --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index ddbc079..db17d8f 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -398,7 +398,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden if (client is LLClientView) { LLClientView llClient = client as LLClientView; - + if (firstClient) { report.AppendLine(GetServerThrottlesReport(llClient.UDPServer)); @@ -451,7 +451,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden int maxRegionNameLength = 14; int maxTypeLength = 4; - string name = "SERVER AGENT LIMITS"; + string name = "SERVER AGENT RATES"; report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); report.Append(GetColumnEntry("-", maxRegionNameLength, columnPadding)); @@ -461,13 +461,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden report.AppendFormat( "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", (throttleRates.Total * 8) / 1000, - (throttleRates.ResendLimit * 8) / 1000, - (throttleRates.LandLimit * 8) / 1000, - (throttleRates.WindLimit * 8) / 1000, - (throttleRates.CloudLimit * 8) / 1000, - (throttleRates.TaskLimit * 8) / 1000, - (throttleRates.TextureLimit * 8) / 1000, - (throttleRates.AssetLimit * 8) / 1000); + (throttleRates.Resend * 8) / 1000, + (throttleRates.Land * 8) / 1000, + (throttleRates.Wind * 8) / 1000, + (throttleRates.Cloud * 8) / 1000, + (throttleRates.Task * 8) / 1000, + (throttleRates.Texture * 8) / 1000, + (throttleRates.Asset * 8) / 1000); return report.ToString(); } -- cgit v1.1 From 8755a48cde6ee77f421bef07e8b95cf8b68a76ed Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 6 May 2011 00:34:04 +0100 Subject: fix command display for debugging 'emergency-monitoring' --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index db17d8f..bdebbfb 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -107,7 +107,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden scene.AddCommand( this, "emergency-monitoring", - "Go on/off emergency monitoring mode", + "emergency-monitoring", "Go on/off emergency monitoring mode", "Go on/off emergency monitoring mode", EmergencyMonitoring); -- cgit v1.1 From fd44540c023e7df35308a40df9e61d7f9273eba4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 6 May 2011 01:06:28 +0100 Subject: add descriptive explanations for region restart functionality --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 1 - 1 file changed, 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index bdebbfb..62e6fae 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -111,7 +111,6 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "Go on/off emergency monitoring mode", "Go on/off emergency monitoring mode", EmergencyMonitoring); - } public void RemoveRegion(Scene scene) -- cgit v1.1 From 3d095e84d63e97e88bcb946498eba14de81705b4 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 6 May 2011 22:45:03 +0100 Subject: minor: remove mono compiler warnings --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 62e6fae..8f8124e 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -189,7 +189,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden 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)); -- cgit v1.1 From 8129e64e2acea6509d5c3a80425f6aa68baa037c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 31 May 2011 19:25:01 +0100 Subject: Fill in the new OwnerData field in the LLUDP ScriptDialog message. If we don't do this then viewer 2.8 crashes. Resolves http://opensimulator.org/mantis/view.php?id=5510 --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 4b6e52e..88db20e 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1177,7 +1177,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server IRC_SendChannelPrivmsg(objectname,url); } - public void SendDialog(string objectname, UUID objectID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) + public void SendDialog(string objectname, UUID objectID, UUID ownerID, string ownerFirstName, string ownerLastName, string msg, UUID textureID, int ch, string[] buttonlabels) { } -- cgit v1.1 From 4cdc8806fbc0d0d9b0ff878b30a4491b347cf2dc Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 23 Jul 2011 11:39:32 +0100 Subject: Fix LLTextBox to work with the updated libOMV --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 88db20e..3335f2e 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1678,7 +1678,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { } - public void SendTextBoxRequest(string message, int chatChannel, string objectname, string ownerFirstName, string ownerLastName, UUID objectId) + public void SendTextBoxRequest(string message, int chatChannel, string objectname, UUID ownerID, string ownerFirstName, string ownerLastName, UUID objectId) { } -- cgit v1.1 From 2964467708871f5932c46ad04e002a5506dd7732 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 3 Aug 2011 22:11:05 +0100 Subject: get rid of vestigal move to parameters --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 3335f2e..a0c1ab1 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -806,7 +806,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event ScriptReset OnScriptReset; public event GetScriptRunning OnGetScriptRunning; public event SetScriptRunning OnSetScriptRunning; - public event UpdateVector OnAutoPilotGo; + public event Action OnAutoPilotGo; public event TerrainUnacked OnUnackedTerrain; public event ActivateGesture OnActivateGesture; public event DeactivateGesture OnDeactivateGesture; -- cgit v1.1 From 92e96d394a1712ed16b0a7835dd2ccfde01f3fee Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 9 Aug 2011 23:11:07 +0100 Subject: When an NPC is created, stop telling neighbouring regions to expect a child agent --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index a0c1ab1..8ebf9cb 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -677,7 +677,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event DeRezObject OnDeRezObject; public event Action OnRegionHandShakeReply; public event GenericCall1 OnRequestWearables; - public event GenericCall1 OnCompleteMovementToRegion; + public event Action OnCompleteMovementToRegion; public event UpdateAgent OnPreAgentUpdate; public event UpdateAgent OnAgentUpdate; public event AgentRequestSit OnAgentRequestSit; @@ -913,7 +913,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server if (OnCompleteMovementToRegion != null) { - OnCompleteMovementToRegion(this); + OnCompleteMovementToRegion(this, true); } } -- cgit v1.1 From 5d6c9644faf6aeac38410af9cff97adfef88d7aa Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 10 Aug 2011 01:47:37 +0100 Subject: early code to allow scripts to force npcs not to fly when moving to target this is to allow walking on prims. it will be up to the script writer to be sure that there is a continuous path. currently implemented in osNpcMoveToTarget(), but none of this is final. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 8ebf9cb..15201da 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -806,7 +806,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event ScriptReset OnScriptReset; public event GetScriptRunning OnGetScriptRunning; public event SetScriptRunning OnSetScriptRunning; - public event Action OnAutoPilotGo; + public event Action OnAutoPilotGo; public event TerrainUnacked OnUnackedTerrain; public event ActivateGesture OnActivateGesture; public event DeactivateGesture OnDeactivateGesture; -- cgit v1.1 From c1a34cd8da293e63d3cba70b5271c9a297789db2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 18 Aug 2011 00:53:05 +0100 Subject: Don't try to save changed attachment states when an NPC with attachments is removed from the scene. This is done by introducing a PresenceType enum into ScenePresence which currently has two values, User and Npc. This seems better than a SaveAttachments flag in terms of code comprehension, though I'm still slightly uneasy about introducing these semantics to core objects --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 15201da..c413634 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -893,7 +893,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Start() { - Scene.AddNewClient(this); + Scene.AddNewClient(this, PresenceType.User); // Mimicking LLClientView which gets always set appearance from client. Scene scene = (Scene)Scene; -- cgit v1.1 From d358125cac4e01194dae4b1f0bc9afc87e463f76 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 22 Sep 2011 00:16:05 +0100 Subject: Reinstate option to land an npc when it reaches a target. This is moved into ScenePresence for now as a general facility --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index c413634..f6656c2 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -806,7 +806,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event ScriptReset OnScriptReset; public event GetScriptRunning OnGetScriptRunning; public event SetScriptRunning OnSetScriptRunning; - public event Action OnAutoPilotGo; + public event Action OnAutoPilotGo; public event TerrainUnacked OnUnackedTerrain; public event ActivateGesture OnActivateGesture; public event DeactivateGesture OnDeactivateGesture; -- cgit v1.1 From aa19ccf65c9cd235e0ba941e9832c5240df4412c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 14 Oct 2011 01:45:46 +0100 Subject: refactor: rename IClientAPI.SendPrimUpdate() to SendEntityUpdate() since it sends entity updates (including presence ones), not just prims. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index f6656c2..84f45a8 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1062,7 +1062,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendPrimUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) + public void SendEntityUpdate(ISceneEntity entity, PrimUpdateFlags updateFlags) { } -- cgit v1.1 From 120114e96becc6fee1311300359dcefaf4013c0e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 17 Oct 2011 20:50:29 +0100 Subject: refactor: Make IClientAPI.DebugPacketFormat a property rather than a setter without a getter --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 84f45a8..8e9647e 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -866,10 +866,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server #pragma warning restore 67 - public void SetDebugPacketLevel(int newDebug) - { - - } + public int DebugPacketLevel { get; set; } public void InPacket(object NewPack) { -- cgit v1.1 From c7dd7b13a2058fa6855e2e78f1dbb83e9a806f95 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 6 Nov 2011 20:38:07 +0000 Subject: Convert SendKillObject to take a list of uint rather than sending one packet per prim. More to come as we change to make use of this. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 8e9647e..380570b 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -934,7 +934,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendKillObject(ulong regionHandle, uint localID) + public void SendKillObject(ulong regionHandle, List localID) { } -- cgit v1.1 From f61e54892f2284b6f89bacf3069467c05b2eea11 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Dec 2011 18:34:23 +0000 Subject: On a new client circuit, send the initial reply ack to let the client know it's live before sending other data. This means that avatar/appearance data of other avatars and scene objects for a client will be sent after the ack rather than possibly before. This may stop some avatars appearing grey on login. This introduces a new OpenSim.Framework.ISceneAgent to accompany the existing OpenSim.Framework.ISceneObject and ISceneEntity This allows IClientAPI to handle this as it can't reference OpenSim.Region.Framework.Interfaces --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 380570b..70326b7 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -55,6 +55,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private UUID m_agentID = UUID.Random(); + public ISceneAgent SceneAgent { get; private set; } + private string m_username; private string m_nick; @@ -547,6 +549,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server m_connected = false; m_client.Close(); + SceneAgent = null; } public UUID SessionId @@ -890,12 +893,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Start() { - Scene.AddNewClient(this, PresenceType.User); + SceneAgent = m_scene.AddNewClient(this, PresenceType.User); // Mimicking LLClientView which gets always set appearance from client. - Scene scene = (Scene)Scene; AvatarAppearance appearance; - scene.GetAvatarAppearance(this, out appearance); + m_scene.GetAvatarAppearance(this, out appearance); OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone()); } -- cgit v1.1 From af3cd00048fb6476eb5140bcfccda926627363f2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 9 Dec 2011 23:07:53 +0000 Subject: Get rid of IScene.PresenceChildStatus() which always had to execute a lookup in favour of IClientAPI.ISceneAgent.IsChildAgent instead. --- .../Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 8f8124e..c754019 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -219,7 +219,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden { if (client is LLClientView) { - bool isChild = scene.PresenceChildStatus(client.AgentId); + bool isChild = client.SceneAgent.IsChildAgent; if (isChild && !showChildren) return; @@ -308,7 +308,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden { if (client is IStatsCollector) { - bool isChild = scene.PresenceChildStatus(client.AgentId); + bool isChild = client.SceneAgent.IsChildAgent; if (isChild && !showChildren) return; @@ -404,7 +404,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden firstClient = false; } - bool isChild = scene.PresenceChildStatus(client.AgentId); + bool isChild = client.SceneAgent.IsChildAgent; if (isChild && !showChildren) return; -- cgit v1.1 From 3a91085ac2364c80b53275886c8130a4b1f0e62f Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 10 Dec 2011 15:17:34 +0000 Subject: Implement handler for TeleportCancel inbound packet --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 70326b7..32de85f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -677,6 +677,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event RequestAvatarProperties OnRequestAvatarProperties; public event SetAlwaysRun OnSetAlwaysRun; public event TeleportLandmarkRequest OnTeleportLandmarkRequest; + public event TeleportCancel OnTeleportCancel; public event DeRezObject OnDeRezObject; public event Action OnRegionHandShakeReply; public event GenericCall1 OnRequestWearables; -- cgit v1.1 From 5ea9740f1b2cc98601cfb15c19e190471c4c42ed Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 5 Jan 2012 22:40:49 +0000 Subject: Add a "j2k decode" region console command that allows a manual request for a JPEG2000 decode of an asset For debugging purposes. --- .../Agent/TextureSender/J2KDecoderCommandModule.cs | 145 +++++++++++++++++++++ 1 file changed, 145 insertions(+) create mode 100644 OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs new file mode 100644 index 0000000..b224132 --- /dev/null +++ b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs @@ -0,0 +1,145 @@ +/* + * Copyright (c) Contributors, http://opensimulator.org/ + * See CONTRIBUTORS.TXT for a full list of copyright holders. + * + * Redistribution and use in source and binary forms, with or without + * modification, are permitted provided that the following conditions are met: + * * Redistributions of source code must retain the above copyright + * notice, this list of conditions and the following disclaimer. + * * Redistributions in binary form must reproduce the above copyright + * notice, this list of conditions and the following disclaimer in the + * documentation and/or other materials provided with the distribution. + * * Neither the name of the OpenSimulator Project nor the + * names of its contributors may be used to endorse or promote products + * derived from this software without specific prior written permission. + * + * THIS SOFTWARE IS PROVIDED BY THE DEVELOPERS ``AS IS'' AND ANY + * EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED + * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE + * DISCLAIMED. IN NO EVENT SHALL THE CONTRIBUTORS BE LIABLE FOR ANY + * DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES + * (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; + * LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND + * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT + * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS + * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. + */ + +using System; +using System.Collections.Generic; +using System.IO; +using System.Reflection; +using System.Text; +using log4net; +using Mono.Addins; +using Nini.Config; +using OpenMetaverse; +using OpenSim.Framework; +using OpenSim.Framework.Console; +using OpenSim.Region.Framework.Interfaces; +using OpenSim.Region.Framework.Scenes; + +namespace OpenSim.Region.OptionalModules.Agent.TextureSender +{ + /// + /// Commands for the J2KDecoder module. For debugging purposes. + /// + /// + /// Placed here so that they can be removed if not required and to keep the J2KDecoder module itself simple. + /// + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "J2KDecoderCommandModule")] + public class J2KDecoderCommandModule : ISharedRegionModule + { +// 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); + + if (m_scene == null) + m_scene = scene; + + MainConsole.Instance.Commands.AddCommand( + "j2k", + false, + "j2k decode", + "j2k decode ", + "Do JPEG2000 decoding of an asset.", + "This is for debugging purposes. The asset id given must contain JPEG2000 data.", + HandleDecode); + } + + void HandleDecode(string module, string[] args) + { + if (args.Length < 3) + { + MainConsole.Instance.Output("Usage is j2k decode "); + return; + } + + UUID assetId; + string rawAssetId = args[2]; + + if (!UUID.TryParse(rawAssetId, out assetId)) + { + 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; + } + + if (asset.Type != (sbyte)AssetType.Texture) + { + MainConsole.Instance.OutputFormat("ERROR: Asset {0} is not a texture type", assetId); + return; + } + + IJ2KDecoder decoder = m_scene.RequestModuleInterface(); + if (decoder == null) + { + MainConsole.Instance.OutputFormat("ERROR: No IJ2KDecoder module available"); + return; + } + + if (decoder.Decode(assetId, asset.Data)) + MainConsole.Instance.OutputFormat("Successfully decoded asset {0}", assetId); + else + MainConsole.Instance.OutputFormat("Decode of asset {0} failed", assetId); } + } +} \ No newline at end of file -- cgit v1.1 From b86e7715a8d8f081fa9452d92a9d8f6d52867a12 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 5 Jan 2012 22:54:33 +0000 Subject: Improve "j2k decode" command to tell us how many layers and components were decoded, instead of just success/failure --- .../Agent/TextureSender/J2KDecoderCommandModule.cs | 16 +++++++++++++--- 1 file changed, 13 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs index b224132..439096a 100644 --- a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs @@ -34,6 +34,7 @@ using log4net; using Mono.Addins; using Nini.Config; using OpenMetaverse; +using OpenMetaverse.Imaging; using OpenSim.Framework; using OpenSim.Framework.Console; using OpenSim.Region.Framework.Interfaces; @@ -137,9 +138,18 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender return; } - if (decoder.Decode(assetId, asset.Data)) - MainConsole.Instance.OutputFormat("Successfully decoded asset {0}", assetId); + OpenJPEG.J2KLayerInfo[] layers; + int components; + if (decoder.Decode(assetId, asset.Data, out layers, out components)) + { + MainConsole.Instance.OutputFormat( + "Successfully decoded asset {0} with {1} layers and {2} components", + assetId, layers.Length, components); + } else - MainConsole.Instance.OutputFormat("Decode of asset {0} failed", assetId); } + { + MainConsole.Instance.OutputFormat("Decode of asset {0} failed", assetId); + } + } } } \ No newline at end of file -- cgit v1.1 From ef074deb52de617743ad50ea29e286dd9c66722d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 10 Jan 2012 21:30:12 +0000 Subject: Add "show image queue " region console command This is so that we can inspect the image download queue (texture download via udp) for debugging purposes. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 89 +++++++++++++++++++++- 1 file changed, 88 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index c754019..16f6821 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -95,7 +95,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "Show queue data for each client", "Without the 'full' option, only root agents are shown." + " With the 'full' option child agents are also shown.", - ShowQueuesReport); + ShowQueuesReport); + + scene.AddCommand( + this, "show image queue", + "show image queue ", + "Show the image queue (textures downloaded via UDP) for a particular client.", + ShowImageQueuesReport); scene.AddCommand( this, "show throttles", @@ -135,6 +141,11 @@ namespace OpenSim.Region.CoreModules.UDP.Linden { MainConsole.Instance.Output(GetQueuesReport(cmd)); } + + protected void ShowImageQueuesReport(string module, string[] cmd) + { + MainConsole.Instance.Output(GetImageQueuesReport(cmd)); + } protected void ShowThrottlesReport(string module, string[] cmd) { @@ -240,6 +251,82 @@ namespace OpenSim.Region.CoreModules.UDP.Linden return report.ToString(); } + + /// + /// Generate an image queue report + /// + /// + /// + private string GetImageQueuesReport(string[] showParams) + { + if (showParams.Length < 5 || showParams.Length > 6) + { + MainConsole.Instance.OutputFormat("Usage: show image queue [full]"); + return ""; + } + + string firstName = showParams[3]; + string lastName = showParams[4]; + + bool showChildAgents = showParams.Length == 6; + + List foundAgents = new List(); + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + ScenePresence sp = scene.GetScenePresence(firstName, lastName); + if (sp != null && (showChildAgents || !sp.IsChildAgent)) + foundAgents.Add(sp); + } + } + + if (foundAgents.Count == 0) + { + MainConsole.Instance.OutputFormat("No agents found for {0} {1}", firstName, lastName); + return ""; + } + + StringBuilder report = new StringBuilder(); + + foreach (ScenePresence agent in foundAgents) + { + LLClientView client = agent.ControllingClient as LLClientView; + + if (client == null) + { + MainConsole.Instance.OutputFormat("This command is only supported for LLClientView"); + return ""; + } + + 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( + "{0,-36} {1,-8} {2,-9} {3,-9} {4,-9} {5,-7}\n", + "Texture ID", + "Last Seq", + "Priority", + "Start Pkt", + "Has Asset", + "Decoded"); + + foreach (J2KImage image in images) + report.AppendFormat( + "{0,36} {1,8} {2,9} {3,10} {4,9} {5,7}\n", + image.TextureID, image.LastSequence, image.Priority, image.StartPacket, image.HasAsset, image.IsDecoded); + } + } + + return report.ToString(); + } /// /// Generate UDP Queue data report for each client -- cgit v1.1 From 5002f06d24d3e9fde5d38ba8ee7e37bc9c139f89 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 10 Jan 2012 21:36:35 +0000 Subject: rename "show image queue" to "show image queues" in line with other udp info commands. Eliminate redundant one line methods --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 37 +++++----------------- 1 file changed, 8 insertions(+), 29 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 16f6821..58b9b9f 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -87,7 +87,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "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.", - ShowPQueuesReport); + (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); scene.AddCommand( this, "show queues", @@ -95,13 +95,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "Show queue data for each client", "Without the 'full' option, only root agents are shown." + " With the 'full' option child agents are also shown.", - ShowQueuesReport); + (mod, cmd) => MainConsole.Instance.Output(GetQueuesReport(cmd))); scene.AddCommand( - this, "show image queue", - "show image queue ", - "Show the image queue (textures downloaded via UDP) for a particular client.", - ShowImageQueuesReport); + this, "show image queues", + "show image queues ", + "Show the image queues (textures downloaded via UDP) for a particular client.", + (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); scene.AddCommand( this, "show throttles", @@ -109,7 +109,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "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.", - ShowThrottlesReport); + (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); scene.AddCommand( this, "emergency-monitoring", @@ -130,26 +130,6 @@ namespace OpenSim.Region.CoreModules.UDP.Linden public void RegionLoaded(Scene scene) { // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); - } - - protected void ShowPQueuesReport(string module, string[] cmd) - { - MainConsole.Instance.Output(GetPQueuesReport(cmd)); - } - - protected void ShowQueuesReport(string module, string[] cmd) - { - MainConsole.Instance.Output(GetQueuesReport(cmd)); - } - - protected void ShowImageQueuesReport(string module, string[] cmd) - { - MainConsole.Instance.Output(GetImageQueuesReport(cmd)); - } - - protected void ShowThrottlesReport(string module, string[] cmd) - { - MainConsole.Instance.Output(GetThrottlesReport(cmd)); } protected void EmergencyMonitoring(string module, string[] cmd) @@ -177,7 +157,6 @@ namespace OpenSim.Region.CoreModules.UDP.Linden entry.Length > maxLength ? entry.Substring(0, maxLength) : entry, ""); } - /// /// Generate UDP Queue data report for each client @@ -261,7 +240,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden { if (showParams.Length < 5 || showParams.Length > 6) { - MainConsole.Instance.OutputFormat("Usage: show image queue [full]"); + MainConsole.Instance.OutputFormat("Usage: show image queues [full]"); return ""; } -- cgit v1.1 From 53fb20880c4cdf72b4f28fd9a458f8f224766a7c Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 10 Jan 2012 22:02:35 +0000 Subject: minor: Fix wrong column length in image queues report --- .../Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 58b9b9f..db70e56 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -289,7 +289,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden if (images.Length > 0) { report.AppendFormat( - "{0,-36} {1,-8} {2,-9} {3,-9} {4,-9} {5,-7}\n", + "{0,-36} {1,-8} {2,-10} {3,-9} {4,-9} {5,-7}\n", "Texture ID", "Last Seq", "Priority", @@ -299,7 +299,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden foreach (J2KImage image in images) report.AppendFormat( - "{0,36} {1,8} {2,9} {3,10} {4,9} {5,7}\n", + "{0,36} {1,8} {2,10} {3,10} {4,9} {5,7}\n", image.TextureID, image.LastSequence, image.Priority, image.StartPacket, image.HasAsset, image.IsDecoded); } } -- cgit v1.1 From c92a9a664035ad4c36a0ac905751d105770dca51 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 19 Jan 2012 19:49:06 +0000 Subject: Add "image queues clear " console command This allows a way to manually clear pending image queue requests for debug purposes --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 75 +++++++++++++++++----- 1 file changed, 60 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index db70e56..95aa864 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -79,7 +79,19 @@ namespace OpenSim.Region.CoreModules.UDP.Linden // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} ADDED", scene.RegionInfo.RegionName); lock (m_scenes) - m_scenes[scene.RegionInfo.RegionID] = scene; + m_scenes[scene.RegionInfo.RegionID] = scene; + + scene.AddCommand( + this, "image queues clear", + "image queues clear ", + "Clear the image queues (textures downloaded via UDP) for a particular client.", + (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); + + scene.AddCommand( + this, "show image queues", + "image queues show ", + "Show the image queues (textures downloaded via UDP) for a particular client.", + (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); scene.AddCommand( this, "show pqueues", @@ -116,7 +128,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "emergency-monitoring", "Go on/off emergency monitoring mode", "Go on/off emergency monitoring mode", - EmergencyMonitoring); + HandleEmergencyMonitoring); } public void RemoveRegion(Scene scene) @@ -132,7 +144,49 @@ namespace OpenSim.Region.CoreModules.UDP.Linden // m_log.DebugFormat("[LINDEN UDP INFO MODULE]: REGION {0} LOADED", scene.RegionInfo.RegionName); } - protected void EmergencyMonitoring(string module, string[] cmd) + protected string HandleImageQueuesClear(string[] cmd) + { + if (cmd.Length != 5) + return "Usage: image queues clear "; + + string firstName = cmd[3]; + string lastName = cmd[4]; + + List foundAgents = new List(); + + lock (m_scenes) + { + foreach (Scene scene in m_scenes.Values) + { + ScenePresence sp = scene.GetScenePresence(firstName, lastName); + if (sp != null) + foundAgents.Add(sp); + } + } + + if (foundAgents.Count == 0) + return string.Format("No agents found for {0} {1}", firstName, lastName); + + StringBuilder report = new StringBuilder(); + + foreach (ScenePresence agent in foundAgents) + { + LLClientView client = agent.ControllingClient as LLClientView; + + if (client == null) + return "This command is only supported for LLClientView"; + + int requestsDeleted = client.ImageManager.ClearImageQueue(); + + report.AppendFormat( + "In region {0} ({1} agent) cleared {2} requests\n", + agent.Scene.RegionInfo.RegionName, agent.IsChildAgent ? "child" : "root", requestsDeleted); + } + + return report.ToString(); + } + + protected void HandleEmergencyMonitoring(string module, string[] cmd) { bool mode = true; if (cmd.Length == 1 || (cmd.Length > 1 && cmd[1] == "on")) @@ -239,10 +293,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden private string GetImageQueuesReport(string[] showParams) { if (showParams.Length < 5 || showParams.Length > 6) - { - MainConsole.Instance.OutputFormat("Usage: show image queues [full]"); - return ""; - } + return "Usage: show image queues [full]"; string firstName = showParams[3]; string lastName = showParams[4]; @@ -262,10 +313,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden } if (foundAgents.Count == 0) - { - MainConsole.Instance.OutputFormat("No agents found for {0} {1}", firstName, lastName); - return ""; - } + return string.Format("No agents found for {0} {1}", firstName, lastName); StringBuilder report = new StringBuilder(); @@ -274,10 +322,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden LLClientView client = agent.ControllingClient as LLClientView; if (client == null) - { - MainConsole.Instance.OutputFormat("This command is only supported for LLClientView"); - return ""; - } + return "This command is only supported for LLClientView"; J2KImage[] images = client.ImageManager.GetImages(); -- cgit v1.1 From b6f3de5028ab9a288f60b020a0dffda079dc550d Mon Sep 17 00:00:00 2001 From: BlueWall Date: Fri, 20 Jan 2012 23:50:37 -0500 Subject: Telehub Support: Support for viewer side of telehub management. Can manupulate Telehubs and SpawnPoints from the viewer estate managemnt tools. This is a work in progress and does not yet persist or affect teleport routing. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 32de85f..bbf3729 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -658,6 +658,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event ModifyTerrain OnModifyTerrain; public event BakeTerrain OnBakeTerrain; public event EstateChangeInfo OnEstateChangeInfo; + public event EstateManageTelehub OnEstateManageTelehub; public event SetAppearance OnSetAppearance; public event AvatarNowWearing OnAvatarNowWearing; public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; @@ -1530,6 +1531,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } + public void SendTelehubInfo(UUID ObjectID, string ObjectName, Vector3 ObjectPos, Quaternion ObjectRot, List SpawnPoint) + { + + } + public void SendMapItemReply(mapItemReply[] replies, uint mapitemtype, uint flags) { -- cgit v1.1 From 7e76397a264042e772855be5245b64b35336744a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 24 Jan 2012 20:54:35 +0000 Subject: minor: correct text and usage for "image queues show" reigon console command. --- .../Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 95aa864..261029c 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -88,7 +88,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); scene.AddCommand( - this, "show image queues", + this, "image queues show", "image queues show ", "Show the image queues (textures downloaded via UDP) for a particular client.", (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); @@ -293,7 +293,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden private string GetImageQueuesReport(string[] showParams) { if (showParams.Length < 5 || showParams.Length > 6) - return "Usage: show image queues [full]"; + return "Usage: image queues show [full]"; string firstName = showParams[3]; string lastName = showParams[4]; -- cgit v1.1 From 447a66d66005c5ec54a786d1d0a532738729251c Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 2 Feb 2012 23:40:56 +0000 Subject: Replace ParcelAccessEntry with a new struct, LandAccessEntry, which more accurately reflects the data sent by the viewer. Add times bans and the expiration of timed bans. Warning: Contains a Migration (and nuts) --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index bbf3729..11f927c 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1253,7 +1253,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendLandAccessListData(List avatars, uint accessFlag, int localLandID) + public void SendLandAccessListData(List accessList, uint accessFlag, int localLandID) { } -- cgit v1.1 From 5c545d1d2e0a1862d063a1bdf80d2cd2fa311101 Mon Sep 17 00:00:00 2001 From: PixelTomsen Date: Fri, 3 Feb 2012 22:02:36 +0100 Subject: Fix: Covenant changed time not set http://opensimulator.org/mantis/view.php?id=5869 Signed-off-by: BlueWall --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 11f927c..c928af7 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1243,7 +1243,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, string abuseEmail, UUID estateOwner) + public void SendDetailedEstateData(UUID invoice, string estateName, uint estateID, uint parentEstate, uint estateFlags, uint sunPosition, UUID covenant, uint covenantChanged, string abuseEmail, UUID estateOwner) { } -- cgit v1.1 From f67f37074f3f7e0602b66aa66a044dd9fd107f6a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Feb 2012 05:02:33 +0000 Subject: Stop spurious scene loop startup timeout alarms for scenes with many prims. On the first frame, all startup scene objects are added to the physics scene. This can cause a considerable delay, so we don't start raising the alarm on scene loop timeouts until the second frame. This commit also slightly changes the behaviour of timeout reporting. Previously, a report was made for the very first timed out thread, ignoring all others until the next watchdog check. Instead, we now report every timed out thread, though we still only do this once no matter how long the timeout. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- .../OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index c928af7..d3c96e2 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -70,7 +70,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server m_client = client; m_scene = scene; - Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false); + Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false, true); } private void SendServerCommand(string command) diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs index eb39026..a7c5020 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs @@ -57,7 +57,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server m_listener.Start(50); - Watchdog.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false); + Watchdog.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false, true); m_baseScene = baseScene; } -- cgit v1.1 From 749c3fef8ad2d3af97fcd9ab9c72740675e46715 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 8 Mar 2012 01:51:37 +0000 Subject: Change "help" to display categories/module list then "help " to display commands in a category. This is to deal with the hundred lines of command splurge when one previously typed "help" Modelled somewhat on the mysql console One can still type help to get per command help at any point. Categories capitalized to avoid conflict with the all-lowercase commands (except for commander system, as of yet). Does not affect command parsing or any other aspects of the console apart from the help system. Backwards compatible with existing modules. --- .../Agent/TextureSender/J2KDecoderCommandModule.cs | 2 +- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 14 +++++++------- 2 files changed, 8 insertions(+), 8 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs index 439096a..c897aa5 100644 --- a/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/TextureSender/J2KDecoderCommandModule.cs @@ -92,7 +92,7 @@ namespace OpenSim.Region.OptionalModules.Agent.TextureSender m_scene = scene; MainConsole.Instance.Commands.AddCommand( - "j2k", + "Assets", false, "j2k decode", "j2k decode ", diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 261029c..a7ebecc 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -82,19 +82,19 @@ namespace OpenSim.Region.CoreModules.UDP.Linden m_scenes[scene.RegionInfo.RegionID] = scene; scene.AddCommand( - this, "image queues clear", + "Comms", this, "image queues clear", "image queues clear ", "Clear the image queues (textures downloaded via UDP) for a particular client.", (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); scene.AddCommand( - this, "image queues show", + "Comms", this, "image queues show", "image queues show ", "Show the image queues (textures downloaded via UDP) for a particular client.", (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); scene.AddCommand( - this, "show pqueues", + "Comms", this, "show pqueues", "show pqueues [full]", "Show priority queue data for each client", "Without the 'full' option, only root agents are shown." @@ -102,7 +102,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); scene.AddCommand( - this, "show queues", + "Comms", this, "show queues", "show queues [full]", "Show queue data for each client", "Without the 'full' option, only root agents are shown." @@ -110,13 +110,13 @@ namespace OpenSim.Region.CoreModules.UDP.Linden (mod, cmd) => MainConsole.Instance.Output(GetQueuesReport(cmd))); scene.AddCommand( - this, "show image queues", + "Comms", this, "show image queues", "show image queues ", "Show the image queues (textures downloaded via UDP) for a particular client.", (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); scene.AddCommand( - this, "show throttles", + "Comms", this, "show throttles", "show throttles [full]", "Show throttle settings for each client and for the server overall", "Without the 'full' option, only root agents are shown." @@ -124,7 +124,7 @@ namespace OpenSim.Region.CoreModules.UDP.Linden (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); scene.AddCommand( - this, "emergency-monitoring", + "Comms", this, "emergency-monitoring", "emergency-monitoring", "Go on/off emergency monitoring mode", "Go on/off emergency monitoring mode", -- cgit v1.1 From 1a8769e6eff0eab750a528f27d127637edbd292b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 21 Mar 2012 23:57:39 +0000 Subject: Instead of loading default avatar animations in both SLUtil and AvatarAnimations, load just in AvatarAnimations instead. This lets us remove the dependency of OpenSim.Framework.dll on data/avataranimations.xml, which is not necessary for ROBUST. This commit also takes care of the odd situation where animations are stored and used internally with uppercase names (e.g. "STAND") but scripts refer to them with lowercase names (e.g. "sit"). --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index d3c96e2..5cf478a 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1203,11 +1203,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public UUID GetDefaultAnimation(string name) - { - return UUID.Zero; - } - public void SendAvatarProperties(UUID avatarID, string aboutText, string bornOn, byte[] charterMember, string flAbout, uint flags, UUID flImageID, UUID imageID, string profileURL, UUID partnerID) { -- cgit v1.1 From d9f7b8549b3cb9699eb8bd54242d31aac0f8241a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 28 Mar 2012 23:40:25 +0100 Subject: Simplify friends caching by only doing this for root agents - no functions require caching for child agents. This allows us to avoid unnecessary multiple calls to the friends service. All friends functions originate from the root agent and only go to other root agents in existing code. This also allows us to eliminate complex ref counting. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 5cf478a..43548e6 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private UUID m_agentID = UUID.Random(); - public ISceneAgent SceneAgent { get; private set; } + public ISceneAgent SceneAgent { get; set; } private string m_username; private string m_nick; @@ -895,7 +895,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Start() { - SceneAgent = m_scene.AddNewClient(this, PresenceType.User); + m_scene.AddNewClient(this, PresenceType.User); // Mimicking LLClientView which gets always set appearance from client. AvatarAppearance appearance; -- cgit v1.1 From 93ac47f0d3968650bd7758ad0981e8e5d49b8138 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 29 Mar 2012 01:08:47 +0100 Subject: Revert "Simplify friends caching by only doing this for root agents - no functions require caching for child agents." We need to cache child agents so that friends object edit/delete permissions will work across boarders on regions hosted by different simulators. This reverts commit d9f7b8549b3cb9699eb8bd54242d31aac0f8241a. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 43548e6..5cf478a 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private UUID m_agentID = UUID.Random(); - public ISceneAgent SceneAgent { get; set; } + public ISceneAgent SceneAgent { get; private set; } private string m_username; private string m_nick; @@ -895,7 +895,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Start() { - m_scene.AddNewClient(this, PresenceType.User); + SceneAgent = m_scene.AddNewClient(this, PresenceType.User); // Mimicking LLClientView which gets always set appearance from client. AvatarAppearance appearance; -- cgit v1.1 From 22a85b947a16074525343a56203211806ce16834 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 29 Mar 2012 01:26:30 +0100 Subject: Add back parts of reverted changes that were not concerned with child agent caching. This adds ScenePresence to IClientAPI.SceneAgent earlier on in the add client process so that its information is available to EventManager.OnNewClient() and OnClientLogin() Also add a code comment as to why we're caching friend information for child agents. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 5cf478a..43548e6 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -55,7 +55,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server private UUID m_agentID = UUID.Random(); - public ISceneAgent SceneAgent { get; private set; } + public ISceneAgent SceneAgent { get; set; } private string m_username; private string m_nick; @@ -895,7 +895,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Start() { - SceneAgent = m_scene.AddNewClient(this, PresenceType.User); + m_scene.AddNewClient(this, PresenceType.User); // Mimicking LLClientView which gets always set appearance from client. AvatarAppearance appearance; -- cgit v1.1 From cf080a68d657e082dd61dacc24ffd17240154e90 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 13 Jun 2012 23:42:22 +0100 Subject: Remove long obsolete and unused IClientAPI.KillEndDone() --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 43548e6..3a32528 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1626,11 +1626,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void KillEndDone() - { - - } - public bool AddGenericPacketHandler(string MethodName, GenericMessage handler) { return true; -- cgit v1.1 From 3b3d9967b18335c28ce2dfc269e47bac0ede075a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Jul 2012 23:29:57 +0100 Subject: Remove IClientAPI.GetClientEP() in favour of existing identical IClientAPI.RemoteEndpoint. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 ----- 1 file changed, 5 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 3a32528..363a1b8 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1431,11 +1431,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server Disconnect(); } - public EndPoint GetClientEP() - { - return null; - } - public ClientInfo GetClientInfo() { return new ClientInfo(); -- cgit v1.1 From dda999a22c5f36d1d413f2f5f29ce8782af85b0b Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 12 Jul 2012 23:43:02 +0100 Subject: Remove IClientIPEndpoint client interface for now. This may well come back in the future when this subinterface is actually used but it currently isn't and I feel the name was poor. Everything uses IClientAPI.RemoveEndPoint which also returned the full endpoint rather than just the ip address. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 363a1b8..5043208 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -44,7 +44,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { public delegate void OnIRCClientReadyDelegate(IRCClientView cv); - public class IRCClientView : IClientAPI, IClientCore, IClientIPEndpoint + public class IRCClientView : IClientAPI, IClientCore { public event OnIRCClientReadyDelegate OnIRCReady; @@ -1628,15 +1628,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server #endregion - #region Implementation of IClientIPEndpoint - - public IPAddress EndPoint - { - get { return ((IPEndPoint) m_client.Client.RemoteEndPoint).Address; } - } - - #endregion - public void SendRebakeAvatarTextures(UUID textureID) { } -- cgit v1.1 From ef8570f78918510f2f92fce7cffdb49674bad928 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 24 Jul 2012 23:39:31 +0100 Subject: Extend region console "show queues" command to show already collected time since last packeted received by the simulator from a viewer. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 42 ++++++++++++---------- 1 file changed, 24 insertions(+), 18 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index a7ebecc..906c1d4 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -373,17 +373,22 @@ namespace OpenSim.Region.CoreModules.UDP.Linden 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,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n", + "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7} {12,7}\n", + "Since", + "Pkts", "Pkts", "Pkts", - "Pkts", "Bytes", "Q Pkts", "Q Pkts", @@ -396,7 +401,8 @@ namespace OpenSim.Region.CoreModules.UDP.Linden report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( - "{0,7} {1,7} {2,7} {3,9} {4,7} {5,7} {6,7} {7,7} {8,7} {9,8} {10,7} {11,7}\n", + "{0,7} {1,7} {2,7} {3,7} {4,9} {5,7} {6,7} {7,7} {8,7} {9,7} {10,8} {11,7} {12,7}\n", + "Last In", "In", "Out", "Resent", @@ -417,22 +423,22 @@ namespace OpenSim.Region.CoreModules.UDP.Linden scene.ForEachClient( delegate(IClientAPI client) { - if (client is IStatsCollector) - { - bool isChild = client.SceneAgent.IsChildAgent; - if (isChild && !showChildren) - return; - - string name = client.Name; - if (pname != "" && name != pname) - return; + 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)); + 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)); + if (client is IStatsCollector) + { IStatsCollector stats = (IStatsCollector)client; report.AppendLine(stats.Report()); -- cgit v1.1 From 1427430b7b0049ff4b312766737dc0e907c1c56d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 24 Jul 2012 23:48:53 +0100 Subject: Add information about each column to "show queues" region console command help. --- .../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 906c1d4..7c14c02 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -105,8 +105,15 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "Comms", this, "show queues", "show queues [full]", "Show queue data for each client", - "Without the 'full' option, only root agents are shown." - + " With the 'full' option child agents are also shown.", + "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" + + "Since Last In - Time in milliseconds since last packet received.\n" + + "Pkts In - Number of packets processed from the client.\n" + + "Pkts Out - Number of packets sent to the client.\n" + + "Pkts Resent - Number of packets resent to the client.\n" + + "Bytes Unacked - Number of bytes transferred to the client that are awaiting acknowledgement.\n" + + "Q Pkts * - Number of packets of various types (land, wind, etc.) to be sent to the client that are waiting for available bandwidth.\n", (mod, cmd) => MainConsole.Instance.Output(GetQueuesReport(cmd))); scene.AddCommand( -- cgit v1.1 From 3cf8edfd681b3372fb5ecde96d88d4f20fcdcefa Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 24 Jul 2012 23:51:04 +0100 Subject: Rename "image queues clear" console command to "clear image queues" There is less justification for this word arrangement (verb after noun) now that command help is categorized. Also removes "image queues show" in favour of existing alias "show image queues". --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 18 ++++++------------ 1 file changed, 6 insertions(+), 12 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 7c14c02..ca9bd4a 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -82,18 +82,6 @@ namespace OpenSim.Region.CoreModules.UDP.Linden m_scenes[scene.RegionInfo.RegionID] = scene; scene.AddCommand( - "Comms", this, "image queues clear", - "image queues clear ", - "Clear the image queues (textures downloaded via UDP) for a particular client.", - (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); - - scene.AddCommand( - "Comms", this, "image queues show", - "image queues show ", - "Show the image queues (textures downloaded via UDP) for a particular client.", - (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); - - scene.AddCommand( "Comms", this, "show pqueues", "show pqueues [full]", "Show priority queue data for each client", @@ -121,6 +109,12 @@ namespace OpenSim.Region.CoreModules.UDP.Linden "show image queues ", "Show the image queues (textures downloaded via UDP) for a particular client.", (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); + + scene.AddCommand( + "Comms", this, "clear image queues", + "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", -- cgit v1.1 From 35efa88c26d249d315837fdca0faf643511e1a4e Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 25 Jul 2012 23:11:50 +0100 Subject: Rename OpenSim.Framework.Statistics to OpenSim.Framework.Monitoring. This better reflects the long-term purpose of that project and matches Monitoring modules. --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index ca9bd4a..5fe5948 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -35,7 +35,7 @@ using Nini.Config; using OpenMetaverse; using OpenSim.Framework; using OpenSim.Framework.Console; -using OpenSim.Framework.Statistics; +using OpenSim.Framework.Monitoring; using OpenSim.Region.ClientStack.LindenUDP; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -- cgit v1.1 From 5aec0ff207e9427b8756471eb003fd68859f67b1 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 25 Jul 2012 23:27:00 +0100 Subject: Move Watchdog and MemoryWatchdog classes into OpenSim.Framework.Monitoring with other monitoring code from OpenSim.Framework --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 1 + .../OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs | 1 + 2 files changed, 2 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 5043208..bae25cd 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -38,6 +38,7 @@ using OpenMetaverse; using OpenMetaverse.Packets; using OpenSim.Framework; using OpenSim.Framework.Client; +using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs index a7c5020..9d27386 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs @@ -34,6 +34,7 @@ using System.Text; using System.Threading; using log4net; using OpenSim.Framework; +using OpenSim.Framework.Monitoring; using OpenSim.Region.Framework.Scenes; namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server -- cgit v1.1 From bcbd450fe441e94d6c0f547055b4e95f75a5b0d0 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 20 Aug 2012 20:24:54 +0100 Subject: Add --force flag to "kick user" console command to allow bypassing of recent race condition checks. This is to allow a second attempt to remove an avatar even if "show connections" shows them as already inactive (i.e. close has already been attempted once). You should only attempt --force if a normal kick fails. This is partly for diagnostics as we have seen some connections occasionally remain on lbsa plaza even if they are registered as inactive. This is not a permanent solution and may not work anyway - the ultimate solution is to stop this problem from happening in the first place. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index bae25cd..e93bd7c 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -886,6 +886,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Close() { + Close(false); + } + + public void Close(bool force) + { Disconnect(); } -- cgit v1.1 From c13a99dc5cc82efac5497dab27dcb6b0d9865cea Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 25 Oct 2012 03:26:12 +0100 Subject: Fix script error messages not showing up in viewer 3 and associated viewers. Viewer 3 will discard such a message if the chat message owner does not match the avatar. We were filling the ownerID with the primID, so this never matched, hence viewer 3 did not see any script error messages. This commit fills the ownerID in with the prim ownerID so the script owner will receive script error messages. This does not affect viewer 1 and associated viewers which continue to process script errors as normal. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index e93bd7c..781539a 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -954,7 +954,8 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendChatMessage(string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, byte source, byte audible) + public void SendChatMessage( + string message, byte type, Vector3 fromPos, string fromName, UUID fromAgentID, UUID ownerID, byte source, byte audible) { if (audible > 0 && message.Length > 0) IRC_SendChannelPrivmsg(fromName, message); -- cgit v1.1 From abef034d1b4f3553384b43b33da2b6993d6437b6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sun, 11 Nov 2012 16:10:47 -0800 Subject: One more module converted: IRCStackModule. --- .../InternetRelayClientView/IRCStackModule.cs | 54 ++++++++++++++-------- 1 file changed, 35 insertions(+), 19 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs index cfe1278..406b715 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/IRCStackModule.cs @@ -25,6 +25,7 @@ * SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */ +using System; using System.Net; using System.Reflection; using log4net; @@ -33,49 +34,51 @@ using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; using OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server; +using Mono.Addins; + namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView { - public class IRCStackModule : IRegionModule + [Extension(Path = "/OpenSim/RegionModules", NodeName = "RegionModule", Id = "IRCStackModule")] + public class IRCStackModule : INonSharedRegionModule { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); private IRCServer m_server; + private int m_Port; // private Scene m_scene; + private bool m_Enabled; - #region Implementation of IRegionModule + #region Implementation of INonSharedRegionModule - public void Initialise(Scene scene, IConfigSource source) + public void Initialise(IConfigSource source) { if (null != source.Configs["IRCd"] && - source.Configs["IRCd"].GetBoolean("Enabled",false)) + source.Configs["IRCd"].GetBoolean("Enabled", false)) { - int portNo = source.Configs["IRCd"].GetInt("Port",6666); -// m_scene = scene; - m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), portNo, scene); - m_server.OnNewIRCClient += m_server_OnNewIRCClient; + m_Enabled = true; + m_Port = source.Configs["IRCd"].GetInt("Port", 6666); } } - void m_server_OnNewIRCClient(IRCClientView user) + public void AddRegion(Scene scene) { - user.OnIRCReady += user_OnIRCReady; + if (!m_Enabled) + return; + + m_server = new IRCServer(IPAddress.Parse("0.0.0.0"), m_Port, scene); + m_server.OnNewIRCClient += m_server_OnNewIRCClient; } - void user_OnIRCReady(IRCClientView cv) + public void RegionLoaded(Scene scene) { - m_log.Info("[IRCd] Adding user..."); - cv.Start(); - m_log.Info("[IRCd] Added user to Scene"); } - public void PostInitialise() + public void RemoveRegion(Scene scene) { - } public void Close() { - } public string Name @@ -83,11 +86,24 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView get { return "IRCClientStackModule"; } } - public bool IsSharedModule + public Type ReplaceableInterface { - get { return false; } + get { return null; } } #endregion + + void m_server_OnNewIRCClient(IRCClientView user) + { + user.OnIRCReady += user_OnIRCReady; + } + + void user_OnIRCReady(IRCClientView cv) + { + m_log.Info("[IRCd] Adding user..."); + cv.Start(); + m_log.Info("[IRCd] Added user to Scene"); + } + } } -- cgit v1.1 From 18c5d33f0a6ccd08261e753f7bc9834708a1c777 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Tue, 13 Nov 2012 09:48:56 -0800 Subject: All optional modules' directives moved out of addin.xml --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 5fe5948..992f38e 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -40,7 +40,7 @@ using OpenSim.Region.ClientStack.LindenUDP; using OpenSim.Region.Framework.Interfaces; using OpenSim.Region.Framework.Scenes; -namespace OpenSim.Region.CoreModules.UDP.Linden +namespace OpenSim.Region.OptionalModules.UDP.Linden { /// /// A module that just holds commands for inspecting the current state of the Linden UDP stack. -- cgit v1.1 From 7bf33d333af6e7393a05940d1ab436f5dce73814 Mon Sep 17 00:00:00 2001 From: Melanie Date: Thu, 7 Feb 2013 22:25:28 +0000 Subject: Plumb the path from the client to the extra physics params and back --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 781539a..0ac56fa 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1678,5 +1678,10 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void SendPlacesReply(UUID queryID, UUID transactionID, PlacesReplyData[] data) { } + + public void SendPartPhysicsProprieties(ISceneEntity entity) + { + } + } } -- cgit v1.1 From 293a024c141d3567d42169f625bc449b89a1b59d Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 22 Apr 2013 22:24:41 +0200 Subject: Allow callers to set the invoice parameter for GenericMessage --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 0ac56fa..915ebd8 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -971,12 +971,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server // TODO } - public void SendGenericMessage(string method, List message) + public void SendGenericMessage(string method, UUID invoice, List message) { } - public void SendGenericMessage(string method, List message) + public void SendGenericMessage(string method, UUID invoice, List message) { } -- cgit v1.1 From 33aaa40bee37ca4d8a3afa10fbbea7c1be3a1d58 Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Wed, 8 May 2013 13:13:51 -0700 Subject: Adds an event and a method so that handling of the CachedTexture packet can be pulled out of LLClientView and moved to AvatarFactory. The first pass at reusing textures (turned off by default) is included. When reusing textures, if the baked textures from a previous login are still in the asset service (which generally means that they are in the simulator's cache) then the avatar will not need to rebake. This is both a performance improvement (specifically that an avatars baked textures do not need to be sent to other users who have the old textures cached) and a resource improvement (don't have to deal with duplicate bakes in the asset service cache). --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 915ebd8..3644856 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -660,6 +660,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event BakeTerrain OnBakeTerrain; public event EstateChangeInfo OnEstateChangeInfo; public event EstateManageTelehub OnEstateManageTelehub; + public event CachedTextureRequest OnCachedTextureRequest; public event SetAppearance OnSetAppearance; public event AvatarNowWearing OnAvatarNowWearing; public event RezSingleAttachmentFromInv OnRezSingleAttachmentFromInv; @@ -938,7 +939,12 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { } + + public void SendCachedTextureResponse(ISceneEntity avatar, int serial, List cachedTextures) + { + } + public void SendStartPingCheck(byte seq) { -- cgit v1.1 From 3290cd09d3ecd45c52bd131ada2a793c48fd99dc Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Thu, 9 May 2013 18:12:17 +0100 Subject: remove pointless region handle paramter from IClientAPI.SendKillObject() --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 3644856..384eb1f 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -950,7 +950,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public void SendKillObject(ulong regionHandle, List localID) + public void SendKillObject(List localID) { } -- cgit v1.1 From 681fbda4b6b9700421b82dc639f954c60871542e Mon Sep 17 00:00:00 2001 From: Mic Bowman Date: Fri, 24 May 2013 13:18:16 -0700 Subject: This is an experimental patch that adds support for comparing texture hashes for the purpose of accurately responding to AgentTextureCached packets. There is a change to IClientAPI to report the wearbles hashes that come in through the SetAppearance packet. Added storage of the texture hashes in the appearance. While these are added to the Pack/Unpack (with support for missing values) routines (which means Simian will store them properly), they are not currently persisted in Robust. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 384eb1f..118635d 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -907,7 +907,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server // Mimicking LLClientView which gets always set appearance from client. AvatarAppearance appearance; m_scene.GetAvatarAppearance(this, out appearance); - OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone()); + OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(), new List()); } public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) -- cgit v1.1 From 533bbf033df88fd231eb0e7d2b0aa5a0058163ea Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 25 May 2013 02:08:54 +0100 Subject: Update the money framework to allow sending the new style linden "serverside is now viewerside" messages regarding currency This will require all money modules to be refactored! --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 118635d..3726191 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1056,7 +1056,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { } - public void SendMoneyBalance(UUID transaction, bool success, byte[] description, int balance) + 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) { } @@ -1196,11 +1196,6 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server } - public bool AddMoney(int debit) - { - return true; - } - public void SendSunPos(Vector3 sunPos, Vector3 sunVel, ulong CurrentTime, uint SecondsPerSunCycle, uint SecondsPerYear, float OrbitalPosition) { -- cgit v1.1 From 1b265b213b65076ee346d85f62d2d61a72ea3ca6 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 10 Jul 2013 16:09:45 -0700 Subject: Added show client-stats [first last] command to expose what viewers are requesting. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 109 ++++++++++++++++++++- 1 file changed, 107 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 992f38e..b1aec81 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -27,6 +27,7 @@ using System; using System.Collections.Generic; +using System.Linq; using System.Reflection; using System.Text; using log4net; @@ -51,7 +52,7 @@ 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(); @@ -130,6 +131,15 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Go on/off emergency monitoring mode", "Go on/off emergency monitoring mode", HandleEmergencyMonitoring); + + scene.AddCommand( + "Comms", this, "show client-stats", + "show client-stats [first_name last_name]", + "Show client request stats", + "Without the 'first_name last_name' option, all clients are shown." + + " With the 'first_name last_name' option only a specific client is shown.", + (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); + } public void RemoveRegion(Scene scene) @@ -587,6 +597,101 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden (throttleRates.Asset * 8) / 1000); return report.ToString(); - } + } + + /// + /// Show client stats data + /// + /// + /// + protected string HandleClientStatsReport(string[] showParams) + { + // NOTE: This writes to m_log on purpose. We want to store this information + // in case we need to analyze it later. + // + if (showParams.Length <= 3) + { + m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,6} {3,11} {4, 10}", "Region", "Name", "Root", "Time", "Reqs/min"); + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is LLClientView) + { + LLClientView llClient = client as LLClientView; + ClientInfo cinfo = llClient.UDPClient.GetClientInfo(); + int avg_reqs = cinfo.AsyncRequests.Count + cinfo.GenericRequests.Count + cinfo.SyncRequests.Count; + avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); + + m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,4} {3,9}min {4,10}", + scene.RegionInfo.RegionName, llClient.Name, + (llClient.SceneAgent.IsChildAgent ? "N" : "Y"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); + } + }); + } + return string.Empty; + } + + string fname = "", lname = ""; + + if (showParams.Length > 2) + fname = showParams[2]; + if (showParams.Length > 3) + lname = showParams[3]; + + foreach (Scene scene in m_scenes.Values) + { + scene.ForEachClient( + delegate(IClientAPI client) + { + if (client is LLClientView) + { + LLClientView llClient = client as LLClientView; + + if (llClient.Name == fname + " " + lname) + { + + ClientInfo cinfo = llClient.GetClientInfo(); + AgentCircuitData aCircuit = scene.AuthenticateHandler.GetAgentCircuitData(llClient.CircuitCode); + if (aCircuit == null) // create a dummy one + aCircuit = new AgentCircuitData(); + + if (!llClient.SceneAgent.IsChildAgent) + m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, aCircuit.Viewer, aCircuit.Id0); + + int avg_reqs = cinfo.AsyncRequests.Count + cinfo.GenericRequests.Count + cinfo.SyncRequests.Count; + avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); + + m_log.InfoFormat("[INFO]:"); + m_log.InfoFormat("[INFO]: {0} # {1} # Time: {2}min # Avg Reqs/min: {3}", scene.RegionInfo.RegionName, + (llClient.SceneAgent.IsChildAgent ? "Child" : "Root"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); + + Dictionary sortedDict = (from entry in cinfo.AsyncRequests orderby entry.Value descending select entry) + .ToDictionary(pair => pair.Key, pair => pair.Value); + + m_log.InfoFormat("[INFO]: {0,25}", "TOP ASYNC"); + foreach (KeyValuePair kvp in sortedDict.Take(12)) + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + + m_log.InfoFormat("[INFO]:"); + sortedDict = (from entry in cinfo.SyncRequests orderby entry.Value descending select entry) + .ToDictionary(pair => pair.Key, pair => pair.Value); + m_log.InfoFormat("[INFO]: {0,25}", "TOP SYNC"); + foreach (KeyValuePair kvp in sortedDict.Take(12)) + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + + m_log.InfoFormat("[INFO]:"); + sortedDict = (from entry in cinfo.GenericRequests orderby entry.Value descending select entry) + .ToDictionary(pair => pair.Key, pair => pair.Value); + m_log.InfoFormat("[INFO]: {0,25}", "TOP GENERIC"); + foreach (KeyValuePair kvp in sortedDict.Take(12)) + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + } + } + }); + } + return string.Empty; + } } } \ No newline at end of file -- cgit v1.1 From bdaeb02863cb56e0d543b1e97eb3356571911f90 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Wed, 10 Jul 2013 17:14:20 -0700 Subject: show client stats: Fixed the requests/min. Also changed the spelling of the command, not without the dash. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 43 +++++++++++----------- 1 file changed, 22 insertions(+), 21 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index b1aec81..79509ab 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -133,8 +133,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden HandleEmergencyMonitoring); scene.AddCommand( - "Comms", this, "show client-stats", - "show client-stats [first_name last_name]", + "Comms", this, "show client stats", + "show client stats [first_name last_name]", "Show client request stats", "Without the 'first_name last_name' option, all clients are shown." + " With the 'first_name last_name' option only a specific client is shown.", @@ -609,7 +609,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden // NOTE: This writes to m_log on purpose. We want to store this information // in case we need to analyze it later. // - if (showParams.Length <= 3) + if (showParams.Length <= 4) { m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,6} {3,11} {4, 10}", "Region", "Name", "Root", "Time", "Reqs/min"); foreach (Scene scene in m_scenes.Values) @@ -621,7 +621,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden { LLClientView llClient = client as LLClientView; ClientInfo cinfo = llClient.UDPClient.GetClientInfo(); - int avg_reqs = cinfo.AsyncRequests.Count + cinfo.GenericRequests.Count + cinfo.SyncRequests.Count; + int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,4} {3,9}min {4,10}", @@ -635,10 +635,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden string fname = "", lname = ""; - if (showParams.Length > 2) - fname = showParams[2]; if (showParams.Length > 3) - lname = showParams[3]; + fname = showParams[3]; + if (showParams.Length > 4) + lname = showParams[4]; foreach (Scene scene in m_scenes.Values) { @@ -660,7 +660,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden if (!llClient.SceneAgent.IsChildAgent) m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, aCircuit.Viewer, aCircuit.Id0); - int avg_reqs = cinfo.AsyncRequests.Count + cinfo.GenericRequests.Count + cinfo.SyncRequests.Count; + int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); m_log.InfoFormat("[INFO]:"); @@ -669,29 +669,30 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden Dictionary sortedDict = (from entry in cinfo.AsyncRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); + PrintRequests("TOP ASYNC", sortedDict, cinfo.AsyncRequests.Values.Sum()); - m_log.InfoFormat("[INFO]: {0,25}", "TOP ASYNC"); - foreach (KeyValuePair kvp in sortedDict.Take(12)) - m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); - - m_log.InfoFormat("[INFO]:"); sortedDict = (from entry in cinfo.SyncRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - m_log.InfoFormat("[INFO]: {0,25}", "TOP SYNC"); - foreach (KeyValuePair kvp in sortedDict.Take(12)) - m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + PrintRequests("TOP SYNC", sortedDict, cinfo.SyncRequests.Values.Sum()); - m_log.InfoFormat("[INFO]:"); sortedDict = (from entry in cinfo.GenericRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - m_log.InfoFormat("[INFO]: {0,25}", "TOP GENERIC"); - foreach (KeyValuePair kvp in sortedDict.Take(12)) - m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + PrintRequests("TOP GENERIC", sortedDict, cinfo.GenericRequests.Values.Sum()); } } }); } return string.Empty; - } + } + + private void PrintRequests(string type, Dictionary sortedDict, int sum) + { + m_log.InfoFormat("[INFO]:"); + m_log.InfoFormat("[INFO]: {0,25}", type); + foreach (KeyValuePair kvp in sortedDict.Take(12)) + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + m_log.InfoFormat("[INFO]: {0,25}", "..."); + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum); + } } } \ No newline at end of file -- cgit v1.1 From e5c677779b8501c245e5399240ffe3ca2519ec72 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 19 Jul 2013 00:16:09 +0100 Subject: Add measure of number of inbound AgentUpdates that were seen as significant to "show client stats" (i.e. sent on for further processing instead of being discarded) Added here since it was the most convenient place Number is in the last column, "Sig. AgentUpdates" along with percentage of all AgentUpdates Percentage largely falls over time, most cpu for processing AgentUpdates may be in UDP processing as turning this off even earlier (with "debug lludp toggle agentupdate" results in a big cpu fall Also tidies up display. --- .../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 12 +++++++++--- 1 file changed, 9 insertions(+), 3 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 79509ab..c208b38 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -611,7 +611,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden // if (showParams.Length <= 4) { - m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,6} {3,11} {4, 10}", "Region", "Name", "Root", "Time", "Reqs/min"); + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "Sig. AgentUpdates"); foreach (Scene scene in m_scenes.Values) { scene.ForEachClient( @@ -624,9 +624,15 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); - m_log.InfoFormat("[INFO]: {0,-12} {1,20} {2,4} {3,9}min {4,10}", + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11}/min {5,-16}", scene.RegionInfo.RegionName, llClient.Name, - (llClient.SceneAgent.IsChildAgent ? "N" : "Y"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); + llClient.SceneAgent.IsChildAgent ? "N" : "Y", + (DateTime.Now - cinfo.StartedTime).Minutes, + avg_reqs, + string.Format( + "{0}, {1}%", + llClient.TotalSignificantAgentUpdates, + (float)llClient.TotalSignificantAgentUpdates / cinfo.SyncRequests["AgentUpdate"] * 100)); } }); } -- cgit v1.1 From 61eda1f441092eb12936472de2dc73898e40aa16 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 19 Jul 2013 00:51:13 +0100 Subject: Make the check as to whether any particular inbound AgentUpdate packet is significant much earlier in UDP processing (i.e. before we pointlessly place such packets on internal queues, etc.) Appears to have some impact on cpu but needs testing. --- .../Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index c208b38..3e6067d 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -611,7 +611,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden // if (showParams.Length <= 4) { - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "Sig. AgentUpdates"); + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "Sig. AgentUpdates"); foreach (Scene scene in m_scenes.Values) { scene.ForEachClient( @@ -624,7 +624,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11}/min {5,-16}", + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", scene.RegionInfo.RegionName, llClient.Name, llClient.SceneAgent.IsChildAgent ? "N" : "Y", (DateTime.Now - cinfo.StartedTime).Minutes, -- cgit v1.1 From 174105ad028c5ed318850238d97aa7c3b1d7f207 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Fri, 19 Jul 2013 22:11:32 -0700 Subject: Fixed the stats in show client stats. Also left some comments with observations about AgentUpdates. --- .../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 3e6067d..15dea17 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -611,7 +611,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden // if (showParams.Length <= 4) { - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "Sig. AgentUpdates"); + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "AgentUpdates"); foreach (Scene scene in m_scenes.Values) { scene.ForEachClient( @@ -630,9 +630,9 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs, string.Format( - "{0}, {1}%", - llClient.TotalSignificantAgentUpdates, - (float)llClient.TotalSignificantAgentUpdates / cinfo.SyncRequests["AgentUpdate"] * 100)); + "{0} ({1:0.00}%)", + llClient.TotalAgentUpdates, + (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100)); } }); } -- cgit v1.1 From d5a1779465b6d875ebe5822ce6f15df3378b759f Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 20 Jul 2013 12:20:35 -0700 Subject: Manage AgentUpdates more sanely: - The existing event to scene has been split into 2: OnAgentUpdate and OnAgentCameraUpdate, to better reflect the two types of updates that the viewer sends. We can run one without the other, which is what happens when the avie is still but the user is camming around - Added thresholds (as opposed to equality) to determine whether the update is significant or not. I thin these thresholds are ok, but we can play with them later - Ignore updates of HeadRotation, which were problematic and aren't being used up stream --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 1 + 1 file changed, 1 insertion(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 3726191..9b69da3 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -687,6 +687,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public event Action OnCompleteMovementToRegion; public event UpdateAgent OnPreAgentUpdate; public event UpdateAgent OnAgentUpdate; + public event UpdateAgent OnAgentCameraUpdate; public event AgentRequestSit OnAgentRequestSit; public event AgentSit OnAgentSit; public event AvatarPickerRequest OnAvatarPickerRequest; -- cgit v1.1 From b5ab0698d6328c90d779c2af29914da840335233 Mon Sep 17 00:00:00 2001 From: Diva Canto Date: Sat, 20 Jul 2013 17:58:32 -0700 Subject: EDIT BEAMS!!! They had been missing from OpenSim since ever. Thanks to lkalif for telling me how to route the information. The viewer effect is under the distance filter, so only avatars with cameras < 10m away see the beams. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 9b69da3..23a435d 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1673,7 +1673,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server { } - public void StopFlying(ISceneEntity presence) + public void SendAgentTerseUpdate(ISceneEntity presence) { } -- cgit v1.1 From dc74a50225a901e969ea83008555170f5742ca7a Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Wed, 4 Sep 2013 23:48:24 +0100 Subject: Stop "show client stats" from throwing an exception if somehow Scene.m_clientManager still retains a reference to a dead client. Instead, "show client stats" now prints "Off!" so that exception is not thrown and we know which entries in ClientManager are in this state. There's a race condition which could trigger this, but the window is extremely short and exceptions would not be thrown consistently (which is the behaviour observed). It should otherwise be impossible for this condition to occur, so there may be a weakness in client manager IClientAPI removal. --- .../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 15dea17..1eb0a6b 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -624,9 +624,16 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); + string childAgentStatus; + + if (llClient.SceneAgent != null) + 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}", scene.RegionInfo.RegionName, llClient.Name, - llClient.SceneAgent.IsChildAgent ? "N" : "Y", + childAgentStatus, (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs, string.Format( -- cgit v1.1 From 2cd95fac736cc99b1a2ad661e4a03810225ffaca Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 27 Sep 2013 22:27:39 +0100 Subject: refactor: Rename Scene.AddNewClient() to AddNewAgent() to make it obvious in the code that this is symmetric with CloseAgent() --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index 23a435d..a4fc4ae 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -903,7 +903,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public void Start() { - m_scene.AddNewClient(this, PresenceType.User); + m_scene.AddNewAgent(this, PresenceType.User); // Mimicking LLClientView which gets always set appearance from client. AvatarAppearance appearance; -- cgit v1.1 From 5b73b9c4a85335ba837280688b903fef44be8f35 Mon Sep 17 00:00:00 2001 From: Melanie Date: Wed, 11 Dec 2013 01:39:56 +0000 Subject: Committing the Avination Scene Presence and related texture code - Parts of region crossing code - New bakes handling code - Bakes now sent from sim to sim without central storage - Appearance handling changes - Some changes to sitting - A number of unrelated fixes and improvements --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index a4fc4ae..b3fdd22 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -908,7 +908,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server // Mimicking LLClientView which gets always set appearance from client. AvatarAppearance appearance; m_scene.GetAvatarAppearance(this, out appearance); - OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(), new List()); + OnSetAppearance(this, appearance.Texture, (byte[])appearance.VisualParams.Clone(),appearance.AvatarSize, new WearableCacheItem[0]); } public void SendRegionHandshake(RegionInfo regionInfo, RegionHandshakeArgs args) -- cgit v1.1 From 2d2bea4aa75ff6e82384f0842fe3719bf946b1cc Mon Sep 17 00:00:00 2001 From: Robert Adams Date: Thu, 26 Dec 2013 22:45:59 -0800 Subject: varregion: many more updates removing the constant RegionSize and replacing with a passed region size. This time in the map code and grid services code. --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index b3fdd22..c8320d0 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -516,7 +516,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server public Vector3 StartPos { - get { return new Vector3(((int)Constants.RegionSize * 0.5f), ((int)Constants.RegionSize * 0.5f), 50); } + get { return new Vector3(m_scene.RegionInfo.RegionSizeX * 0.5f, m_scene.RegionInfo.RegionSizeY * 0.5f, 50f); } set { } } -- cgit v1.1 From 4a9796a50680ef7aeaa8c9c617b90205724879c8 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Jan 2014 19:31:31 +0000 Subject: Skip IClientAPIs that don't implement IStatsCollector (such as NPCAvatar) from the "show queues" console report to stop screwing up formatting. "show pquques" already did this --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 30 +++++++++++----------- 1 file changed, 15 insertions(+), 15 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 1eb0a6b..3bf5585 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -434,24 +434,24 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden scene.ForEachClient( delegate(IClientAPI client) { - 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)); - if (client is IStatsCollector) { - IStatsCollector stats = (IStatsCollector)client; + + 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)); + + IStatsCollector stats = (IStatsCollector)client; report.AppendLine(stats.Report()); } }); -- cgit v1.1 From c9b5ba78d959e6368a525630fecc6103f317f1da Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Jan 2014 19:36:12 +0000 Subject: minor: correct the usage statement on the "show image queues" console command - should not have been "image queues show" --- OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 3bf5585..034082e 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -304,7 +304,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden private string GetImageQueuesReport(string[] showParams) { if (showParams.Length < 5 || showParams.Length > 6) - return "Usage: image queues show [full]"; + return "Usage: show image queues [full]"; string firstName = showParams[3]; string lastName = showParams[4]; -- cgit v1.1 From fea8345f560370d20e13f8362fc8f63396c2247f Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Jan 2014 19:40:14 +0000 Subject: minor: remove long unused state queue from "show queues" console reports --- .../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 034082e..ec18db0 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -395,7 +395,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden 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} {12,7}\n", + "{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", "Pkts", "Pkts", @@ -407,12 +407,11 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Q Pkts", "Q Pkts", "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} {12,7}\n", + "{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", "Last In", "In", "Out", @@ -424,8 +423,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Cloud", "Task", "Texture", - "Asset", - "State"); + "Asset"); lock (m_scenes) { -- cgit v1.1 From 921f0052f43e0e4553e970a8d560c5635fcd3ca6 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Sun, 8 Dec 2013 16:50:24 +0200 Subject: Get the full viewer name even if it's (incorrectly) sent in the 'Channel' field Recent versions of Firestorm and Singularity have started sending the viewer name in the 'Channel' field, leaving only their version number in the 'Viewer' field. So we need to search both of these fields for the viewer name. This resolves http://opensimulator.org/mantis/view.php?id=6952 --- .../Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index ec18db0..44d4e93 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -669,7 +669,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden aCircuit = new AgentCircuitData(); if (!llClient.SceneAgent.IsChildAgent) - m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, aCircuit.Viewer, aCircuit.Id0); + m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0); int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); @@ -706,4 +706,4 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum); } } -} \ No newline at end of file +} -- cgit v1.1 From 998d7009a65def0a4debc9369d35b63611db5b55 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Tue, 22 Apr 2014 20:04:12 +0300 Subject: Eliminated many warnings --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 ++ 1 file changed, 2 insertions(+) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index c8320d0..e1aaf18 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -1426,9 +1426,11 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server return new byte[0]; } +#pragma warning disable 0067 public event ViewerEffectEventHandler OnViewerEffect; public event Action OnLogout; public event Action OnConnectionClosed; +#pragma warning restore 0067 public void SendBlueBoxMessage(UUID FromAvatarID, string FromAvatarName, string Message) { -- cgit v1.1 From 5d534127663899cd5592c865b1d00855fce25854 Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Sun, 29 Jun 2014 16:40:11 +0300 Subject: Write UDP statistics to the log, not just the console (e.g., "show queues") --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 69 ++++++++++++---------- 1 file changed, 37 insertions(+), 32 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 44d4e93..2637b00 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -87,8 +87,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "show pqueues [full]", "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.", - (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); + + " With the 'full' option child agents are also shown.", + (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + GetPQueuesReport(cmd))); scene.AddCommand( "Comms", this, "show queues", @@ -103,27 +103,27 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden + "Pkts Resent - Number of packets resent to the client.\n" + "Bytes Unacked - Number of bytes transferred to the client that are awaiting acknowledgement.\n" + "Q Pkts * - Number of packets of various types (land, wind, etc.) to be sent to the client that are waiting for available bandwidth.\n", - (mod, cmd) => MainConsole.Instance.Output(GetQueuesReport(cmd))); + (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + GetQueuesReport(cmd))); scene.AddCommand( "Comms", this, "show image queues", "show image queues ", "Show the image queues (textures downloaded via UDP) for a particular client.", - (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); + (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + GetImageQueuesReport(cmd))); scene.AddCommand( "Comms", this, "clear image queues", "clear image queues ", "Clear the image queues (textures downloaded via UDP) for a particular client.", - (mod, cmd) => MainConsole.Instance.Output(HandleImageQueuesClear(cmd))); + (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + HandleImageQueuesClear(cmd))); scene.AddCommand( "Comms", this, "show throttles", "show throttles [full]", "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.", - (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); + + " With the 'full' option child agents are also shown.", + (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + GetThrottlesReport(cmd))); scene.AddCommand( "Comms", this, "emergency-monitoring", @@ -138,7 +138,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Show client request stats", "Without the 'first_name last_name' option, all clients are shown." + " With the 'first_name last_name' option only a specific client is shown.", - (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); + (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + HandleClientStatsReport(cmd))); } @@ -279,7 +279,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return; string name = client.Name; - if (pname != "" && name != pname) + if (pname != "" && name.ToLower() != pname.ToLower()) return; string regionName = scene.RegionInfo.RegionName; @@ -440,7 +440,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return; string name = client.Name; - if (pname != "" && name != pname) + if (pname != "" && name.ToLower() != pname.ToLower()) return; string regionName = scene.RegionInfo.RegionName; @@ -535,7 +535,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return; string name = client.Name; - if (pname != "" && name != pname) + if (pname != "" && name.ToLower() != pname.ToLower()) return; string regionName = scene.RegionInfo.RegionName; @@ -604,12 +604,12 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden /// protected string HandleClientStatsReport(string[] showParams) { - // NOTE: This writes to m_log on purpose. We want to store this information - // in case we need to analyze it later. - // + StringBuilder report = new StringBuilder(); + if (showParams.Length <= 4) { - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "AgentUpdates"); + report.AppendFormat("{0,-30} {1,-30} {2,-6} {3,-11} {4,-11} {5,-16}\n", "Region", "Name", "Root", "Time", "Reqs/min", "AgentUpdates"); + foreach (Scene scene in m_scenes.Values) { scene.ForEachClient( @@ -629,7 +629,10 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden else childAgentStatus = "Off!"; - m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", + int agentUpdates = 0; + cinfo.SyncRequests.TryGetValue("AgentUpdate", out agentUpdates); + + report.AppendFormat("{0,-30} {1,-30} {2,-6} {3,-11} {4,-11} {5,-16}\n", scene.RegionInfo.RegionName, llClient.Name, childAgentStatus, (DateTime.Now - cinfo.StartedTime).Minutes, @@ -637,11 +640,12 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden string.Format( "{0} ({1:0.00}%)", llClient.TotalAgentUpdates, - (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100)); + ((float)agentUpdates) / llClient.TotalAgentUpdates * 100)); } }); } - return string.Empty; + + return report.ToString(); } string fname = "", lname = ""; @@ -660,7 +664,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden { LLClientView llClient = client as LLClientView; - if (llClient.Name == fname + " " + lname) + if (llClient.Name.ToLower() == (fname + " " + lname).ToLower()) { ClientInfo cinfo = llClient.GetClientInfo(); @@ -669,41 +673,42 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden aCircuit = new AgentCircuitData(); if (!llClient.SceneAgent.IsChildAgent) - m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0); + report.AppendFormat("{0} # {1} # {2}\n", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0); int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); - m_log.InfoFormat("[INFO]:"); - m_log.InfoFormat("[INFO]: {0} # {1} # Time: {2}min # Avg Reqs/min: {3}", scene.RegionInfo.RegionName, + report.AppendLine(); + report.AppendFormat("{0} # {1} # Time: {2}min # Avg Reqs/min: {3}\n", scene.RegionInfo.RegionName, (llClient.SceneAgent.IsChildAgent ? "Child" : "Root"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); Dictionary sortedDict = (from entry in cinfo.AsyncRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests("TOP ASYNC", sortedDict, cinfo.AsyncRequests.Values.Sum()); + PrintRequests(report, "TOP ASYNC", sortedDict, cinfo.AsyncRequests.Values.Sum()); sortedDict = (from entry in cinfo.SyncRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests("TOP SYNC", sortedDict, cinfo.SyncRequests.Values.Sum()); + PrintRequests(report, "TOP SYNC", sortedDict, cinfo.SyncRequests.Values.Sum()); sortedDict = (from entry in cinfo.GenericRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests("TOP GENERIC", sortedDict, cinfo.GenericRequests.Values.Sum()); + PrintRequests(report, "TOP GENERIC", sortedDict, cinfo.GenericRequests.Values.Sum()); } } }); } - return string.Empty; + + return report.ToString(); } - private void PrintRequests(string type, Dictionary sortedDict, int sum) + private void PrintRequests(StringBuilder report, string type, Dictionary sortedDict, int sum) { - m_log.InfoFormat("[INFO]:"); - m_log.InfoFormat("[INFO]: {0,25}", type); + report.AppendLine(); + report.AppendFormat("{0,25}\n", type); foreach (KeyValuePair kvp in sortedDict.Take(12)) - m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); - m_log.InfoFormat("[INFO]: {0,25}", "..."); - m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum); + report.AppendFormat("{0,25} {1,-6}\n", kvp.Key, kvp.Value); + report.AppendFormat("{0,25}\n", "..."); + report.AppendFormat("{0,25} {1,-6}\n", "Total", sum); } } } -- cgit v1.1 From af3498efdbd0b165a7e37095b1d8a9e54723993c Mon Sep 17 00:00:00 2001 From: Oren Hurvitz Date: Sun, 29 Jun 2014 18:49:27 +0300 Subject: In "show throttles", show the maximum drip rate. This shows whether a client is being throttled due to past poor performance. --- .../OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 12 ++++++++---- 1 file changed, 8 insertions(+), 4 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 2637b00..6e8a1bf 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -487,7 +487,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); report.AppendFormat( - "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}\n", + "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}\n", + "Max", "Total", "Resend", "Land", @@ -499,7 +500,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( - "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", + "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}\n", + "kb/s", "kb/s", "kb/s", "kb/s", @@ -548,7 +550,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); report.AppendFormat( - "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", + "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}", + (ci.maxThrottle * 8) / 1000, (ci.totalThrottle * 8) / 1000, (ci.resendThrottle * 8) / 1000, (ci.landThrottle * 8) / 1000, @@ -584,7 +587,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden ThrottleRates throttleRates = udpServer.ThrottleRates; report.AppendFormat( - "{0,7} {1,8} {2,7} {3,7} {4,7} {5,7} {6,9} {7,7}", + "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}", + "-", (throttleRates.Total * 8) / 1000, (throttleRates.Resend * 8) / 1000, (throttleRates.Land * 8) / 1000, -- cgit v1.1 From cc61681484185f3c450fc0ab7efeb093c672d194 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 25 Jul 2014 01:56:41 +0100 Subject: Revert "Write UDP statistics to the log, not just the console (e.g., "show queues")" Fixes http://opensimulator.org/mantis/view.php?id=7280 It can't be done this way because the stats data needs to show up on the console at all log levels, not just debug. But this means setting it to log at fatal, which is not appropriate for this stuff in the log. I understand the desire but this has to be done some other way, perhaps by (yet another) config parameter. Also, this was already being done with the ClientStatsReport but that also should be done in another way, I think. This reverts commit 5d534127663899cd5592c865b1d00855fce25854. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 69 ++++++++++------------ 1 file changed, 32 insertions(+), 37 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 6e8a1bf..2ef3c4c 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -87,8 +87,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "show pqueues [full]", "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.", - (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + GetPQueuesReport(cmd))); + + " With the 'full' option child agents are also shown.", + (mod, cmd) => MainConsole.Instance.Output(GetPQueuesReport(cmd))); scene.AddCommand( "Comms", this, "show queues", @@ -103,27 +103,27 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden + "Pkts Resent - Number of packets resent to the client.\n" + "Bytes Unacked - Number of bytes transferred to the client that are awaiting acknowledgement.\n" + "Q Pkts * - Number of packets of various types (land, wind, etc.) to be sent to the client that are waiting for available bandwidth.\n", - (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + GetQueuesReport(cmd))); + (mod, cmd) => MainConsole.Instance.Output(GetQueuesReport(cmd))); scene.AddCommand( "Comms", this, "show image queues", "show image queues ", "Show the image queues (textures downloaded via UDP) for a particular client.", - (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + GetImageQueuesReport(cmd))); + (mod, cmd) => MainConsole.Instance.Output(GetImageQueuesReport(cmd))); scene.AddCommand( "Comms", this, "clear image queues", "clear image queues ", "Clear the image queues (textures downloaded via UDP) for a particular client.", - (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + HandleImageQueuesClear(cmd))); + (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", "Without the 'full' option, only root agents are shown." - + " With the 'full' option child agents are also shown.", - (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + GetThrottlesReport(cmd))); + + " With the 'full' option child agents are also shown.", + (mod, cmd) => MainConsole.Instance.Output(GetThrottlesReport(cmd))); scene.AddCommand( "Comms", this, "emergency-monitoring", @@ -138,7 +138,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "Show client request stats", "Without the 'first_name last_name' option, all clients are shown." + " With the 'first_name last_name' option only a specific client is shown.", - (mod, cmd) => m_log.Debug(string.Join(" ", cmd) + "\n" + HandleClientStatsReport(cmd))); + (mod, cmd) => MainConsole.Instance.Output(HandleClientStatsReport(cmd))); } @@ -279,7 +279,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return; string name = client.Name; - if (pname != "" && name.ToLower() != pname.ToLower()) + if (pname != "" && name != pname) return; string regionName = scene.RegionInfo.RegionName; @@ -440,7 +440,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return; string name = client.Name; - if (pname != "" && name.ToLower() != pname.ToLower()) + if (pname != "" && name != pname) return; string regionName = scene.RegionInfo.RegionName; @@ -537,7 +537,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return; string name = client.Name; - if (pname != "" && name.ToLower() != pname.ToLower()) + if (pname != "" && name != pname) return; string regionName = scene.RegionInfo.RegionName; @@ -608,12 +608,12 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden /// protected string HandleClientStatsReport(string[] showParams) { - StringBuilder report = new StringBuilder(); - + // NOTE: This writes to m_log on purpose. We want to store this information + // in case we need to analyze it later. + // if (showParams.Length <= 4) { - report.AppendFormat("{0,-30} {1,-30} {2,-6} {3,-11} {4,-11} {5,-16}\n", "Region", "Name", "Root", "Time", "Reqs/min", "AgentUpdates"); - + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", "Region", "Name", "Root", "Time", "Reqs/min", "AgentUpdates"); foreach (Scene scene in m_scenes.Values) { scene.ForEachClient( @@ -633,10 +633,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden else childAgentStatus = "Off!"; - int agentUpdates = 0; - cinfo.SyncRequests.TryGetValue("AgentUpdate", out agentUpdates); - - report.AppendFormat("{0,-30} {1,-30} {2,-6} {3,-11} {4,-11} {5,-16}\n", + m_log.InfoFormat("[INFO]: {0,-12} {1,-20} {2,-6} {3,-11} {4,-11} {5,-16}", scene.RegionInfo.RegionName, llClient.Name, childAgentStatus, (DateTime.Now - cinfo.StartedTime).Minutes, @@ -644,12 +641,11 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden string.Format( "{0} ({1:0.00}%)", llClient.TotalAgentUpdates, - ((float)agentUpdates) / llClient.TotalAgentUpdates * 100)); + (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100)); } }); } - - return report.ToString(); + return string.Empty; } string fname = "", lname = ""; @@ -668,7 +664,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden { LLClientView llClient = client as LLClientView; - if (llClient.Name.ToLower() == (fname + " " + lname).ToLower()) + if (llClient.Name == fname + " " + lname) { ClientInfo cinfo = llClient.GetClientInfo(); @@ -677,42 +673,41 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden aCircuit = new AgentCircuitData(); if (!llClient.SceneAgent.IsChildAgent) - report.AppendFormat("{0} # {1} # {2}\n", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0); + m_log.InfoFormat("[INFO]: {0} # {1} # {2}", llClient.Name, Util.GetViewerName(aCircuit), aCircuit.Id0); int avg_reqs = cinfo.AsyncRequests.Values.Sum() + cinfo.GenericRequests.Values.Sum() + cinfo.SyncRequests.Values.Sum(); avg_reqs = avg_reqs / ((DateTime.Now - cinfo.StartedTime).Minutes + 1); - report.AppendLine(); - report.AppendFormat("{0} # {1} # Time: {2}min # Avg Reqs/min: {3}\n", scene.RegionInfo.RegionName, + m_log.InfoFormat("[INFO]:"); + m_log.InfoFormat("[INFO]: {0} # {1} # Time: {2}min # Avg Reqs/min: {3}", scene.RegionInfo.RegionName, (llClient.SceneAgent.IsChildAgent ? "Child" : "Root"), (DateTime.Now - cinfo.StartedTime).Minutes, avg_reqs); Dictionary sortedDict = (from entry in cinfo.AsyncRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests(report, "TOP ASYNC", sortedDict, cinfo.AsyncRequests.Values.Sum()); + PrintRequests("TOP ASYNC", sortedDict, cinfo.AsyncRequests.Values.Sum()); sortedDict = (from entry in cinfo.SyncRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests(report, "TOP SYNC", sortedDict, cinfo.SyncRequests.Values.Sum()); + PrintRequests("TOP SYNC", sortedDict, cinfo.SyncRequests.Values.Sum()); sortedDict = (from entry in cinfo.GenericRequests orderby entry.Value descending select entry) .ToDictionary(pair => pair.Key, pair => pair.Value); - PrintRequests(report, "TOP GENERIC", sortedDict, cinfo.GenericRequests.Values.Sum()); + PrintRequests("TOP GENERIC", sortedDict, cinfo.GenericRequests.Values.Sum()); } } }); } - - return report.ToString(); + return string.Empty; } - private void PrintRequests(StringBuilder report, string type, Dictionary sortedDict, int sum) + private void PrintRequests(string type, Dictionary sortedDict, int sum) { - report.AppendLine(); - report.AppendFormat("{0,25}\n", type); + m_log.InfoFormat("[INFO]:"); + m_log.InfoFormat("[INFO]: {0,25}", type); foreach (KeyValuePair kvp in sortedDict.Take(12)) - report.AppendFormat("{0,25} {1,-6}\n", kvp.Key, kvp.Value); - report.AppendFormat("{0,25}\n", "..."); - report.AppendFormat("{0,25} {1,-6}\n", "Total", sum); + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", kvp.Key, kvp.Value); + m_log.InfoFormat("[INFO]: {0,25}", "..."); + m_log.InfoFormat("[INFO]: {0,25} {1,-6}", "Total", sum); } } } -- cgit v1.1 From a5eabdade3498d41d600043fe15d62905bec24be Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Mon, 6 Oct 2014 22:18:54 +0100 Subject: Move information about "server agent rate" throttles into "show server throttles" command rather than "show throttles" THis allows us to see the rates when no client is connected to the region. --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 39 ---------------------- 1 file changed, 39 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index 2ef3c4c..d471062 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -513,8 +513,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden report.AppendLine(); - bool firstClient = true; - lock (m_scenes) { foreach (Scene scene in m_scenes.Values) @@ -526,12 +524,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden { LLClientView llClient = client as LLClientView; - if (firstClient) - { - report.AppendLine(GetServerThrottlesReport(llClient.UDPServer)); - firstClient = false; - } - bool isChild = client.SceneAgent.IsChildAgent; if (isChild && !showChildren) return; @@ -569,37 +561,6 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden return report.ToString(); } - - protected string GetServerThrottlesReport(LLUDPServer udpServer) - { - StringBuilder report = new StringBuilder(); - - int columnPadding = 2; - int maxNameLength = 18; - int maxRegionNameLength = 14; - int maxTypeLength = 4; - - string name = "SERVER AGENT RATES"; - - report.Append(GetColumnEntry(name, maxNameLength, columnPadding)); - report.Append(GetColumnEntry("-", maxRegionNameLength, columnPadding)); - report.Append(GetColumnEntry("-", maxTypeLength, columnPadding)); - - ThrottleRates throttleRates = udpServer.ThrottleRates; - report.AppendFormat( - "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}", - "-", - (throttleRates.Total * 8) / 1000, - (throttleRates.Resend * 8) / 1000, - (throttleRates.Land * 8) / 1000, - (throttleRates.Wind * 8) / 1000, - (throttleRates.Cloud * 8) / 1000, - (throttleRates.Task * 8) / 1000, - (throttleRates.Texture * 8) / 1000, - (throttleRates.Asset * 8) / 1000); - - return report.ToString(); - } /// /// Show client stats data -- cgit v1.1 From d33964222aa9e3b2e639469a32d0af4728b0f77d Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 10 Oct 2014 23:36:50 +0100 Subject: Fix an issue where specifying both max client and server outgoing UDP throttles would cause client throttles to be lower than expected when total requests exceeded the scene limit. This was because specifying a max client throttle would always request the max from the parent server throttle, no matter the actual total requests on the client throttle. This would lead to a lower server multiplier than expected. This change also adds a 'target' column to the "show throttles" output that shows the target rate (as set by client) if adaptive throttles is active. This commit also re-adds the functionality lost in recent 5c1a1458 to set a max client throttle when adaptive is active. This commit also adds TestClientThrottlePerClientAndRegionLimited and TestClientThrottleAdaptiveNoLimit regression tests --- .../Agent/UDP/Linden/LindenUDPInfoModule.cs | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index d471062..cc6a1e8 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -487,8 +487,9 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden report.Append(GetColumnEntry("Type", maxTypeLength, columnPadding)); report.AppendFormat( - "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}\n", + "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", "Max", + "Target", "Total", "Resend", "Land", @@ -500,7 +501,8 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden report.AppendFormat("{0,-" + totalInfoFieldsLength + "}", ""); report.AppendFormat( - "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}\n", + "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", + "kb/s", "kb/s", "kb/s", "kb/s", @@ -542,8 +544,9 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden report.Append(GetColumnEntry(isChild ? "Cd" : "Rt", maxTypeLength, columnPadding)); report.AppendFormat( - "{0,8} {1,7} {2,8} {3,7} {4,7} {5,7} {6,7} {7,9} {8,7}", - (ci.maxThrottle * 8) / 1000, + "{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() : "-", (ci.totalThrottle * 8) / 1000, (ci.resendThrottle * 8) / 1000, (ci.landThrottle * 8) / 1000, @@ -551,9 +554,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden (ci.cloudThrottle * 8) / 1000, (ci.taskThrottle * 8) / 1000, (ci.textureThrottle * 8) / 1000, - (ci.assetThrottle * 8) / 1000); - - report.AppendLine(); + (ci.assetThrottle * 8) / 1000); } }); } -- cgit v1.1 From 548abb3b47957bc064706859aff8ebb7333357d2 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 24 Oct 2014 21:51:27 +0100 Subject: minor: In "show client stats" command, properly handle the case where a client has made no AgentUpdate requests (as is the case with agents that have only even been child) rather than throwing an exception --- .../Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index cc6a1e8..f6772a5 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -603,7 +603,9 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden string.Format( "{0} ({1:0.00}%)", llClient.TotalAgentUpdates, - (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100)); + cinfo.SyncRequests.ContainsKey("AgentUpdate") + ? (float)cinfo.SyncRequests["AgentUpdate"] / llClient.TotalAgentUpdates * 100 + : 0)); } }); } -- cgit v1.1 From b2e377f168967f7cedb32f077ee54b9f92439205 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Sat, 25 Oct 2014 02:09:37 +0100 Subject: Fix setting of max scene throttle so that setting it restricts the child client throttles properly. In "show throttles", also renames 'total' column to 'actual' to reflect that it is not necessarily the throttles requested for/by the client. Also fills out 'target' in non-adapative mode to the actual throttle requested for/by the client. --- .../Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs index f6772a5..08d0fbf 100644 --- a/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs +++ b/OpenSim/Region/OptionalModules/Agent/UDP/Linden/LindenUDPInfoModule.cs @@ -490,7 +490,7 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden "{0,8} {1,8} {2,7} {3,8} {4,7} {5,7} {6,7} {7,7} {8,9} {9,7}\n", "Max", "Target", - "Total", + "Actual", "Resend", "Land", "Wind", @@ -546,7 +546,9 @@ namespace OpenSim.Region.OptionalModules.UDP.Linden 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, (ci.landThrottle * 8) / 1000, -- cgit v1.1 From 86367d7219b3bd52f63045b2b17bcbde328844ed Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Tue, 25 Nov 2014 23:56:32 +0000 Subject: refactor: Move methods to start a monitored thread, start work in its own thread and run work in the jobengine from Watchdog to a WorkManager class. This is to achieve a clean separation of concerns - the watchdog is an inappropriate place for work management. Also adds a WorkManager.RunInThreadPool() class which feeds through to Util.FireAndForget. Also switches around the name and obj arguments to the new RunInThread() and RunJob() methods so that the callback obj comes after the callback as seen in the SDK and elsewhere --- .../Agent/InternetRelayClientView/Server/IRCClientView.cs | 2 +- .../OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Region/OptionalModules/Agent') diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs index e1aaf18..6fe86b2 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCClientView.cs @@ -71,7 +71,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server m_client = client; m_scene = scene; - Watchdog.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false, true); + WorkManager.StartThread(InternalLoop, "IRCClientView", ThreadPriority.Normal, false, true); } private void SendServerCommand(string command) diff --git a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs index 9d27386..a1682d2 100644 --- a/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs +++ b/OpenSim/Region/OptionalModules/Agent/InternetRelayClientView/Server/IRCServer.cs @@ -58,7 +58,7 @@ namespace OpenSim.Region.OptionalModules.Agent.InternetRelayClientView.Server m_listener.Start(50); - Watchdog.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false, true); + WorkManager.StartThread(ListenLoop, "IRCServer", ThreadPriority.Normal, false, true); m_baseScene = baseScene; } -- cgit v1.1