Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
dd4a503a22
|
@ -49,16 +49,15 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
|||
{
|
||||
m_scene = scene;
|
||||
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);
|
||||
}
|
||||
|
||||
|
@ -177,55 +176,32 @@ 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);
|
||||
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 if (cmdparams.Length > 3)
|
||||
{
|
||||
// alert <first> <last> <message>
|
||||
lastName = cmdparams[2];
|
||||
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 general <message> | alert <first> <last> <message>");
|
||||
"Usage: alert <message> | alert-user <first> <last> <message>");
|
||||
return;
|
||||
}
|
||||
|
||||
if (isGeneral)
|
||||
{
|
||||
m_log.InfoFormat(
|
||||
"[DIALOG]: Sending general alert in region {0} with message {1}",
|
||||
m_scene.RegionInfo.RegionName, message);
|
||||
SendGeneralAlert(message);
|
||||
}
|
||||
else
|
||||
{
|
||||
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);
|
||||
}
|
||||
}
|
||||
|
||||
private string CombineParams(string[] commandParams, int pos)
|
||||
|
|
|
@ -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);
|
||||
|
||||
|
|
|
@ -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>"
|
||||
|
|
|
@ -43,7 +43,7 @@
|
|||
;AllowHypergridMapSearch = true
|
||||
|
||||
;; Directory for map tile images of linked regions
|
||||
; MapTileDirectory = "./"
|
||||
; MapTileDirectory = "./maptiles"
|
||||
|
||||
[AvatarService]
|
||||
;
|
||||
|
|
|
@ -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>"
|
||||
|
|
Loading…
Reference in New Issue