aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/OpenSim/Grid/MessagingServer/Main.cs
diff options
context:
space:
mode:
authorAdam Frisby2008-05-01 16:41:01 +0000
committerAdam Frisby2008-05-01 16:41:01 +0000
commitfc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8 (patch)
tree90a4799fa43e3761ffbe669d1d87837933d8db53 /OpenSim/Grid/MessagingServer/Main.cs
parent* Deletes my EventReader ScriptRewriter. It isn't required to rewrite the sc... (diff)
downloadopensim-SC-fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8.zip
opensim-SC-fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8.tar.gz
opensim-SC-fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8.tar.bz2
opensim-SC-fc6c4dc399587f6f920d3f0759b1bd7a8b9b4ac8.tar.xz
* Cleaning code still.
Diffstat (limited to '')
-rw-r--r--OpenSim/Grid/MessagingServer/Main.cs78
1 files changed, 41 insertions, 37 deletions
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs
index bf793bf..e6e18d4 100644
--- a/OpenSim/Grid/MessagingServer/Main.cs
+++ b/OpenSim/Grid/MessagingServer/Main.cs
@@ -44,9 +44,42 @@ namespace OpenSim.Grid.MessagingServer
44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType); 44 private static readonly ILog m_log = LogManager.GetLogger(MethodBase.GetCurrentMethod().DeclaringType);
45 45
46 private MessageServerConfig Cfg; 46 private MessageServerConfig Cfg;
47 private MessageService msgsvc; 47
48
49 private LLUUID m_lastCreatedUser = LLUUID.Random(); 48 private LLUUID m_lastCreatedUser = LLUUID.Random();
49 private MessageService msgsvc;
50
51 private OpenMessage_Main()
52 {
53 m_console = new ConsoleBase("OpenMessage", this);
54 MainConsole.Instance = m_console;
55 }
56
57 #region conscmd_callback Members
58
59 public override void RunCmd(string cmd, string[] cmdparams)
60 {
61 base.RunCmd(cmd, cmdparams);
62
63 switch (cmd)
64 {
65 case "help":
66 m_console.Notice("shutdown - shutdown the message server (USE CAUTION!)");
67 break;
68
69 case "shutdown":
70 msgsvc.deregisterWithUserServer();
71 m_console.Close();
72 Environment.Exit(0);
73 break;
74 }
75 }
76
77 public override void Show(string ShowWhat)
78 {
79 base.Show(ShowWhat);
80 }
81
82 #endregion
50 83
51 [STAThread] 84 [STAThread]
52 public static void Main(string[] args) 85 public static void Main(string[] args)
@@ -55,7 +88,6 @@ namespace OpenSim.Grid.MessagingServer
55 88
56 m_log.Info("Launching MessagingServer..."); 89 m_log.Info("Launching MessagingServer...");
57 90
58
59 91
60 OpenMessage_Main messageserver = new OpenMessage_Main(); 92 OpenMessage_Main messageserver = new OpenMessage_Main();
61 93
@@ -63,12 +95,6 @@ namespace OpenSim.Grid.MessagingServer
63 messageserver.Work(); 95 messageserver.Work();
64 } 96 }
65 97
66 private OpenMessage_Main()
67 {
68 m_console = new ConsoleBase("OpenMessage", this);
69 MainConsole.Instance = m_console;
70 }
71
72 private void Work() 98 private void Work()
73 { 99 {
74 m_console.Notice("Enter help for a list of commands\n"); 100 m_console.Notice("Enter help for a list of commands\n");
@@ -118,12 +144,13 @@ namespace OpenSim.Grid.MessagingServer
118 switch (what) 144 switch (what)
119 { 145 {
120 case "user": 146 case "user":
121 147
122 try 148 try
123 { 149 {
124 //userID = 150 //userID =
125 //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); 151 //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY);
126 } catch (Exception ex) 152 }
153 catch (Exception ex)
127 { 154 {
128 m_console.Error("[SERVER]: Error creating user: {0}", ex.ToString()); 155 m_console.Error("[SERVER]: Error creating user: {0}", ex.ToString());
129 } 156 }
@@ -131,7 +158,7 @@ namespace OpenSim.Grid.MessagingServer
131 try 158 try
132 { 159 {
133 //RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/", 160 //RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/",
134 //userID.UUID); 161 //userID.UUID);
135 } 162 }
136 catch (Exception ex) 163 catch (Exception ex)
137 { 164 {
@@ -141,28 +168,5 @@ namespace OpenSim.Grid.MessagingServer
141 break; 168 break;
142 } 169 }
143 } 170 }
144
145 public override void RunCmd(string cmd, string[] cmdparams)
146 {
147 base.RunCmd(cmd, cmdparams);
148
149 switch (cmd)
150 {
151 case "help":
152 m_console.Notice("shutdown - shutdown the message server (USE CAUTION!)");
153 break;
154
155 case "shutdown":
156 msgsvc.deregisterWithUserServer();
157 m_console.Close();
158 Environment.Exit(0);
159 break;
160 }
161 }
162
163 public override void Show(string ShowWhat)
164 {
165 base.Show(ShowWhat);
166 }
167 } 171 }
168} 172} \ No newline at end of file