diff options
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Framework/SLUtil.cs | 30 | ||||
-rw-r--r-- | OpenSim/Framework/Servers/BaseOpenSimServer.cs | 4 |
2 files changed, 17 insertions, 17 deletions
diff --git a/OpenSim/Framework/SLUtil.cs b/OpenSim/Framework/SLUtil.cs index 537de7a..cb73e8f 100644 --- a/OpenSim/Framework/SLUtil.cs +++ b/OpenSim/Framework/SLUtil.cs | |||
@@ -247,12 +247,18 @@ namespace OpenSim.Framework | |||
247 | /// <returns></returns> | 247 | /// <returns></returns> |
248 | public static List<string> ParseNotecardToList(string rawInput) | 248 | public static List<string> ParseNotecardToList(string rawInput) |
249 | { | 249 | { |
250 | string[] input = rawInput.Replace("\r", "").Split('\n'); | 250 | string[] input; |
251 | int idx = 0; | 251 | int idx = 0; |
252 | int level = 0; | 252 | int level = 0; |
253 | List<string> output = new List<string>(); | 253 | List<string> output = new List<string>(); |
254 | string[] words; | 254 | string[] words; |
255 | 255 | ||
256 | //The Linden format always ends with a } after the input data. | ||
257 | //Strip off trailing } so there is nothing after the input data. | ||
258 | int i = rawInput.LastIndexOf("}"); | ||
259 | rawInput = rawInput.Remove(i, rawInput.Length-i); | ||
260 | input = rawInput.Replace("\r", "").Split('\n'); | ||
261 | |||
256 | while (idx < input.Length) | 262 | while (idx < input.Length) |
257 | { | 263 | { |
258 | if (input[idx] == "{") | 264 | if (input[idx] == "{") |
@@ -287,24 +293,18 @@ namespace OpenSim.Framework | |||
287 | break; | 293 | break; |
288 | if (words[0] == "Text") | 294 | if (words[0] == "Text") |
289 | { | 295 | { |
290 | int len = int.Parse(words[2]); | 296 | idx++; //Now points to first line of notecard text |
291 | idx++; | ||
292 | 297 | ||
293 | int count = -1; | 298 | //Number of lines in notecard. |
299 | int lines = input.Length - idx; | ||
300 | int line = 0; | ||
294 | 301 | ||
295 | while (count < len && idx < input.Length) | 302 | while (line < lines) |
296 | { | 303 | { |
297 | // int l = input[idx].Length; | 304 | // m_log.DebugFormat("[PARSE NOTECARD]: Adding line {0}", input[idx]); |
298 | string ln = input[idx]; | 305 | output.Add(input[idx]); |
299 | |||
300 | int need = len-count-1; | ||
301 | if (ln.Length > need) | ||
302 | ln = ln.Substring(0, need); | ||
303 | |||
304 | // m_log.DebugFormat("[PARSE NOTECARD]: Adding line {0}", ln); | ||
305 | output.Add(ln); | ||
306 | count += ln.Length + 1; | ||
307 | idx++; | 306 | idx++; |
307 | line++; | ||
308 | } | 308 | } |
309 | 309 | ||
310 | return output; | 310 | return output; |
diff --git a/OpenSim/Framework/Servers/BaseOpenSimServer.cs b/OpenSim/Framework/Servers/BaseOpenSimServer.cs index 4ab6908..566772d 100644 --- a/OpenSim/Framework/Servers/BaseOpenSimServer.cs +++ b/OpenSim/Framework/Servers/BaseOpenSimServer.cs | |||
@@ -135,8 +135,8 @@ namespace OpenSim.Framework.Servers | |||
135 | 135 | ||
136 | TimeSpan timeTaken = DateTime.Now - m_startuptime; | 136 | TimeSpan timeTaken = DateTime.Now - m_startuptime; |
137 | 137 | ||
138 | m_log.InfoFormat( | 138 | MainConsole.Instance.OutputFormat( |
139 | "[STARTUP]: Non-script portion of startup took {0}m {1}s. PLEASE WAIT FOR LOGINS TO BE ENABLED ON REGIONS ONCE SCRIPTS HAVE STARTED.", | 139 | "PLEASE WAIT FOR LOGINS TO BE ENABLED ON REGIONS ONCE SCRIPTS HAVE STARTED. Non-script portion of startup took {0}m {1}s.", |
140 | timeTaken.Minutes, timeTaken.Seconds); | 140 | timeTaken.Minutes, timeTaken.Seconds); |
141 | } | 141 | } |
142 | 142 | ||