public void Remove(UUID id) { lock (accessLock) { if (m_UUIDCache.TryGetValue(id, out UserAccount account)) { m_UUIDCache.Remove(id); if (account != null) { m_NameCache.Remove(account.Name.ToLowerInvariant()); } } } }
public bool LoginAgent(string userID, UUID sessionID, UUID secureSessionID) { bool inCache = ByUserCache.TryGetValue(userID, out PresenceData prevUser); if (!inCache) { PresenceData[] dataprv = m_Database.Get("UserID", userID); if (dataprv.Length > 0) { prevUser = dataprv[0]; } } if (!m_allowDuplicatePresences && (prevUser != null)) { m_Database.Delete("UserID", userID.ToString()); if (inCache) { BySessionCache.Remove(prevUser.SessionID); ByUserCache.Remove(userID); } } PresenceData data = new PresenceData(); data.UserID = userID; data.RegionID = UUID.Zero; data.SessionID = sessionID; data.Data = new Dictionary <string, string>(); data.Data["SecureSessionID"] = secureSessionID.ToString(); m_Database.Store(data); BySessionCache.Add(sessionID, data, EXPIREMS); ByUserCache.Add(userID, data, EXPIREMS); string prevUserStr = ""; if (prevUser != null) { prevUserStr = string.Format(". This user was already logged-in: session {0}, region {1}", prevUser.SessionID, prevUser.RegionID); } m_log.DebugFormat("[PRESENCE SERVICE]: LoginAgent: session {0}, user {1}, region {2}, secure session {3}{4}", data.SessionID, data.UserID, data.RegionID, secureSessionID, prevUserStr); return(true); }
public bool MoveItems(UUID principalID, List <InventoryItemBase> items) { List <string> idlist = new List <string>(); List <string> destlist = new List <string>(); foreach (InventoryItemBase item in items) { idlist.Add(item.ID.ToString()); m_ItemCache.Remove(item.ID); destlist.Add(item.Folder.ToString()); } Dictionary <string, object> ret = MakeRequest( new Dictionary <string, object> { { "METHOD", "MOVEITEMS" }, { "PRINCIPAL", principalID.ToString() }, { "IDLIST", idlist }, { "DESTLIST", destlist } }); return(CheckReturn(ret)); }
public void OnTeleportLureRequest(UUID lureID, uint teleportFlags, IClientAPI client) { if (!(client.Scene is Scene)) { return; } //Scene scene = (Scene)(client.Scene); if (m_PendingLures.TryGetValue(lureID, out GridInstantMessage im)) { m_PendingLures.Remove(lureID); Lure(client, teleportFlags, im); } else { m_log.DebugFormat("[HG LURE MODULE]: pending lure {0} not found", lureID); } }
public void RemoveAll(UUID userID) { m_RootFolders.Remove(userID); m_FolderTypes.Remove(userID); m_Inventories.Remove(userID); }
public UUID CreateGroup(UUID RequestingAgentID, GroupRecordDelegate d) { //m_log.DebugFormat("[Groups.RemoteConnector]: Creating group {0}", name); //reason = string.Empty; //ExtendedGroupRecord group = m_GroupsService.CreateGroup(RequestingAgentID.ToString(), name, charter, showInList, insigniaID, // membershipFee, openEnrollment, allowPublish, maturePublish, founderID, out reason); ExtendedGroupRecord group = d(); if (group == null) { return(UUID.Zero); } if (group.GroupID != UUID.Zero) { m_Cache.AddOrUpdate("group-" + group.GroupID.ToString(), group, GROUPS_CACHE_TIMEOUT); m_Cache.Remove("memberships-" + RequestingAgentID.ToString()); } return(group.GroupID); }
public bool LoggedOut(string userID, UUID sessionID, UUID region, Vector3 position, Vector3 lookat) { m_Infos.Remove(userID); return(m_RemoteConnector.LoggedOut(userID, sessionID, region, position, lookat)); }