public void RemoveAgent(UUID uuid) { string name = Agent.Name(uuid); Agent user = Get(name); if (user != null) { m_log.InfoFormat("[MurmurVoice] Removing registered user {0}", user.name); m_server.unregisterUser(user.userid); lock (name_to_agent) name_to_agent.Remove(user.name); } }
public Agent GetOrCreate(UUID uuid) { string name = Agent.Name(uuid); lock (name_to_agent) if (name_to_agent.ContainsKey(name)) { return(name_to_agent[name]); } else { Agent a = Add(uuid); return(a); } }