aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework
diff options
context:
space:
mode:
authorJonathan Freedman2010-11-21 20:01:48 -0800
committerJonathan Freedman2010-11-21 20:01:48 -0800
commitb7f5e8284360f92e0e102b9546076573c57d9397 (patch)
tree132663da8c1882e524241b55a739ef2758ef8958 /OpenSim/Framework
parentMerge https://github.com/opensim/opensim into mantis5110 (diff)
parentMerge branch 'master' of /var/git/opensim/ (diff)
downloadopensim-SC_OLD-b7f5e8284360f92e0e102b9546076573c57d9397.zip
opensim-SC_OLD-b7f5e8284360f92e0e102b9546076573c57d9397.tar.gz
opensim-SC_OLD-b7f5e8284360f92e0e102b9546076573c57d9397.tar.bz2
opensim-SC_OLD-b7f5e8284360f92e0e102b9546076573c57d9397.tar.xz
Merge branch 'master-core' into mantis5110
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r--OpenSim/Framework/Console/LocalConsole.cs11
-rw-r--r--OpenSim/Framework/ISceneObject.cs1
-rw-r--r--OpenSim/Framework/InventoryItemBase.cs50
-rw-r--r--OpenSim/Framework/TaskInventoryItem.cs56
-rw-r--r--OpenSim/Framework/Util.cs8
5 files changed, 123 insertions, 3 deletions
diff --git a/OpenSim/Framework/Console/LocalConsole.cs b/OpenSim/Framework/Console/LocalConsole.cs
index 5f2f404..eda41b8 100644
--- a/OpenSim/Framework/Console/LocalConsole.cs
+++ b/OpenSim/Framework/Console/LocalConsole.cs
@@ -473,9 +473,11 @@ namespace OpenSim.Framework.Console
473 y = -1; 473 y = -1;
474 } 474 }
475 475
476 string commandLine = cmdline.ToString();
477
476 if (isCommand) 478 if (isCommand)
477 { 479 {
478 string[] cmd = Commands.Resolve(Parser.Parse(cmdline.ToString())); 480 string[] cmd = Commands.Resolve(Parser.Parse(commandLine));
479 481
480 if (cmd.Length != 0) 482 if (cmd.Length != 0)
481 { 483 {
@@ -491,8 +493,11 @@ namespace OpenSim.Framework.Console
491 } 493 }
492 } 494 }
493 495
494 //AddToHistory(cmdline.ToString()); 496 // If we're not echoing to screen (e.g. a password) then we probably don't want it in history
495 return cmdline.ToString(); 497 if (echo && commandLine != "")
498 AddToHistory(commandLine);
499
500 return commandLine;
496 default: 501 default:
497 break; 502 break;
498 } 503 }
diff --git a/OpenSim/Framework/ISceneObject.cs b/OpenSim/Framework/ISceneObject.cs
index 5147901..18631f1 100644
--- a/OpenSim/Framework/ISceneObject.cs
+++ b/OpenSim/Framework/ISceneObject.cs
@@ -39,5 +39,6 @@ namespace OpenSim.Framework
39 void ExtraFromXmlString(string xmlstr); 39 void ExtraFromXmlString(string xmlstr);
40 string GetStateSnapshot(); 40 string GetStateSnapshot();
41 void SetState(string xmlstr, IScene s); 41 void SetState(string xmlstr, IScene s);
42 bool HasGroupChanged { get; set; }
42 } 43 }
43} 44}
diff --git a/OpenSim/Framework/InventoryItemBase.cs b/OpenSim/Framework/InventoryItemBase.cs
index aeb01e2..ce4fc38 100644
--- a/OpenSim/Framework/InventoryItemBase.cs
+++ b/OpenSim/Framework/InventoryItemBase.cs
@@ -117,6 +117,56 @@ namespace OpenSim.Framework
117 } 117 }
118 protected UUID m_creatorIdAsUuid = UUID.Zero; 118 protected UUID m_creatorIdAsUuid = UUID.Zero;
119 119
120 protected string m_creatorData;
121 public string CreatorData // = <profile url>;<name>
122 {
123 get { return m_creatorData; }
124 set { m_creatorData = value; }
125 }
126
127 /// <summary>
128 /// Used by the DB layer to retrieve / store the entire user identification.
129 /// The identification can either be a simple UUID or a string of the form
130 /// uuid[;profile_url[;name]]
131 /// </summary>
132 public string CreatorIdentification
133 {
134 get
135 {
136 if (m_creatorData != null && m_creatorData != string.Empty)
137 return m_creatorId + ';' + m_creatorData;
138 else
139 return m_creatorId;
140 }
141 set
142 {
143 if ((value == null) || (value != null && value == string.Empty))
144 {
145 m_creatorData = string.Empty;
146 return;
147 }
148
149 if (!value.Contains(";")) // plain UUID
150 {
151 m_creatorId = value;
152 }
153 else // <uuid>[;<endpoint>[;name]]
154 {
155 string name = "Unknown User";
156 string[] parts = value.Split(';');
157 if (parts.Length >= 1)
158 m_creatorId = parts[0];
159 if (parts.Length >= 2)
160 m_creatorData = parts[1];
161 if (parts.Length >= 3)
162 name = parts[2];
163
164 m_creatorData += ';' + name;
165
166 }
167 }
168 }
169
120 /// <value> 170 /// <value>
121 /// The description of the inventory item (must be less than 64 characters) 171 /// The description of the inventory item (must be less than 64 characters)
122 /// </value> 172 /// </value>
diff --git a/OpenSim/Framework/TaskInventoryItem.cs b/OpenSim/Framework/TaskInventoryItem.cs
index df5b936..30d775c 100644
--- a/OpenSim/Framework/TaskInventoryItem.cs
+++ b/OpenSim/Framework/TaskInventoryItem.cs
@@ -102,6 +102,7 @@ namespace OpenSim.Framework
102 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL; 102 private uint _baseMask = FULL_MASK_PERMISSIONS_GENERAL;
103 private uint _creationDate = 0; 103 private uint _creationDate = 0;
104 private UUID _creatorID = UUID.Zero; 104 private UUID _creatorID = UUID.Zero;
105 private string _creatorData = String.Empty;
105 private string _description = String.Empty; 106 private string _description = String.Empty;
106 private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL; 107 private uint _everyoneMask = FULL_MASK_PERMISSIONS_GENERAL;
107 private uint _flags = 0; 108 private uint _flags = 0;
@@ -160,6 +161,61 @@ namespace OpenSim.Framework
160 } 161 }
161 } 162 }
162 163
164 public string CreatorData // = <profile url>;<name>
165 {
166 get { return _creatorData; }
167 set { _creatorData = value; }
168 }
169
170 /// <summary>
171 /// Used by the DB layer to retrieve / store the entire user identification.
172 /// The identification can either be a simple UUID or a string of the form
173 /// uuid[;profile_url[;name]]
174 /// </summary>
175 public string CreatorIdentification
176 {
177 get
178 {
179 if (_creatorData != null && _creatorData != string.Empty)
180 return _creatorID.ToString() + ';' + _creatorData;
181 else
182 return _creatorID.ToString();
183 }
184 set
185 {
186 if ((value == null) || (value != null && value == string.Empty))
187 {
188 _creatorData = string.Empty;
189 return;
190 }
191
192 if (!value.Contains(";")) // plain UUID
193 {
194 UUID uuid = UUID.Zero;
195 UUID.TryParse(value, out uuid);
196 _creatorID = uuid;
197 }
198 else // <uuid>[;<endpoint>[;name]]
199 {
200 string name = "Unknown User";
201 string[] parts = value.Split(';');
202 if (parts.Length >= 1)
203 {
204 UUID uuid = UUID.Zero;
205 UUID.TryParse(parts[0], out uuid);
206 _creatorID = uuid;
207 }
208 if (parts.Length >= 2)
209 _creatorData = parts[1];
210 if (parts.Length >= 3)
211 name = parts[2];
212
213 _creatorData += ';' + name;
214
215 }
216 }
217 }
218
163 public string Description { 219 public string Description {
164 get { 220 get {
165 return _description; 221 return _description;
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index addfe5d..e8f8e01 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -451,6 +451,14 @@ namespace OpenSim.Framework
451 return (x + y - (min >> 1) - (min >> 2) + (min >> 4)); 451 return (x + y - (min >> 1) - (min >> 2) + (min >> 4));
452 } 452 }
453 453
454 /// <summary>
455 /// Are the co-ordinates of the new region visible from the old region?
456 /// </summary>
457 /// <param name="oldx">Old region x-coord</param>
458 /// <param name="newx">New region x-coord</param>
459 /// <param name="oldy">Old region y-coord</param>
460 /// <param name="newy">New region y-coord</param>
461 /// <returns></returns>
454 public static bool IsOutsideView(uint oldx, uint newx, uint oldy, uint newy) 462 public static bool IsOutsideView(uint oldx, uint newx, uint oldy, uint newy)
455 { 463 {
456 // Eventually this will be a function of the draw distance / camera position too. 464 // Eventually this will be a function of the draw distance / camera position too.