diff options
author | Adam Frisby | 2008-05-01 18:04:42 +0000 |
---|---|---|
committer | Adam Frisby | 2008-05-01 18:04:42 +0000 |
commit | 20a9bf08f51351e1e0a9de94f184ff56cd572665 (patch) | |
tree | 52da64dab26353b903c8e4befed0178fa72a188b /OpenSim/Grid/MessagingServer/Main.cs | |
parent | More config cleanup in LaunchSLClient. (diff) | |
download | opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.zip opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.gz opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.bz2 opensim-SC_OLD-20a9bf08f51351e1e0a9de94f184ff56cd572665.tar.xz |
* Rolled back a few changes.
Diffstat (limited to '')
-rw-r--r-- | OpenSim/Grid/MessagingServer/Main.cs | 78 |
1 files changed, 37 insertions, 41 deletions
diff --git a/OpenSim/Grid/MessagingServer/Main.cs b/OpenSim/Grid/MessagingServer/Main.cs index e6e18d4..bf793bf 100644 --- a/OpenSim/Grid/MessagingServer/Main.cs +++ b/OpenSim/Grid/MessagingServer/Main.cs | |||
@@ -44,42 +44,9 @@ 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 | |||
48 | private LLUUID m_lastCreatedUser = LLUUID.Random(); | ||
49 | private MessageService msgsvc; | 47 | private MessageService msgsvc; |
50 | 48 | ||
51 | private OpenMessage_Main() | 49 | private LLUUID m_lastCreatedUser = LLUUID.Random(); |
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 | ||
83 | 50 | ||
84 | [STAThread] | 51 | [STAThread] |
85 | public static void Main(string[] args) | 52 | public static void Main(string[] args) |
@@ -88,6 +55,7 @@ namespace OpenSim.Grid.MessagingServer | |||
88 | 55 | ||
89 | m_log.Info("Launching MessagingServer..."); | 56 | m_log.Info("Launching MessagingServer..."); |
90 | 57 | ||
58 | |||
91 | 59 | ||
92 | OpenMessage_Main messageserver = new OpenMessage_Main(); | 60 | OpenMessage_Main messageserver = new OpenMessage_Main(); |
93 | 61 | ||
@@ -95,6 +63,12 @@ namespace OpenSim.Grid.MessagingServer | |||
95 | messageserver.Work(); | 63 | messageserver.Work(); |
96 | } | 64 | } |
97 | 65 | ||
66 | private OpenMessage_Main() | ||
67 | { | ||
68 | m_console = new ConsoleBase("OpenMessage", this); | ||
69 | MainConsole.Instance = m_console; | ||
70 | } | ||
71 | |||
98 | private void Work() | 72 | private void Work() |
99 | { | 73 | { |
100 | m_console.Notice("Enter help for a list of commands\n"); | 74 | m_console.Notice("Enter help for a list of commands\n"); |
@@ -144,13 +118,12 @@ namespace OpenSim.Grid.MessagingServer | |||
144 | switch (what) | 118 | switch (what) |
145 | { | 119 | { |
146 | case "user": | 120 | case "user": |
147 | 121 | ||
148 | try | 122 | try |
149 | { | 123 | { |
150 | //userID = | 124 | //userID = |
151 | //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); | 125 | //m_userManager.AddUserProfile(tempfirstname, templastname, tempMD5Passwd, regX, regY); |
152 | } | 126 | } catch (Exception ex) |
153 | catch (Exception ex) | ||
154 | { | 127 | { |
155 | m_console.Error("[SERVER]: Error creating user: {0}", ex.ToString()); | 128 | m_console.Error("[SERVER]: Error creating user: {0}", ex.ToString()); |
156 | } | 129 | } |
@@ -158,7 +131,7 @@ namespace OpenSim.Grid.MessagingServer | |||
158 | try | 131 | try |
159 | { | 132 | { |
160 | //RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/", | 133 | //RestObjectPoster.BeginPostObject<Guid>(m_userManager._config.InventoryUrl + "CreateInventory/", |
161 | //userID.UUID); | 134 | //userID.UUID); |
162 | } | 135 | } |
163 | catch (Exception ex) | 136 | catch (Exception ex) |
164 | { | 137 | { |
@@ -168,5 +141,28 @@ namespace OpenSim.Grid.MessagingServer | |||
168 | break; | 141 | break; |
169 | } | 142 | } |
170 | } | 143 | } |
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 | } | ||
171 | } | 167 | } |
172 | } \ No newline at end of file | 168 | } |