aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Framework/Util.cs
diff options
context:
space:
mode:
Diffstat (limited to 'OpenSim/Framework/Util.cs')
-rw-r--r--OpenSim/Framework/Util.cs48
1 files changed, 48 insertions, 0 deletions
diff --git a/OpenSim/Framework/Util.cs b/OpenSim/Framework/Util.cs
index 0f1f0d9..37ddb3e 100644
--- a/OpenSim/Framework/Util.cs
+++ b/OpenSim/Framework/Util.cs
@@ -597,5 +597,53 @@ namespace OpenSim.Framework
597 597
598 return ret; 598 return ret;
599 } 599 }
600 public static string[] ParseStartLocationRequest(string startLocationRequest)
601 {
602 string[] returnstring = new string[4];
603 // format uri:RegionName&X&Y&Z
604 returnstring[0] = "last";
605 returnstring[1] = "127";
606 returnstring[2] = "127";
607 returnstring[3] = "0";
608 // This is the crappy way of doing it.
609
610 if (startLocationRequest.Contains(":") && startLocationRequest.Contains("&"))
611 {
612 //System.Console.WriteLine("StartLocationRequest Contains proper elements");
613
614 string[] splitstr = startLocationRequest.Split(':');//,2,StringSplitOptions.RemoveEmptyEntries);
615
616 //System.Console.WriteLine("Found " + splitstr.GetLength(0) + " elements in 1st split result");
617
618 if (splitstr.GetLength(0) == 2)
619 {
620
621 string[] splitstr2 = splitstr[1].Split('&');//, 4, StringSplitOptions.RemoveEmptyEntries);
622
623 //System.Console.WriteLine("Found " + splitstr2.GetLength(0) + " elements in 2nd split result");
624
625 if (splitstr2.GetLength(0) >= 1)
626 {
627 returnstring[0] = splitstr2[0];
628 }
629 if (splitstr2.GetLength(0) >= 2)
630 {
631 returnstring[1] = splitstr2[1];
632 }
633 if (splitstr2.GetLength(0) >= 3)
634 {
635 returnstring[2] = splitstr2[2];
636 }
637 if (splitstr2.GetLength(0) >= 4)
638 {
639 returnstring[3] = splitstr2[3];
640 }
641 }
642
643 }
644 return returnstring;
645
646
647 }
600 } 648 }
601} 649}