aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/AgentUpdateArgs.cs8
-rw-r--r--OpenSim/Framework/Console/CommandConsole.cs8
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs106
-rw-r--r--OpenSim/Framework/Constants.cs8
-rw-r--r--OpenSim/Framework/EstateSettings.cs28
-rw-r--r--OpenSim/Framework/GroupData.cs26
-rw-r--r--OpenSim/Framework/IClientAPI.cs31
-rw-r--r--OpenSim/Framework/ILoginServiceToRegionsConnector.cs1
-rw-r--r--OpenSim/Framework/MainServer.cs4
9 files changed, 165 insertions, 55 deletions
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
78 /// </summary> 78 /// </summary>
79 public UUID SessionID; 79 public UUID SessionID;
80 public byte State; 80 public byte State;
81
82 public Vector3 ClientAgentPosition;
83 public bool UseClientAgentPosition;
84
85 public AgentUpdateArgs()
86 {
87 UseClientAgentPosition = false;
88 }
81 } 89 }
82} 90}
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
552 } 552 }
553 } 553 }
554 554
555 // A console that processes commands internally 555 /// <summary>
556 // 556 /// A console that processes commands internally
557 /// </summary>
557 public class CommandConsole : ConsoleBase 558 public class CommandConsole : ConsoleBase
558 { 559 {
559 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 560 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -574,6 +575,9 @@ namespace OpenSim.Framework.Console
574 Output(s); 575 Output(s);
575 } 576 }
576 577
578 /// <summary>
579 /// Display a command prompt on the console and wait for user input
580 /// </summary>
577 public void Prompt() 581 public void Prompt()
578 { 582 {
579 string line = ReadLine(m_defaultPrompt + "# ", true, true); 583 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;
36 36
37namespace OpenSim.Framework.Console 37namespace OpenSim.Framework.Console
38{ 38{
39 // A console that uses cursor control and color 39 /// <summary>
40 // 40 /// A console that uses cursor control and color
41 /// </summary>
41 public class LocalConsole : CommandConsole 42 public class LocalConsole : CommandConsole
42 { 43 {
43// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44// private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
@@ -85,30 +86,70 @@ namespace OpenSim.Framework.Console
85 history.Add(text); 86 history.Add(text);
86 } 87 }
87 88
89 /// <summary>
90 /// Set the cursor row.
91 /// </summary>
92 ///
93 /// <param name="top">
94 /// 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
95 /// then it is set to one less than the height.
96 /// </param>
97 /// <returns>
98 /// The new cursor row.
99 /// </returns>
88 private int SetCursorTop(int top) 100 private int SetCursorTop(int top)
89 { 101 {
90 if (top >= 0 && top < System.Console.BufferHeight) 102 // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
91 { 103 // to set a cursor row position with a currently invalid column, mono will throw an exception.
92 System.Console.CursorTop = top; 104 // Therefore, we need to make sure that the column position is valid first.
93 return top; 105 int left = System.Console.CursorLeft;
94 } 106
95 else 107 if (left < 0)
96 { 108 System.Console.CursorLeft = 0;
97 return System.Console.CursorTop; 109 else if (left >= System.Console.BufferWidth)
98 } 110 System.Console.CursorLeft = System.Console.BufferWidth - 1;
111
112 if (top < 0)
113 top = 0;
114 if (top >= System.Console.BufferHeight)
115 top = System.Console.BufferHeight - 1;
116
117 System.Console.CursorTop = top;
118
119 return top;
99 } 120 }
100 121
122 /// <summary>
123 /// Set the cursor column.
124 /// </summary>
125 ///
126 /// <param name="left">
127 /// 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
128 /// then it is set to one less than the width.
129 /// </param>
130 /// <returns>
131 /// The new cursor column.
132 /// </returns>
101 private int SetCursorLeft(int left) 133 private int SetCursorLeft(int left)
102 { 134 {
103 if (left >= 0 && left < System.Console.BufferWidth) 135 // From at least mono 2.4.2.3, window resizing can give mono an invalid row and column values. If we try
104 { 136 // to set a cursor column position with a currently invalid row, mono will throw an exception.
105 System.Console.CursorLeft = left; 137 // Therefore, we need to make sure that the row position is valid first.
106 return left; 138 int top = System.Console.CursorTop;
107 } 139
108 else 140 if (top < 0)
109 { 141 System.Console.CursorTop = 0;
110 return System.Console.CursorLeft; 142 else if (top >= System.Console.BufferHeight)
111 } 143 System.Console.CursorTop = System.Console.BufferHeight - 1;
144
145 if (left < 0)
146 left = 0;
147 if (left >= System.Console.BufferWidth)
148 left = System.Console.BufferWidth - 1;
149
150 System.Console.CursorLeft = left;
151
152 return left;
112 } 153 }
113 154
114 private void Show() 155 private void Show()
@@ -128,21 +169,21 @@ namespace OpenSim.Framework.Console
128 { 169 {
129 y--; 170 y--;
130 new_y--; 171 new_y--;
131 System.Console.CursorLeft = 0; 172 SetCursorLeft(0);
132 System.Console.CursorTop = System.Console.BufferHeight-1; 173 SetCursorTop(System.Console.BufferHeight - 1);
133 System.Console.WriteLine(" "); 174 System.Console.WriteLine(" ");
134 } 175 }
135 176
136 y=SetCursorTop(y); 177 y = SetCursorTop(y);
137 System.Console.CursorLeft = 0; 178 SetCursorLeft(0);
138 179
139 if (echo) 180 if (echo)
140 System.Console.Write("{0}{1}", prompt, cmdline); 181 System.Console.Write("{0}{1}", prompt, cmdline);
141 else 182 else
142 System.Console.Write("{0}", prompt); 183 System.Console.Write("{0}", prompt);
143 184
144 SetCursorLeft(new_x);
145 SetCursorTop(new_y); 185 SetCursorTop(new_y);
186 SetCursorLeft(new_x);
146 } 187 }
147 } 188 }
148 189
@@ -162,8 +203,7 @@ namespace OpenSim.Framework.Console
162 System.Console.Write(" "); 203 System.Console.Write(" ");
163 204
164 y = SetCursorTop(y); 205 y = SetCursorTop(y);
165 System.Console.CursorLeft = 0; 206 SetCursorLeft(0);
166
167 } 207 }
168 } 208 }
169 catch (Exception) 209 catch (Exception)
@@ -252,7 +292,7 @@ namespace OpenSim.Framework.Console
252 } 292 }
253 293
254 y = SetCursorTop(y); 294 y = SetCursorTop(y);
255 System.Console.CursorLeft = 0; 295 SetCursorLeft(0);
256 296
257 int count = cmdline.Length + prompt.Length; 297 int count = cmdline.Length + prompt.Length;
258 298
@@ -260,7 +300,7 @@ namespace OpenSim.Framework.Console
260 System.Console.Write(" "); 300 System.Console.Write(" ");
261 301
262 y = SetCursorTop(y); 302 y = SetCursorTop(y);
263 System.Console.CursorLeft = 0; 303 SetCursorLeft(0);
264 304
265 WriteLocalText(text, level); 305 WriteLocalText(text, level);
266 306
@@ -299,7 +339,7 @@ namespace OpenSim.Framework.Console
299 echo = e; 339 echo = e;
300 int historyLine = history.Count; 340 int historyLine = history.Count;
301 341
302 System.Console.CursorLeft = 0; // Needed for mono 342 SetCursorLeft(0); // Needed for mono
303 System.Console.Write(" "); // Needed for mono 343 System.Console.Write(" "); // Needed for mono
304 344
305 lock (cmdline) 345 lock (cmdline)
@@ -339,7 +379,7 @@ namespace OpenSim.Framework.Console
339 cmdline.Remove(cp-1, 1); 379 cmdline.Remove(cp-1, 1);
340 cp--; 380 cp--;
341 381
342 System.Console.CursorLeft = 0; 382 SetCursorLeft(0);
343 y = SetCursorTop(y); 383 y = SetCursorTop(y);
344 384
345 System.Console.Write("{0}{1} ", prompt, cmdline); 385 System.Console.Write("{0}{1} ", prompt, cmdline);
@@ -387,7 +427,7 @@ namespace OpenSim.Framework.Console
387 cp++; 427 cp++;
388 break; 428 break;
389 case ConsoleKey.Enter: 429 case ConsoleKey.Enter:
390 System.Console.CursorLeft = 0; 430 SetCursorLeft(0);
391 y = SetCursorTop(y); 431 y = SetCursorTop(y);
392 432
393 System.Console.WriteLine("{0}{1}", prompt, cmdline); 433 System.Console.WriteLine("{0}{1}", prompt, cmdline);
@@ -424,4 +464,4 @@ namespace OpenSim.Framework.Console
424 } 464 }
425 } 465 }
426 } 466 }
427} 467} \ No newline at end of file
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
36 36
37 public enum EstateAccessCodex : uint 37 public enum EstateAccessCodex : uint
38 { 38 {
39 AccessOptions = 17, 39 AccessOptions = 1,
40 AllowedGroups = 18, 40 AllowedGroups = 2,
41 EstateBans = 20, 41 EstateBans = 4,
42 EstateManagers = 24 42 EstateManagers = 8
43 } 43 }
44 44
45 [Flags]public enum TeleportFlags : uint 45 [Flags]public enum TeleportFlags : uint
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
300 OnSave(this); 300 OnSave(this);
301 } 301 }
302 302
303 public void AddEstateUser(UUID avatarID)
304 {
305 if (avatarID == UUID.Zero)
306 return;
307 if (!l_EstateAccess.Contains(avatarID))
308 l_EstateAccess.Add(avatarID);
309 }
310
311 public void RemoveEstateUser(UUID avatarID)
312 {
313 if (l_EstateAccess.Contains(avatarID))
314 l_EstateAccess.Remove(avatarID);
315 }
316
317 public void AddEstateGroup(UUID avatarID)
318 {
319 if (avatarID == UUID.Zero)
320 return;
321 if (!l_EstateGroups.Contains(avatarID))
322 l_EstateGroups.Add(avatarID);
323 }
324
325 public void RemoveEstateGroup(UUID avatarID)
326 {
327 if (l_EstateGroups.Contains(avatarID))
328 l_EstateGroups.Remove(avatarID);
329 }
330
303 public void AddEstateManager(UUID avatarID) 331 public void AddEstateManager(UUID avatarID)
304 { 332 {
305 if (avatarID == UUID.Zero) 333 if (avatarID == UUID.Zero)
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
135 public bool HasAttachment; 135 public bool HasAttachment;
136 public byte AssetType; 136 public byte AssetType;
137 } 137 }
138
139 public struct GroupVoteHistory
140 {
141 public string VoteID;
142 public string VoteInitiator;
143 public string Majority;
144 public string Quorum;
145 public string TerseDateID;
146 public string StartDateTime;
147 public string EndDateTime;
148 public string VoteType;
149 public string VoteResult;
150 public string ProposalText;
151 }
152
153 public struct GroupActiveProposals
154 {
155 public string VoteID;
156 public string VoteInitiator;
157 public string Majority;
158 public string Quorum;
159 public string TerseDateID;
160 public string StartDateTime;
161 public string EndDateTime;
162 public string ProposalText;
163 }
138} 164}
diff --git a/OpenSim/Framework/IClientAPI.cs b/OpenSim/Framework/IClientAPI.cs
index 60c1ac7..3489af1 100644
--- a/OpenSim/Framework/IClientAPI.cs
+++ b/OpenSim/Framework/IClientAPI.cs
@@ -467,7 +467,7 @@ namespace OpenSim.Framework
467 467
468 public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target); 468 public delegate void EjectUserUpdate(IClientAPI client, UUID parcelowner,uint flags, UUID target);
469 469
470 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); 470 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);
471 471
472 public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY); 472 public delegate void GodUpdateRegionInfoUpdate(IClientAPI client, float BillableFactor, ulong EstateID, ulong RegionFlags, byte[] SimName,int RedirectX, int RedirectY);
473 473
@@ -1069,25 +1069,25 @@ namespace OpenSim.Framework
1069 1069
1070 event PlacesQuery OnPlacesQuery; 1070 event PlacesQuery OnPlacesQuery;
1071 1071
1072 event FindAgentUpdate OnFindAgentEvent; 1072 event FindAgentUpdate OnFindAgent;
1073 event TrackAgentUpdate OnTrackAgentEvent; 1073 event TrackAgentUpdate OnTrackAgent;
1074 event NewUserReport OnUserReportEvent; 1074 event NewUserReport OnUserReport;
1075 event SaveStateHandler OnSaveStateEvent; 1075 event SaveStateHandler OnSaveState;
1076 event GroupAccountSummaryRequest OnGroupAccountSummaryRequest; 1076 event GroupAccountSummaryRequest OnGroupAccountSummaryRequest;
1077 event GroupAccountDetailsRequest OnGroupAccountDetailsRequest; 1077 event GroupAccountDetailsRequest OnGroupAccountDetailsRequest;
1078 event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest; 1078 event GroupAccountTransactionsRequest OnGroupAccountTransactionsRequest;
1079 event FreezeUserUpdate OnParcelFreezeUserEvent; 1079 event FreezeUserUpdate OnParcelFreezeUser;
1080 event EjectUserUpdate OnParcelEjectUserEvent; 1080 event EjectUserUpdate OnParcelEjectUser;
1081 event ParcelBuyPass OnParcelBuyPass; 1081 event ParcelBuyPass OnParcelBuyPass;
1082 event ParcelGodMark OnParcelGodMark; 1082 event ParcelGodMark OnParcelGodMark;
1083 event GroupActiveProposalsRequest OnGroupActiveProposalsRequest; 1083 event GroupActiveProposalsRequest OnGroupActiveProposalsRequest;
1084 event GroupVoteHistoryRequest OnGroupVoteHistoryRequest; 1084 event GroupVoteHistoryRequest OnGroupVoteHistoryRequest;
1085 event SimWideDeletesDelegate OnSimWideDeletes; 1085 event SimWideDeletesDelegate OnSimWideDeletes;
1086 event SendPostcard OnSendPostcard; 1086 event SendPostcard OnSendPostcard;
1087 event MuteListEntryUpdate OnUpdateMuteListEntryEvent; 1087 event MuteListEntryUpdate OnUpdateMuteListEntry;
1088 event MuteListEntryRemove OnRemoveMuteListEntryEvent; 1088 event MuteListEntryRemove OnRemoveMuteListEntry;
1089 event GodlikeMessage onGodlikeMessageEvent; 1089 event GodlikeMessage onGodlikeMessage;
1090 event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdateEvent; 1090 event GodUpdateRegionInfoUpdate OnGodUpdateRegionInfoUpdate;
1091 1091
1092 /// <summary> 1092 /// <summary>
1093 /// Set the debug level at which packet output should be printed to console. 1093 /// Set the debug level at which packet output should be printed to console.
@@ -1271,7 +1271,7 @@ namespace OpenSim.Framework
1271 void SendHealth(float health); 1271 void SendHealth(float health);
1272 1272
1273 1273
1274 void SendEstateManagersList(UUID invoice, UUID[] EstateManagers, uint estateID); 1274 void SendEstateList(UUID invoice, int code, UUID[] Data, uint estateID);
1275 1275
1276 void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID); 1276 void SendBannedUserList(UUID invoice, EstateBan[] banlist, uint estateID);
1277 1277
@@ -1446,7 +1446,12 @@ namespace OpenSim.Framework
1446 void SendUserInfoReply(bool imViaEmail, bool visible, string email); 1446 void SendUserInfoReply(bool imViaEmail, bool visible, string email);
1447 1447
1448 void SendUseCachedMuteList(); 1448 void SendUseCachedMuteList();
1449 void SendMuteListUpdate(string filename); 1449
1450 void SendMuteListUpdate(string filename);
1451
1452 void SendGroupActiveProposals(UUID groupID, UUID transactionID, GroupActiveProposals[] Proposals);
1453
1454 void SendGroupVoteHistory(UUID groupID, UUID transactionID, GroupVoteHistory[] Votes);
1450 1455
1451 void KillEndDone(); 1456 void KillEndDone();
1452 1457
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
32{ 32{
33 public interface ILoginServiceToRegionsConnector 33 public interface ILoginServiceToRegionsConnector
34 { 34 {
35 bool RegionLoginsEnabled { get; }
36 void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message); 35 void LogOffUserFromGrid(ulong regionHandle, UUID AvatarID, UUID RegionSecret, string message);
37 bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason); 36 bool NewUserConnection(ulong regionHandle, AgentCircuitData agent, out string reason);
38 RegionInfo RequestClosestRegion(string region); 37 RegionInfo RequestClosestRegion(string region);
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
32{ 32{
33 public class MainServer 33 public class MainServer
34 { 34 {
35 private static BaseHttpServer instance; 35 private static BaseHttpServer instance = null;
36 private static Dictionary<uint, BaseHttpServer> m_Servers = 36 private static Dictionary<uint, BaseHttpServer> m_Servers =
37 new Dictionary<uint, BaseHttpServer>(); 37 new Dictionary<uint, BaseHttpServer>();
38 38
@@ -46,7 +46,7 @@ namespace OpenSim.Framework
46 { 46 {
47 if (port == 0) 47 if (port == 0)
48 return Instance; 48 return Instance;
49 if (port == Instance.Port) 49 if (instance != null && port == Instance.Port)
50 return Instance; 50 return Instance;
51 51
52 if (m_Servers.ContainsKey(port)) 52 if (m_Servers.ContainsKey(port))