diff options
author | diva | 2009-02-11 21:07:41 +0000 |
---|---|---|
committer | diva | 2009-02-11 21:07:41 +0000 |
commit | b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1 (patch) | |
tree | c7b8ebb8ce301eaacdb37929330252667143eddf /OpenSim/Framework | |
parent | * minor: remove some mono compiler warnings (diff) | |
download | opensim-SC_OLD-b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1.zip opensim-SC_OLD-b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1.tar.gz opensim-SC_OLD-b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1.tar.bz2 opensim-SC_OLD-b6e7e5ed424c4c26c3f86f8decbd2b15a5ab90e1.tar.xz |
Enforce estate bans on Teleports.
Diffstat (limited to 'OpenSim/Framework')
-rw-r--r-- | OpenSim/Framework/AgentCircuitManager.cs | 20 |
1 files changed, 16 insertions, 4 deletions
diff --git a/OpenSim/Framework/AgentCircuitManager.cs b/OpenSim/Framework/AgentCircuitManager.cs index 09333bd..56b40bd 100644 --- a/OpenSim/Framework/AgentCircuitManager.cs +++ b/OpenSim/Framework/AgentCircuitManager.cs | |||
@@ -81,13 +81,25 @@ namespace OpenSim.Framework | |||
81 | /// <param name="agentData"></param> | 81 | /// <param name="agentData"></param> |
82 | public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData) | 82 | public virtual void AddNewCircuit(uint circuitCode, AgentCircuitData agentData) |
83 | { | 83 | { |
84 | if (AgentCircuits.ContainsKey(circuitCode)) | 84 | lock (AgentCircuits) |
85 | { | 85 | { |
86 | AgentCircuits[circuitCode] = agentData; | 86 | if (AgentCircuits.ContainsKey(circuitCode)) |
87 | { | ||
88 | AgentCircuits[circuitCode] = agentData; | ||
89 | } | ||
90 | else | ||
91 | { | ||
92 | AgentCircuits.Add(circuitCode, agentData); | ||
93 | } | ||
87 | } | 94 | } |
88 | else | 95 | } |
96 | |||
97 | public virtual void RemoveCircuit(uint circuitCode) | ||
98 | { | ||
99 | lock (AgentCircuits) | ||
89 | { | 100 | { |
90 | AgentCircuits.Add(circuitCode, agentData); | 101 | if (AgentCircuits.ContainsKey(circuitCode)) |
102 | AgentCircuits.Remove(circuitCode); | ||
91 | } | 103 | } |
92 | } | 104 | } |
93 | 105 | ||