Merge branch 'master' of ssh://opensimulator.org/var/git/opensim

0.7.1-dev
Diva Canto 2011-02-16 09:57:43 -08:00
commit dd4a503a22
5 changed files with 22 additions and 46 deletions

View File

@ -51,14 +51,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
m_scene.RegisterModuleInterface<IDialogModule>(this);
m_scene.AddCommand(
this, "alert", "alert <first> <last> <message>",
"Send an alert to a user",
this, "alert", "alert <message>",
"Send an alert to everyone",
HandleAlertConsoleCommand);
m_scene.AddCommand(
this, "alert general", "alert [general] <message>",
"Send an alert to everyone",
"If keyword 'general' is omitted, then <message> must be surrounded by quotation marks.",
this, "alert-user", "alert-user <first> <last> <message>",
"Send an alert to a user",
HandleAlertConsoleCommand);
}
@ -178,54 +177,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene)
return;
bool isGeneral = false;
string firstName = string.Empty;
string lastName = string.Empty;
string message = string.Empty;
if (cmdparams.Length > 1)
if (cmdparams[0].ToLower().Equals("alert"))
{
firstName = cmdparams[1];
isGeneral = firstName.ToLower().Equals("general");
}
if (cmdparams.Length == 2 && !isGeneral)
{
// alert "message"
message = cmdparams[1];
isGeneral = true;
}
else if (cmdparams.Length > 2 && isGeneral)
{
// alert general <message>
message = CombineParams(cmdparams, 2);
}
else if (cmdparams.Length > 3)
{
// alert <first> <last> <message>
lastName = cmdparams[2];
message = CombineParams(cmdparams, 3);
}
else
{
OpenSim.Framework.Console.MainConsole.Instance.Output(
"Usage: alert \"message\" | alert general <message> | alert <first> <last> <message>");
return;
}
if (isGeneral)
{
m_log.InfoFormat(
"[DIALOG]: Sending general alert in region {0} with message {1}",
message = CombineParams(cmdparams, 1);
m_log.InfoFormat("[DIALOG]: Sending general alert in region {0} with message {1}",
m_scene.RegionInfo.RegionName, message);
SendGeneralAlert(message);
}
else
else if (cmdparams.Length > 3)
{
string firstName = cmdparams[1];
string lastName = cmdparams[2];
message = CombineParams(cmdparams, 3);
m_log.InfoFormat(
"[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
m_scene.RegionInfo.RegionName, firstName, lastName, message);
SendAlertToUser(firstName, lastName, message, false);
}
else
{
OpenSim.Framework.Console.MainConsole.Instance.Output(
"Usage: alert <message> | alert-user <first> <last> <message>");
return;
}
}
private string CombineParams(string[] commandParams, int pos)

View File

@ -121,7 +121,7 @@ namespace OpenSim.Services.GridService
m_Check4096 = gridConfig.GetBoolean("Check4096", true);
m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", string.Empty);
m_MapTileDirectory = gridConfig.GetString("MapTileDirectory", "maptiles");
m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);

View File

@ -72,7 +72,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
AssetService = "OpenSim.Services.AssetService.dll:AssetService"
;; Directory for map tile images of linked regions
; MapTileDirectory = "./"
; MapTileDirectory = "./maptiles"
;; Next, we can specify properties of regions, including default and fallback regions
;; The syntax is: Region_<RegionName> = "<flags>"

View File

@ -43,7 +43,7 @@
;AllowHypergridMapSearch = true
;; Directory for map tile images of linked regions
; MapTileDirectory = "./"
; MapTileDirectory = "./maptiles"
[AvatarService]
;

View File

@ -70,7 +70,7 @@
; Check4096 = true
;; Directory for map tile images of remote regions
; MapTileDirectory = "./"
; MapTileDirectory = "./maptiles"
;; Next, we can specify properties of regions, including default and fallback regions
;; The syntax is: Region_<RegioName> = "<flags>"