29 using System.Collections.Generic;
30 using System.Reflection;
35 using OpenSim.Framework;
36 using OpenSim.Framework.Console;
37 using OpenSim.Region.Framework.Interfaces;
38 using OpenSim.Region.Framework.Scenes;
39 using OpenSim.Services.Interfaces;
43 [Extension(Path =
"/OpenSim/RegionModules", NodeName =
"RegionModule", Id =
"AccessModule")]
48 private List<Scene> m_SceneList =
new List<Scene>();
52 MainConsole.Instance.Commands.AddCommand(
"Users",
true,
55 "Enable simulator logins",
59 MainConsole.Instance.Commands.AddCommand(
"Users",
true,
62 "Disable simulator logins",
66 MainConsole.Instance.Commands.AddCommand(
"Users",
true,
84 get {
return "AccessModule"; }
87 public Type ReplaceableInterface
96 if (!m_SceneList.Contains(scene))
97 m_SceneList.Add(scene);
104 m_SceneList.Remove(scene);
115 foreach (
Scene s
in m_SceneList)
117 if (!ProcessCommand(s, cmd))
127 bool ProcessCommand(
Scene scene,
string[] cmd)
131 MainConsole.Instance.Output(
"Syntax: login enable|disable|status");
138 scene.LoginsEnabled =
true;
139 MainConsole.Instance.Output(String.Format(
"Logins are enabled for region {0}", scene.RegionInfo.RegionName));
142 scene.LoginsEnabled =
false;
143 MainConsole.Instance.Output(String.Format(
"Logins are disabled for region {0}", scene.RegionInfo.RegionName));
147 MainConsole.Instance.Output(String.Format(
"Login in {0} are enabled", scene.RegionInfo.RegionName));
149 MainConsole.Instance.Output(String.Format(
"Login in {0} are disabled", scene.RegionInfo.RegionName));
152 MainConsole.Instance.Output(
"Syntax: login enable|disable|status");
void Close()
This is the inverse to Initialise. After a Close(), this instance won't be usable anymore...
void AddRegion(Scene scene)
This is called whenever a Scene is added. For shared modules, this can happen several times...
void RegionLoaded(Scene scene)
This will be called once for every scene loaded. In a shared module this will be multiple times in on...
void Initialise(IConfigSource config)
This is called to initialize the region module. For shared modules, this is called exactly once...
static ICommandConsole Instance
void HandleLoginCommand(string module, string[] cmd)
Interactive OpenSim region server
void RemoveRegion(Scene scene)
This is called whenever a Scene is removed. For shared modules, this can happen several times...
void PostInitialise()
This is called exactly once after all the shared region-modules have been instanciated and IRegionMod...