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 --- OpenSim/Framework/IClientAPI.cs | 22 +++++++++++----------- 1 file changed, 11 insertions(+), 11 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 60c1ac7..eb5b034 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -467,7 +467,7 @@ namespace OpenSim.Framework public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); - public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string summery, UUID reporter); + public delegate void NewUserReport(IClientAPI client, string regionName,UUID abuserID, byte catagory, byte checkflags, string details, UUID objectID, Vector3 postion, byte reportType ,UUID screenshotID, string Summary, UUID reporter); public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY); @@ -1069,25 +1069,25 @@ namespace OpenSim.Framework event PlacesQuery OnPlacesQuery; - event FindAgentUpdate OnFindAgentEvent; - event TrackAgentUpdate OnTrackAgentEvent; - event NewUserReport OnUserReportEvent; - event SaveStateHandler OnSaveStateEvent; + event FindAgentUpdate OnFindAgent; + event TrackAgentUpdate OnTrackAgent; + event NewUserReport OnUserReport; + event SaveStateHandler OnSaveState; event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; - event FreezeUserUpdate OnParcelFreezeUserEvent; - event EjectUserUpdate OnParcelEjectUserEvent; + event FreezeUserUpdate OnParcelFreezeUser; + event EjectUserUpdate OnParcelEjectUser; event ParcelBuyPass OnParcelBuyPass; event ParcelGodMark OnParcelGodMark; event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; event SimWideDeletesDelegate OnSimWideDeletes; event SendPostcard OnSendPostcard; - event MuteListEntryUpdate OnUpdateMuteListEntryEvent; - event MuteListEntryRemove OnRemoveMuteListEntryEvent; - event GodlikeMessage onGodlikeMessageEvent; - event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; + event MuteListEntryUpdate OnUpdateMuteListEntry; + event MuteListEntryRemove OnRemoveMuteListEntry; + event GodlikeMessage onGodlikeMessage; + event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate; /// /// Set the debug level at which packet output should be printed to console. -- cgit v1.1 From 17efecd6c57c7abf6cc67bd9e347ec6176caab27 Mon Sep 17 00:00:00 2001 From: Melanie Date: Fri, 8 Jan 2010 05:29:29 +0000 Subject: Moving the new group data structures out of LLClientView into GroupData. The new methods are still not in IClientAPI, so some work remains to be done. --- OpenSim/Framework/GroupData.cs | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/GroupData.cs b/OpenSim/Framework/GroupData.cs index 247420e..e3b8626 100644 --- a/OpenSim/Framework/GroupData.cs +++ b/OpenSim/Framework/GroupData.cs @@ -135,4 +135,30 @@ namespace OpenSim.Framework public bool HasAttachment; public byte AssetType; } + + public struct GroupVoteHistory + { + public string VoteID; + public string VoteInitiator; + public string Majority; + public string Quorum; + public string TerseDateID; + public string StartDateTime; + public string EndDateTime; + public string VoteType; + public string VoteResult; + public string ProposalText; + } + + public struct GroupActiveProposals + { + public string VoteID; + public string VoteInitiator; + public string Majority; + public string Quorum; + public string TerseDateID; + public string StartDateTime; + public string EndDateTime; + public string ProposalText; + } } -- cgit v1.1 From 22b1ffdc6ce59e3d8108ef26522dfce815b1a921 Mon Sep 17 00:00:00 2001 From: Justin Clark-Casey (justincc) Date: Fri, 8 Jan 2010 14:45:40 +0000 Subject: Fix repeated ArgumentOutOfRangeException when a local OpenSim console is resized under mono May fix mantises 3186, 3270, 4022, 4238 --- OpenSim/Framework/Console/CommandConsole.cs | 8 ++- OpenSim/Framework/Console/LocalConsole.cs | 106 +++++++++++++++++++--------- 2 files changed, 79 insertions(+), 35 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Console/CommandConsole.cs b/OpenSim/Framework/Console/CommandConsole.cs index 9671bc2..66f483c 100644 --- a/OpenSim/Framework/Console/CommandConsole.cs +++ b/OpenSim/Framework/Console/CommandConsole.cs @@ -552,8 +552,9 @@ namespace OpenSim.Framework.Console } } - // A console that processes commands internally - // + /// + /// A console that processes commands internally + /// public class CommandConsole : ConsoleBase { private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -574,6 +575,9 @@ namespace OpenSim.Framework.Console Output(s); } + /// + /// Display a command prompt on the console and wait for user input + /// public void Prompt() { string line = ReadLine(m_defaultPrompt + "# ", true, true); diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs index 39edd2a..b7e191b 100644 --- a/OpenSim/Framework/Console/LocalConsole.cs +++ b/OpenSim/Framework/Console/LocalConsole.cs @@ -36,8 +36,9 @@ using log4net; namespace OpenSim.Framework.Console { - // A console that uses cursor control and color - // + /// + /// A console that uses cursor control and color + /// public class LocalConsole : CommandConsole { // private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); @@ -85,30 +86,70 @@ namespace OpenSim.Framework.Console history.Add(text); } + /// + /// Set the cursor row. + /// + /// + /// + /// Row to set. If this is below 0, then the row is set to 0. If it is equal to the buffer height or greater + /// then it is set to one less than the height. + /// + /// + /// The new cursor row. + /// private int SetCursorTop(int top) { - if (top >= 0 && top < System.Console.BufferHeight) - { - System.Console.CursorTop = top; - return top; - } - else - { - return System.Console.CursorTop; - } + // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try + // to set a cursor row position with a currently invalid column, mono will throw an exception. + // Therefore, we need to make sure that the column position is valid first. + int left = System.Console.CursorLeft; + + if (left < 0) + System.Console.CursorLeft = 0; + else if (left >= System.Console.BufferWidth) + System.Console.CursorLeft = System.Console.BufferWidth - 1; + + if (top < 0) + top = 0; + if (top >= System.Console.BufferHeight) + top = System.Console.BufferHeight - 1; + + System.Console.CursorTop = top; + + return top; } + /// + /// Set the cursor column. + /// + /// + /// + /// Column to set. If this is below 0, then the column is set to 0. If it is equal to the buffer width or greater + /// then it is set to one less than the width. + /// + /// + /// The new cursor column. + /// private int SetCursorLeft(int left) { - if (left >= 0 && left < System.Console.BufferWidth) - { - System.Console.CursorLeft = left; - return left; - } - else - { - return System.Console.CursorLeft; - } + // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try + // to set a cursor column position with a currently invalid row, mono will throw an exception. + // Therefore, we need to make sure that the row position is valid first. + int top = System.Console.CursorTop; + + if (top < 0) + System.Console.CursorTop = 0; + else if (top >= System.Console.BufferHeight) + System.Console.CursorTop = System.Console.BufferHeight - 1; + + if (left < 0) + left = 0; + if (left >= System.Console.BufferWidth) + left = System.Console.BufferWidth - 1; + + System.Console.CursorLeft = left; + + return left; } private void Show() @@ -128,21 +169,21 @@ namespace OpenSim.Framework.Console { y--; new_y--; - System.Console.CursorLeft = 0; - System.Console.CursorTop = System.Console.BufferHeight-1; + SetCursorLeft(0); + SetCursorTop(System.Console.BufferHeight - 1); System.Console.WriteLine(" "); } - y=SetCursorTop(y); - System.Console.CursorLeft = 0; + y = SetCursorTop(y); + SetCursorLeft(0); if (echo) System.Console.Write("{0}{1}", prompt, cmdline); else System.Console.Write("{0}", prompt); - SetCursorLeft(new_x); SetCursorTop(new_y); + SetCursorLeft(new_x); } } @@ -162,8 +203,7 @@ namespace OpenSim.Framework.Console System.Console.Write(" "); y = SetCursorTop(y); - System.Console.CursorLeft = 0; - + SetCursorLeft(0); } } catch (Exception) @@ -252,7 +292,7 @@ namespace OpenSim.Framework.Console } y = SetCursorTop(y); - System.Console.CursorLeft = 0; + SetCursorLeft(0); int count = cmdline.Length + prompt.Length; @@ -260,7 +300,7 @@ namespace OpenSim.Framework.Console System.Console.Write(" "); y = SetCursorTop(y); - System.Console.CursorLeft = 0; + SetCursorLeft(0); WriteLocalText(text, level); @@ -299,7 +339,7 @@ namespace OpenSim.Framework.Console echo = e; int historyLine = history.Count; - System.Console.CursorLeft = 0; // Needed for mono + SetCursorLeft(0); // Needed for mono System.Console.Write(" "); // Needed for mono lock (cmdline) @@ -339,7 +379,7 @@ namespace OpenSim.Framework.Console cmdline.Remove(cp-1, 1); cp--; - System.Console.CursorLeft = 0; + SetCursorLeft(0); y = SetCursorTop(y); System.Console.Write("{0}{1} ", prompt, cmdline); @@ -387,7 +427,7 @@ namespace OpenSim.Framework.Console cp++; break; case ConsoleKey.Enter: - System.Console.CursorLeft = 0; + SetCursorLeft(0); y = SetCursorTop(y); System.Console.WriteLine("{0}{1}", prompt, cmdline); @@ -424,4 +464,4 @@ namespace OpenSim.Framework.Console } } } -} +} \ No newline at end of file -- 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 --- OpenSim/Framework/IClientAPI.cs | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index eb5b034..0efc2a4 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -1446,7 +1446,12 @@ namespace OpenSim.Framework void SendUserInfoReply(bool imViaEmail, bool visible, string email); void SendUseCachedMuteList(); - void SendMuteListUpdate(string filename); + + void SendMuteListUpdate(string filename); + + void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals); + + void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes); void KillEndDone(); -- 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 --- OpenSim/Framework/EstateSettings.cs | 28 ++++++++++++++++++++++++++++ OpenSim/Framework/IClientAPI.cs | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/EstateSettings.cs b/OpenSim/Framework/EstateSettings.cs index deced98..b4b5808 100644 --- a/OpenSim/Framework/EstateSettings.cs +++ b/OpenSim/Framework/EstateSettings.cs @@ -300,6 +300,34 @@ namespace OpenSim.Framework OnSave(this); } + public void AddEstateUser(UUID avatarID) + { + if (avatarID == UUID.Zero) + return; + if (!l_EstateAccess.Contains(avatarID)) + l_EstateAccess.Add(avatarID); + } + + public void RemoveEstateUser(UUID avatarID) + { + if (l_EstateAccess.Contains(avatarID)) + l_EstateAccess.Remove(avatarID); + } + + public void AddEstateGroup(UUID avatarID) + { + if (avatarID == UUID.Zero) + return; + if (!l_EstateGroups.Contains(avatarID)) + l_EstateGroups.Add(avatarID); + } + + public void RemoveEstateGroup(UUID avatarID) + { + if (l_EstateGroups.Contains(avatarID)) + l_EstateGroups.Remove(avatarID); + } + public void AddEstateManager(UUID avatarID) { if (avatarID == UUID.Zero) diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs index 0efc2a4..3489af1 100644 --- a/OpenSim/Framework/IClientAPI.cs +++ b/OpenSim/Framework/IClientAPI.cs @@ -1271,7 +1271,7 @@ namespace OpenSim.Framework void SendHealth(float health); - void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID); + void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID); void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID); -- cgit v1.1 From 332463ca94c24bf6706cd40d4c2fa89b1cd13199 Mon Sep 17 00:00:00 2001 From: Melanie Date: Sat, 9 Jan 2010 15:28:52 +0000 Subject: Fix up the weird Lindenish "setaccess" message. Talk about strange.... --- OpenSim/Framework/Constants.cs | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Constants.cs b/OpenSim/Framework/Constants.cs index 632431f..5757061 100644 --- a/OpenSim/Framework/Constants.cs +++ b/OpenSim/Framework/Constants.cs @@ -36,10 +36,10 @@ namespace OpenSim.Framework public enum EstateAccessCodex : uint { - AccessOptions = 17, - AllowedGroups = 18, - EstateBans = 20, - EstateManagers = 24 + AccessOptions = 1, + AllowedGroups = 2, + EstateBans = 4, + EstateManagers = 8 } [Flags]public enum TeleportFlags : uint -- cgit v1.1 From 81d5a4b6d8d8548dde98cbf827d171bb1ebf96ba Mon Sep 17 00:00:00 2001 From: Melanie Date: Sun, 10 Jan 2010 03:03:18 +0000 Subject: Remove "login disable", "login enable" and "login status" commands. --- OpenSim/Framework/Communications/Tests/LoginServiceTests.cs | 10 +--------- OpenSim/Framework/ILoginServiceToRegionsConnector.cs | 1 - 2 files changed, 1 insertion(+), 10 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs index 60f0ba8..a274ae7 100644 --- a/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs +++ b/OpenSim/Framework/Communications/Tests/LoginServiceTests.cs @@ -388,12 +388,6 @@ namespace OpenSim.Framework.Communications.Tests } } - #region ILoginRegionsConnector Members - public bool RegionLoginsEnabled - { - get { return true; } - } - public void LogOffUserFromGrid(ulong regionHandle, OpenMetaverse.UUID AvatarID, OpenMetaverse.UUID RegionSecret, string message) { } @@ -454,8 +448,6 @@ namespace OpenSim.Framework.Communications.Tests return null; } - - #endregion } } -} \ No newline at end of file +} diff --git a/OpenSim/Framework/ILoginServiceToRegionsConnector.cs b/OpenSim/Framework/ILoginServiceToRegionsConnector.cs index 2aee88e..5a155c1 100644 --- a/OpenSim/Framework/ILoginServiceToRegionsConnector.cs +++ b/OpenSim/Framework/ILoginServiceToRegionsConnector.cs @@ -32,7 +32,6 @@ namespace OpenSim.Framework { public interface ILoginServiceToRegionsConnector { - bool RegionLoginsEnabled { get; } void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message); bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason); RegionInfo RequestClosestRegion(string region); -- cgit v1.1 From e966e51b89bdc0fc36482621f8954e5faffc8fbf Mon Sep 17 00:00:00 2001 From: Melanie Date: Mon, 11 Jan 2010 03:29:24 +0000 Subject: Add a console_port setting to let the rest console use a different port from the region server --- OpenSim/Framework/MainServer.cs | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/MainServer.cs b/OpenSim/Framework/MainServer.cs index 7da4893..84cc05e 100644 --- a/OpenSim/Framework/MainServer.cs +++ b/OpenSim/Framework/MainServer.cs @@ -32,7 +32,7 @@ namespace OpenSim.Framework { public class MainServer { - private static BaseHttpServer instance; + private static BaseHttpServer instance = null; private static Dictionary m_Servers = new Dictionary(); @@ -46,7 +46,7 @@ namespace OpenSim.Framework { if (port == 0) return Instance; - if (port == Instance.Port) + if (instance != null && port == Instance.Port) return Instance; if (m_Servers.ContainsKey(port)) -- cgit v1.1 From 88d2adc93cd91baa9b2c9899ebe727672c914ec3 Mon Sep 17 00:00:00 2001 From: dahlia Date: Thu, 14 Jan 2010 02:16:40 -0800 Subject: add an agent position field to AgentUpdateArgs for use by some non-LL clients --- OpenSim/Framework/AgentUpdateArgs.cs | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'OpenSim/Framework') diff --git a/OpenSim/Framework/AgentUpdateArgs.cs b/OpenSim/Framework/AgentUpdateArgs.cs index 7b9ec68..660bc32 100644 --- a/OpenSim/Framework/AgentUpdateArgs.cs +++ b/OpenSim/Framework/AgentUpdateArgs.cs @@ -78,5 +78,13 @@ namespace OpenSim.Framework /// public UUID SessionID; public byte State; + + public Vector3 ClientAgentPosition; + public bool UseClientAgentPosition; + + public AgentUpdateArgs() + { + UseClientAgentPosition = false; + } } } -- cgit v1.1