aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/UserServer
diff options
context:
space:
mode:
authorTeravus Ovares (Dan Olivares)2009-08-19 14:43:18 -0400
committerTeravus Ovares (Dan Olivares)2009-08-19 14:43:18 -0400
commit289439c8329d992251769aa83e3d7809f651de26 (patch)
tree8a1e596190f197fa5f70f21a8c968d2c55004cde /OpenSim/Grid/UserServer
parentAdd Border (a virtual border management class) (diff)
parentAdded MoveItems, which is most useful upon viewer-delete inventory operation.... (diff)
downloadopensim-SC_OLD-289439c8329d992251769aa83e3d7809f651de26.zip
opensim-SC_OLD-289439c8329d992251769aa83e3d7809f651de26.tar.gz
opensim-SC_OLD-289439c8329d992251769aa83e3d7809f651de26.tar.bz2
opensim-SC_OLD-289439c8329d992251769aa83e3d7809f651de26.tar.xz
Merge branch 'master' of ssh://MyConnection/var/git/opensim
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/UserServer/Main.cs38
1 files changed, 37 insertions, 1 deletions
diff --git a/OpenSim/Grid/UserServer/Main.cs b/OpenSim/Grid/UserServer/Main.cs
index 86c2abb..1ee53ef 100644
--- a/OpenSim/Grid/UserServer/Main.cs
+++ b/OpenSim/Grid/UserServer/Main.cs
@@ -43,6 +43,7 @@ using OpenSim.Framework.Statistics;
43using OpenSim.Grid.Communications.OGS1; 43using OpenSim.Grid.Communications.OGS1;
44using OpenSim.Grid.Framework; 44using OpenSim.Grid.Framework;
45using OpenSim.Grid.UserServer.Modules; 45using OpenSim.Grid.UserServer.Modules;
46using Nini.Config;
46 47
47namespace OpenSim.Grid.UserServer 48namespace OpenSim.Grid.UserServer
48{ 49{
@@ -73,8 +74,22 @@ namespace OpenSim.Grid.UserServer
73 74
74 protected AvatarCreationModule m_appearanceModule; 75 protected AvatarCreationModule m_appearanceModule;
75 76
77 protected static string m_consoleType = "local";
78 protected static IConfigSource m_config = null;
79
76 public static void Main(string[] args) 80 public static void Main(string[] args)
77 { 81 {
82 ArgvConfigSource argvSource = new ArgvConfigSource(args);
83 argvSource.AddSwitch("Startup", "console", "c");
84
85 IConfig startupConfig = argvSource.Configs["Startup"];
86 if (startupConfig != null)
87 {
88 m_consoleType = startupConfig.GetString("console", "local");
89 }
90
91 m_config = argvSource;
92
78 XmlConfigurator.Configure(); 93 XmlConfigurator.Configure();
79 94
80 m_log.Info("Launching UserServer..."); 95 m_log.Info("Launching UserServer...");
@@ -87,7 +102,18 @@ namespace OpenSim.Grid.UserServer
87 102
88 public OpenUser_Main() 103 public OpenUser_Main()
89 { 104 {
90 m_console = new LocalConsole("User"); 105 switch (m_consoleType)
106 {
107 case "rest":
108 m_console = new RemoteConsole("User");
109 break;
110 case "basic":
111 m_console = new CommandConsole("User");
112 break;
113 default:
114 m_console = new LocalConsole("User");
115 break;
116 }
91 MainConsole.Instance = m_console; 117 MainConsole.Instance = m_console;
92 } 118 }
93 119
@@ -129,6 +155,16 @@ namespace OpenSim.Grid.UserServer
129 155
130 m_httpServer = new BaseHttpServer(Cfg.HttpPort); 156 m_httpServer = new BaseHttpServer(Cfg.HttpPort);
131 157
158 if (m_console is RemoteConsole)
159 {
160 RemoteConsole c = (RemoteConsole)m_console;
161 c.SetServer(m_httpServer);
162 IConfig netConfig = m_config.AddConfig("Network");
163 netConfig.Set("ConsoleUser", Cfg.ConsoleUser);
164 netConfig.Set("ConsolePass", Cfg.ConsolePass);
165 c.ReadConfig(m_config);
166 }
167
132 RegisterInterface<CommandConsole>(m_console); 168 RegisterInterface<CommandConsole>(m_console);
133 RegisterInterface<UserConfig>(Cfg); 169 RegisterInterface<UserConfig>(Cfg);
134 170