diff options
author | Diva Canto | 2010-08-20 11:09:21 -0700 |
---|---|---|
committer | Diva Canto | 2010-08-20 11:09:21 -0700 |
commit | 4463ebfbc2365ecfdaff84d42fa51d5e999e8cbe (patch) | |
tree | 9016465f30bd1bcbcf5ad35bd9d0393fe5b5fc55 /OpenSim | |
parent | Unit test breakage fix. (diff) | |
parent | Make some small corrections to ini.example file changes. These are not funct... (diff) | |
download | opensim-SC_OLD-4463ebfbc2365ecfdaff84d42fa51d5e999e8cbe.zip opensim-SC_OLD-4463ebfbc2365ecfdaff84d42fa51d5e999e8cbe.tar.gz opensim-SC_OLD-4463ebfbc2365ecfdaff84d42fa51d5e999e8cbe.tar.bz2 opensim-SC_OLD-4463ebfbc2365ecfdaff84d42fa51d5e999e8cbe.tar.xz |
Merge branch 'master' of ssh://diva@opensimulator.org/var/git/opensim
Diffstat (limited to 'OpenSim')
-rw-r--r-- | OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | 52 | ||||
-rw-r--r-- | OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | 18 |
2 files changed, 52 insertions, 18 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs index 2105f3c..2b3d2a9 100644 --- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs +++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs | |||
@@ -51,10 +51,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
51 | m_scene.RegisterModuleInterface<IDialogModule>(this); | 51 | m_scene.RegisterModuleInterface<IDialogModule>(this); |
52 | 52 | ||
53 | m_scene.AddCommand( | 53 | m_scene.AddCommand( |
54 | this, "alert", "alert <first> <last> <message>", "Send an alert to a user", HandleAlertConsoleCommand); | 54 | this, "alert", "alert <first> <last> <message>", |
55 | "Send an alert to a user", | ||
56 | HandleAlertConsoleCommand); | ||
55 | 57 | ||
56 | m_scene.AddCommand( | 58 | m_scene.AddCommand( |
57 | this, "alert general", "alert general <message>", "Send an alert to everyone", HandleAlertConsoleCommand); | 59 | this, "alert general", "alert [general] <message>", |
60 | "Send an alert to everyone", | ||
61 | "If keyword 'general' is omitted, then <message> must be surrounded by quotation marks.", | ||
62 | HandleAlertConsoleCommand); | ||
58 | } | 63 | } |
59 | 64 | ||
60 | public void PostInitialise() {} | 65 | public void PostInitialise() {} |
@@ -173,20 +178,49 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog | |||
173 | if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene) | 178 | if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene) |
174 | return; | 179 | return; |
175 | 180 | ||
176 | if (cmdparams[1] == "general") | 181 | bool isGeneral = false; |
182 | string firstName = string.Empty; | ||
183 | string lastName = string.Empty; | ||
184 | string message = string.Empty; | ||
185 | |||
186 | if (cmdparams.Length > 1) | ||
187 | { | ||
188 | firstName = cmdparams[1]; | ||
189 | isGeneral = firstName.ToLower().Equals("general"); | ||
190 | } | ||
191 | if (cmdparams.Length == 2 && !isGeneral) | ||
192 | { | ||
193 | // alert "message" | ||
194 | message = cmdparams[1]; | ||
195 | isGeneral = true; | ||
196 | } | ||
197 | else if (cmdparams.Length > 2 && isGeneral) | ||
198 | { | ||
199 | // alert general <message> | ||
200 | message = CombineParams(cmdparams, 2); | ||
201 | } | ||
202 | else if (cmdparams.Length > 3) | ||
177 | { | 203 | { |
178 | string message = CombineParams(cmdparams, 2); | 204 | // alert <first> <last> <message> |
205 | lastName = cmdparams[2]; | ||
206 | message = CombineParams(cmdparams, 3); | ||
207 | } | ||
208 | else | ||
209 | { | ||
210 | OpenSim.Framework.Console.MainConsole.Instance.Output( | ||
211 | "Usage: alert \"message\" | alert general <message> | alert <first> <last> <message>"); | ||
212 | return; | ||
213 | } | ||
179 | 214 | ||
215 | if (isGeneral) | ||
216 | { | ||
180 | m_log.InfoFormat( | 217 | m_log.InfoFormat( |
181 | "[DIALOG]: Sending general alert in region {0} with message {1}", m_scene.RegionInfo.RegionName, message); | 218 | "[DIALOG]: Sending general alert in region {0} with message {1}", |
219 | m_scene.RegionInfo.RegionName, message); | ||
182 | SendGeneralAlert(message); | 220 | SendGeneralAlert(message); |
183 | } | 221 | } |
184 | else | 222 | else |
185 | { | 223 | { |
186 | string firstName = cmdparams[1]; | ||
187 | string lastName = cmdparams[2]; | ||
188 | string message = CombineParams(cmdparams, 3); | ||
189 | |||
190 | m_log.InfoFormat( | 224 | m_log.InfoFormat( |
191 | "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}", | 225 | "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}", |
192 | m_scene.RegionInfo.RegionName, firstName, lastName, message); | 226 | m_scene.RegionInfo.RegionName, firstName, lastName, message); |
diff --git a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs index 87a0a8d..fd0e879 100644 --- a/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs +++ b/OpenSim/Region/CoreModules/InterGrid/OpenGridProtocolModule.cs | |||
@@ -100,7 +100,7 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
100 | bool enabled = false; | 100 | bool enabled = false; |
101 | IConfig cfg = null; | 101 | IConfig cfg = null; |
102 | IConfig httpcfg = null; | 102 | IConfig httpcfg = null; |
103 | IConfig startupcfg = null; | 103 | // IConfig startupcfg = null; |
104 | try | 104 | try |
105 | { | 105 | { |
106 | cfg = config.Configs["OpenGridProtocol"]; | 106 | cfg = config.Configs["OpenGridProtocol"]; |
@@ -117,14 +117,14 @@ namespace OpenSim.Region.CoreModules.InterGrid | |||
117 | { | 117 | { |
118 | 118 | ||
119 | } | 119 | } |
120 | try | 120 | // try |
121 | { | 121 | // { |
122 | startupcfg = config.Configs["Startup"]; | 122 | // startupcfg = config.Configs["Startup"]; |
123 | } | 123 | // } |
124 | catch (NullReferenceException) | 124 | // catch (NullReferenceException) |
125 | { | 125 | // { |
126 | 126 | // | |
127 | } | 127 | // } |
128 | 128 | ||
129 | // if (startupcfg != null) | 129 | // if (startupcfg != null) |
130 | // { | 130 | // { |