diff options
author | Adam Frisby | 2008-04-30 21:43:47 +0000 |
---|---|---|
committer | Adam Frisby | 2008-04-30 21:43:47 +0000 |
commit | be20f41637b6c06ce3ab16bc25851b6e43468e12 (patch) | |
tree | c41081329891f4c24de704fc760fb9012954ac9d /OpenSim/Region/Environment/Modules/Avatar/Groups | |
parent | * Sometimes you know, you do something really stupid. (diff) | |
download | opensim-SC_OLD-be20f41637b6c06ce3ab16bc25851b6e43468e12.zip opensim-SC_OLD-be20f41637b6c06ce3ab16bc25851b6e43468e12.tar.gz opensim-SC_OLD-be20f41637b6c06ce3ab16bc25851b6e43468e12.tar.bz2 opensim-SC_OLD-be20f41637b6c06ce3ab16bc25851b6e43468e12.tar.xz |
* Cruft removal step #1. Cleaning Modules directory.
Diffstat (limited to 'OpenSim/Region/Environment/Modules/Avatar/Groups')
-rw-r--r-- | OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs | 111 |
1 files changed, 53 insertions, 58 deletions
diff --git a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs index 4b28ad7..c4906d2 100644 --- a/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs +++ b/OpenSim/Region/Environment/Modules/Avatar/Groups/GroupsModule.cs | |||
@@ -41,10 +41,12 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
41 | { | 41 | { |
42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); | 42 | private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); |
43 | 43 | ||
44 | private List<Scene> m_scene = new List<Scene>(); | ||
45 | private Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>(); | ||
46 | private Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>(); | ||
47 | private Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>(); | 44 | private Dictionary<LLUUID, GroupList> m_grouplistmap = new Dictionary<LLUUID, GroupList>(); |
45 | private Dictionary<LLUUID, GroupData> m_groupmap = new Dictionary<LLUUID, GroupData>(); | ||
46 | private Dictionary<LLUUID, IClientAPI> m_iclientmap = new Dictionary<LLUUID, IClientAPI>(); | ||
47 | private List<Scene> m_scene = new List<Scene>(); | ||
48 | |||
49 | #region IRegionModule Members | ||
48 | 50 | ||
49 | public void Initialise(Scene scene, IConfigSource config) | 51 | public void Initialise(Scene scene, IConfigSource config) |
50 | { | 52 | { |
@@ -58,6 +60,42 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
58 | //scene.EventManager. | 60 | //scene.EventManager. |
59 | } | 61 | } |
60 | 62 | ||
63 | public void PostInitialise() | ||
64 | { | ||
65 | } | ||
66 | |||
67 | public void Close() | ||
68 | { | ||
69 | m_log.Info("[GROUP]: Shutting down group module."); | ||
70 | lock (m_iclientmap) | ||
71 | { | ||
72 | m_iclientmap.Clear(); | ||
73 | } | ||
74 | |||
75 | lock (m_groupmap) | ||
76 | { | ||
77 | m_groupmap.Clear(); | ||
78 | } | ||
79 | |||
80 | lock (m_grouplistmap) | ||
81 | { | ||
82 | m_grouplistmap.Clear(); | ||
83 | } | ||
84 | GC.Collect(); | ||
85 | } | ||
86 | |||
87 | public string Name | ||
88 | { | ||
89 | get { return "GroupsModule"; } | ||
90 | } | ||
91 | |||
92 | public bool IsSharedModule | ||
93 | { | ||
94 | get { return true; } | ||
95 | } | ||
96 | |||
97 | #endregion | ||
98 | |||
61 | private void OnNewClient(IClientAPI client) | 99 | private void OnNewClient(IClientAPI client) |
62 | { | 100 | { |
63 | // All friends establishment protocol goes over instant message | 101 | // All friends establishment protocol goes over instant message |
@@ -115,7 +153,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
115 | string ActiveGroupTitle = ""; | 153 | string ActiveGroupTitle = ""; |
116 | 154 | ||
117 | bool foundUser = false; | 155 | bool foundUser = false; |
118 | 156 | ||
119 | lock (m_iclientmap) | 157 | lock (m_iclientmap) |
120 | { | 158 | { |
121 | if (m_iclientmap.ContainsKey(remoteClient.AgentId)) | 159 | if (m_iclientmap.ContainsKey(remoteClient.AgentId)) |
@@ -139,11 +177,9 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
139 | } | 177 | } |
140 | 178 | ||
141 | //remoteClient.SendAgentDataUpdate(AgentID, ActiveGroupID, firstname, lastname, ActiveGroupPowers, ActiveGroupName, ActiveGroupTitle); | 179 | //remoteClient.SendAgentDataUpdate(AgentID, ActiveGroupID, firstname, lastname, ActiveGroupPowers, ActiveGroupName, ActiveGroupTitle); |
142 | |||
143 | } | 180 | } |
144 | } | 181 | } |
145 | } | 182 | } |
146 | |||
147 | } | 183 | } |
148 | 184 | ||
149 | private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, | 185 | private void OnInstantMessage(IClientAPI client, LLUUID fromAgentID, |
@@ -183,7 +219,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
183 | m_iclientmap.Remove(agentID); | 219 | m_iclientmap.Remove(agentID); |
184 | } | 220 | } |
185 | } | 221 | } |
186 | 222 | ||
187 | lock (m_groupmap) | 223 | lock (m_groupmap) |
188 | { | 224 | { |
189 | if (m_groupmap.ContainsKey(agentID)) | 225 | if (m_groupmap.ContainsKey(agentID)) |
@@ -191,7 +227,7 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
191 | m_groupmap.Remove(agentID); | 227 | m_groupmap.Remove(agentID); |
192 | } | 228 | } |
193 | } | 229 | } |
194 | 230 | ||
195 | lock (m_grouplistmap) | 231 | lock (m_grouplistmap) |
196 | { | 232 | { |
197 | if (m_grouplistmap.ContainsKey(agentID)) | 233 | if (m_grouplistmap.ContainsKey(agentID)) |
@@ -201,63 +237,16 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
201 | } | 237 | } |
202 | GC.Collect(); | 238 | GC.Collect(); |
203 | } | 239 | } |
204 | |||
205 | public void PostInitialise() | ||
206 | { | ||
207 | } | ||
208 | |||
209 | public void Close() | ||
210 | { | ||
211 | m_log.Info("[GROUP]: Shutting down group module."); | ||
212 | lock (m_iclientmap) | ||
213 | { | ||
214 | m_iclientmap.Clear(); | ||
215 | } | ||
216 | |||
217 | lock (m_groupmap) | ||
218 | { | ||
219 | m_groupmap.Clear(); | ||
220 | } | ||
221 | |||
222 | lock (m_grouplistmap) | ||
223 | { | ||
224 | m_grouplistmap.Clear(); | ||
225 | } | ||
226 | GC.Collect(); | ||
227 | } | ||
228 | |||
229 | public string Name | ||
230 | { | ||
231 | get { return "GroupsModule"; } | ||
232 | } | ||
233 | |||
234 | public bool IsSharedModule | ||
235 | { | ||
236 | get { return true; } | ||
237 | } | ||
238 | |||
239 | } | 240 | } |
240 | 241 | ||
241 | public class GroupData | 242 | public class GroupData |
242 | { | 243 | { |
244 | public string ActiveGroupTitle; | ||
243 | public LLUUID GroupID; | 245 | public LLUUID GroupID; |
246 | public List<LLUUID> GroupMembers; | ||
244 | public string groupName; | 247 | public string groupName; |
245 | public string ActiveGroupTitle; | 248 | public uint groupPowers = (uint) (GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome); |
246 | public List<string> GroupTitles; | 249 | public List<string> GroupTitles; |
247 | public List<LLUUID> GroupMembers; | ||
248 | public uint groupPowers = (uint)(GroupPowers.LandAllowLandmark | GroupPowers.LandAllowSetHome); | ||
249 | |||
250 | public GroupPowers ActiveGroupPowers | ||
251 | { | ||
252 | set | ||
253 | { | ||
254 | groupPowers = (uint) value; | ||
255 | } | ||
256 | get | ||
257 | { | ||
258 | return (GroupPowers)groupPowers; | ||
259 | } | ||
260 | } | ||
261 | 250 | ||
262 | public GroupData() | 251 | public GroupData() |
263 | { | 252 | { |
@@ -265,11 +254,17 @@ namespace OpenSim.Region.Environment.Modules.Avatar.Groups | |||
265 | GroupMembers = new List<LLUUID>(); | 254 | GroupMembers = new List<LLUUID>(); |
266 | } | 255 | } |
267 | 256 | ||
257 | public GroupPowers ActiveGroupPowers | ||
258 | { | ||
259 | set { groupPowers = (uint) value; } | ||
260 | get { return (GroupPowers) groupPowers; } | ||
261 | } | ||
268 | } | 262 | } |
269 | 263 | ||
270 | public class GroupList | 264 | public class GroupList |
271 | { | 265 | { |
272 | public List<LLUUID> m_GroupList; | 266 | public List<LLUUID> m_GroupList; |
267 | |||
273 | public GroupList() | 268 | public GroupList() |
274 | { | 269 | { |
275 | m_GroupList = new List<LLUUID>(); | 270 | m_GroupList = new List<LLUUID>(); |