public void AddUser(UUID uuid, string firstName, string lastName, Dictionary<string, object> serviceUrls)
        {
            UserData ud = new UserData();
            ud.FirstName = firstName;
            ud.Id = uuid;
            ud.LastName = lastName;
            ud.ServerURLs = serviceUrls;
            if (ud.ServerURLs != null && ud.ServerURLs.ContainsKey(GetHandlers.Helpers_HomeURI))
                ud.HomeURL = ud.ServerURLs[GetHandlers.Helpers_HomeURI].ToString();
            else
                ud.HomeURL = "";
            if (ud.ServerURLs == null)
                ud.ServerURLs = new Dictionary<string, object>();

            m_generics.AddGeneric(UUID.Zero, "ForeignUsers", uuid.ToString(), ud.ToOSD());
        }
 public void AddUser(UUID uuid, string userData)
 {
     UserData user = new UserData();
     user.Id = uuid;
     UserAccount account = UserAccountService.GetUserAccount(null, uuid);
     if (account == null)
     {
         if (userData != null && userData != string.Empty)
         {
             bool addOne = false;
             string[] parts = userData.Split(';');
             if (parts.Length >= 1)
             {
                 UUID sid;
                 if (UUID.TryParse(parts[0], out sid))
                     addOne = true;
                 user.HomeURL = parts[addOne ? 1 : 0];
                 try
                 {
                     Uri uri = new Uri(parts[addOne ? 1 : 0]);
                     user.LastName = "@" + uri.Authority;
                 }
                 catch (UriFormatException)
                 {
                     user.LastName = "@unknown";
                 }
             }
             if (parts.Length >= 2)
                 user.FirstName = parts[addOne ? 2 : 1].Replace(' ', '.');
             m_generics.AddGeneric(UUID.Zero, "ForeignUsers", uuid.ToString(), user.ToOSD());
         }
     }
 }