aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Region/Framework/Scenes/Scene.cs
diff options
context:
space:
mode:
authoronefang2021-07-24 00:44:57 +1000
committeronefang2021-07-24 00:44:57 +1000
commitf4e5bd828bfaa242ac986040ab9ce29fb7323fd8 (patch)
tree3f8f198711c08b771f5f3ef657a306fd3b475627 /OpenSim/Region/Framework/Scenes/Scene.cs
parentSet the tmux pane title and active pane border. (diff)
downloadopensim-SC-f4e5bd828bfaa242ac986040ab9ce29fb7323fd8.zip
opensim-SC-f4e5bd828bfaa242ac986040ab9ce29fb7323fd8.tar.gz
opensim-SC-f4e5bd828bfaa242ac986040ab9ce29fb7323fd8.tar.bz2
opensim-SC-f4e5bd828bfaa242ac986040ab9ce29fb7323fd8.tar.xz
Auto add groups for all hypergridders.
Diffstat (limited to 'OpenSim/Region/Framework/Scenes/Scene.cs')
-rw-r--r--OpenSim/Region/Framework/Scenes/Scene.cs43
1 files changed, 43 insertions, 0 deletions
diff --git a/OpenSim/Region/Framework/Scenes/Scene.cs b/OpenSim/Region/Framework/Scenes/Scene.cs
index 5819695..05b0f62 100644
--- a/OpenSim/Region/Framework/Scenes/Scene.cs
+++ b/OpenSim/Region/Framework/Scenes/Scene.cs
@@ -1177,6 +1177,18 @@ namespace OpenSim.Region.Framework.Scenes
1177 m_log.Warn("[SCENE]: Duplicated AddDefaultGroup option."); 1177 m_log.Warn("[SCENE]: Duplicated AddDefaultGroup option.");
1178 } 1178 }
1179 } 1179 }
1180 groups = groupsConfig.GetString("AddHGDefaultGroup", string.Empty);
1181 if (groups.Length > 0)
1182 {
1183 try
1184 {
1185 m_AutoGroups.Add("HYPERGRIDDER", groups.Split('|'));
1186 }
1187 catch (ArgumentException)
1188 {
1189 m_log.Warn("[SCENE]: Duplicated AddDefaultGroup option.");
1190 }
1191 }
1180 string[] keys = groupsConfig.GetKeys(); 1192 string[] keys = groupsConfig.GetKeys();
1181 if (0 < keys.Length) 1193 if (0 < keys.Length)
1182 { 1194 {
@@ -4494,6 +4506,37 @@ namespace OpenSim.Region.Framework.Scenes
4494 m_log.ErrorFormat("[CONNECTION BEGIN]: Bogus group {0}, not adding {1}.", name, agent.AgentID); 4506 m_log.ErrorFormat("[CONNECTION BEGIN]: Bogus group {0}, not adding {1}.", name, agent.AgentID);
4495 } 4507 }
4496 } 4508 }
4509 if (!isLocal)
4510 {
4511 groupIDs = null;
4512 try
4513 {
4514 groupIDs = m_AutoGroups["HYPERGRIDDER"];
4515 }
4516 catch (KeyNotFoundException)
4517 {
4518 // Do nothing.
4519 }
4520 if (null != groupIDs)
4521 {
4522 foreach(string name in groupIDs)
4523 {
4524 GroupRecord g = m_groupsModule.GetGroupRecord(name);
4525 if (null != g)
4526 {
4527 UUID group = g.GroupID;
4528 if(!agentGroups.Contains(group))
4529 {
4530 m_groupsModule.JoinGroup(agent.AgentID.ToString(), group);
4531 agentGroups.Add(group);
4532 m_log.InfoFormat("[CONNECTION BEGIN]: Automatically added {0} to group {1}.", agent.AgentID, name);
4533 }
4534 }
4535 else
4536 m_log.ErrorFormat("[CONNECTION BEGIN]: Bogus group {0}, not adding {1}.", name, agent.AgentID);
4537 }
4538 }
4539 }
4497 } 4540 }
4498 } 4541 }
4499 4542