aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorDiva Canto2011-02-16 09:57:43 -0800
committerDiva Canto2011-02-16 09:57:43 -0800
commitdd4a503a2205d9aed57216de6615f349491a4c22 (patch)
tree3c90e7c217f7fcb30cb43a102ee4551bd27bf1c4
parentFix bug introduced by Query Access. The response does not come in a packaged ... (diff)
parentChanged console command "alert" and added new command "alert-user". (diff)
downloadopensim-SC_OLD-dd4a503a2205d9aed57216de6615f349491a4c22.zip
opensim-SC_OLD-dd4a503a2205d9aed57216de6615f349491a4c22.tar.gz
opensim-SC_OLD-dd4a503a2205d9aed57216de6615f349491a4c22.tar.bz2
opensim-SC_OLD-dd4a503a2205d9aed57216de6615f349491a4c22.tar.xz
Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
-rw-r--r--OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs60
-rw-r--r--OpenSim/Services/GridService/HypergridLinker.cs2
-rw-r--r--bin/Robust.HG.ini.example2
-rw-r--r--bin/config-include/GridCommon.ini.example2
-rw-r--r--bin/config-include/StandaloneCommon.ini.example2
5 files changed, 22 insertions, 46 deletions
diff --git a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
index 2b3d2a9..8a977c9 100644
--- a/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
+++ b/OpenSim/Region/CoreModules/Avatar/Dialog/DialogModule.cs
@@ -49,16 +49,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
49 { 49 {
50 m_scene = scene; 50 m_scene = scene;
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>", 54 this, "alert", "alert <message>",
55 "Send an alert to a user", 55 "Send an alert to everyone",
56 HandleAlertConsoleCommand); 56 HandleAlertConsoleCommand);
57 57
58 m_scene.AddCommand( 58 m_scene.AddCommand(
59 this, "alert general", "alert [general] <message>", 59 this, "alert-user", "alert-user <first> <last> <message>",
60 "Send an alert to everyone", 60 "Send an alert to a user",
61 "If keyword 'general' is omitted, then <message> must be surrounded by quotation marks.",
62 HandleAlertConsoleCommand); 61 HandleAlertConsoleCommand);
63 } 62 }
64 63
@@ -177,55 +176,32 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
177 { 176 {
178 if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene) 177 if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene)
179 return; 178 return;
180 179
181 bool isGeneral = false;
182 string firstName = string.Empty;
183 string lastName = string.Empty;
184 string message = string.Empty; 180 string message = string.Empty;
185 181
186 if (cmdparams.Length > 1) 182 if (cmdparams[0].ToLower().Equals("alert"))
187 {
188 firstName = cmdparams[1];
189 isGeneral = firstName.ToLower().Equals("general");
190 }
191 if (cmdparams.Length == 2 && !isGeneral)
192 { 183 {
193 // alert "message" 184 message = CombineParams(cmdparams, 1);
194 message = cmdparams[1]; 185 m_log.InfoFormat("[DIALOG]: Sending general alert in region {0} with message {1}",
195 isGeneral = true; 186 m_scene.RegionInfo.RegionName, message);
196 } 187 SendGeneralAlert(message);
197 else if (cmdparams.Length > 2 && isGeneral)
198 {
199 // alert general <message>
200 message = CombineParams(cmdparams, 2);
201 } 188 }
202 else if (cmdparams.Length > 3) 189 else if (cmdparams.Length > 3)
203 { 190 {
204 // alert <first> <last> <message> 191 string firstName = cmdparams[1];
205 lastName = cmdparams[2]; 192 string lastName = cmdparams[2];
206 message = CombineParams(cmdparams, 3); 193 message = CombineParams(cmdparams, 3);
194 m_log.InfoFormat(
195 "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
196 m_scene.RegionInfo.RegionName, firstName, lastName, message);
197 SendAlertToUser(firstName, lastName, message, false);
207 } 198 }
208 else 199 else
209 { 200 {
210 OpenSim.Framework.Console.MainConsole.Instance.Output( 201 OpenSim.Framework.Console.MainConsole.Instance.Output(
211 "Usage: alert \"message\" | alert general <message> | alert <first> <last> <message>"); 202 "Usage: alert <message> | alert-user <first> <last> <message>");
212 return; 203 return;
213 } 204 }
214
215 if (isGeneral)
216 {
217 m_log.InfoFormat(
218 "[DIALOG]: Sending general alert in region {0} with message {1}",
219 m_scene.RegionInfo.RegionName, message);
220 SendGeneralAlert(message);
221 }
222 else
223 {
224 m_log.InfoFormat(
225 "[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
226 m_scene.RegionInfo.RegionName, firstName, lastName, message);
227 SendAlertToUser(firstName, lastName, message, false);
228 }
229 } 205 }
230 206
231 private string CombineParams(string[] commandParams, int pos) 207 private string CombineParams(string[] commandParams, int pos)
diff --git a/OpenSim/Services/GridService/HypergridLinker.cs b/OpenSim/Services/GridService/HypergridLinker.cs
index 9d98c8f..12ea453 100644
--- a/OpenSim/Services/GridService/HypergridLinker.cs
+++ b/OpenSim/Services/GridService/HypergridLinker.cs
@@ -121,7 +121,7 @@ namespace OpenSim.Services.GridService
121 121
122 m_Check4096 = gridConfig.GetBoolean("Check4096", true); 122 m_Check4096 = gridConfig.GetBoolean("Check4096", true);
123 123
124 m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", string.Empty); 124 m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles");
125 125
126 m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService); 126 m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
127 127
diff --git a/bin/Robust.HG.ini.example b/bin/Robust.HG.ini.example
index 9adf1ac..f12a143 100644
--- a/bin/Robust.HG.ini.example
+++ b/bin/Robust.HG.ini.example
@@ -72,7 +72,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
72 AssetService = "OpenSim.Services.AssetService.dll:AssetService" 72 AssetService = "OpenSim.Services.AssetService.dll:AssetService"
73 73
74 ;; Directory for map tile images of linked regions 74 ;; Directory for map tile images of linked regions
75 ; MapTileDirectory = "./" 75 ; MapTileDirectory = "./maptiles"
76 76
77 ;; Next, we can specify properties of regions, including default and fallback regions 77 ;; Next, we can specify properties of regions, including default and fallback regions
78 ;; The syntax is: Region_<RegionName> = "<flags>" 78 ;; The syntax is: Region_<RegionName> = "<flags>"
diff --git a/bin/config-include/GridCommon.ini.example b/bin/config-include/GridCommon.ini.example
index e1bcf00..4dc0e53 100644
--- a/bin/config-include/GridCommon.ini.example
+++ b/bin/config-include/GridCommon.ini.example
@@ -43,7 +43,7 @@
43 ;AllowHypergridMapSearch = true 43 ;AllowHypergridMapSearch = true
44 44
45 ;; Directory for map tile images of linked regions 45 ;; Directory for map tile images of linked regions
46 ; MapTileDirectory = "./" 46 ; MapTileDirectory = "./maptiles"
47 47
48[AvatarService] 48[AvatarService]
49 ; 49 ;
diff --git a/bin/config-include/StandaloneCommon.ini.example b/bin/config-include/StandaloneCommon.ini.example
index 213219c..816e9a6 100644
--- a/bin/config-include/StandaloneCommon.ini.example
+++ b/bin/config-include/StandaloneCommon.ini.example
@@ -70,7 +70,7 @@
70 ; Check4096 = true 70 ; Check4096 = true
71 71
72 ;; Directory for map tile images of remote regions 72 ;; Directory for map tile images of remote regions
73 ; MapTileDirectory = "./" 73 ; MapTileDirectory = "./maptiles"
74 74
75 ;; Next, we can specify properties of regions, including default and fallback regions 75 ;; Next, we can specify properties of regions, including default and fallback regions
76 ;; The syntax is: Region_<RegioName> = "<flags>" 76 ;; The syntax is: Region_<RegioName> = "<flags>"