Merge branch 'master' of ssh://opensimulator.org/var/git/opensim
commit
dd4a503a22
|
@ -51,14 +51,13 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||||
m_scene.RegisterModuleInterface<IDialogModule>(this);
|
m_scene.RegisterModuleInterface<IDialogModule>(this);
|
||||||
|
|
||||||
m_scene.AddCommand(
|
m_scene.AddCommand(
|
||||||
this, "alert", "alert <first> <last> <message>",
|
this, "alert", "alert <message>",
|
||||||
"Send an alert to a user",
|
"Send an alert to everyone",
|
||||||
HandleAlertConsoleCommand);
|
HandleAlertConsoleCommand);
|
||||||
|
|
||||||
m_scene.AddCommand(
|
m_scene.AddCommand(
|
||||||
this, "alert general", "alert [general] <message>",
|
this, "alert-user", "alert-user <first> <last> <message>",
|
||||||
"Send an alert to everyone",
|
"Send an alert to a user",
|
||||||
"If keyword 'general' is omitted, then <message> must be surrounded by quotation marks.",
|
|
||||||
HandleAlertConsoleCommand);
|
HandleAlertConsoleCommand);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -178,54 +177,31 @@ namespace OpenSim.Region.CoreModules.Avatar.Dialog
|
||||||
if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene)
|
if (m_scene.ConsoleScene() != null && m_scene.ConsoleScene() != m_scene)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
bool isGeneral = false;
|
|
||||||
string firstName = string.Empty;
|
|
||||||
string lastName = string.Empty;
|
|
||||||
string message = string.Empty;
|
string message = string.Empty;
|
||||||
|
|
||||||
if (cmdparams.Length > 1)
|
if (cmdparams[0].ToLower().Equals("alert"))
|
||||||
{
|
{
|
||||||
firstName = cmdparams[1];
|
message = CombineParams(cmdparams, 1);
|
||||||
isGeneral = firstName.ToLower().Equals("general");
|
m_log.InfoFormat("[DIALOG]: Sending general alert in region {0} with message {1}",
|
||||||
}
|
|
||||||
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}",
|
|
||||||
m_scene.RegionInfo.RegionName, message);
|
m_scene.RegionInfo.RegionName, message);
|
||||||
SendGeneralAlert(message);
|
SendGeneralAlert(message);
|
||||||
}
|
}
|
||||||
else
|
else if (cmdparams.Length > 3)
|
||||||
{
|
{
|
||||||
|
string firstName = cmdparams[1];
|
||||||
|
string lastName = cmdparams[2];
|
||||||
|
message = CombineParams(cmdparams, 3);
|
||||||
m_log.InfoFormat(
|
m_log.InfoFormat(
|
||||||
"[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
|
"[DIALOG]: Sending alert in region {0} to {1} {2} with message {3}",
|
||||||
m_scene.RegionInfo.RegionName, firstName, lastName, message);
|
m_scene.RegionInfo.RegionName, firstName, lastName, message);
|
||||||
SendAlertToUser(firstName, lastName, message, false);
|
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)
|
private string CombineParams(string[] commandParams, int pos)
|
||||||
|
|
|
@ -121,7 +121,7 @@ namespace OpenSim.Services.GridService
|
||||||
|
|
||||||
m_Check4096 = gridConfig.GetBoolean("Check4096", true);
|
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);
|
m_GatekeeperConnector = new GatekeeperServiceConnector(m_AssetService);
|
||||||
|
|
||||||
|
|
|
@ -72,7 +72,7 @@ ServiceConnectors = "8003/OpenSim.Server.Handlers.dll:AssetServiceConnector,8003
|
||||||
AssetService = "OpenSim.Services.AssetService.dll:AssetService"
|
AssetService = "OpenSim.Services.AssetService.dll:AssetService"
|
||||||
|
|
||||||
;; Directory for map tile images of linked regions
|
;; Directory for map tile images of linked regions
|
||||||
; MapTileDirectory = "./"
|
; MapTileDirectory = "./maptiles"
|
||||||
|
|
||||||
;; Next, we can specify properties of regions, including default and fallback regions
|
;; Next, we can specify properties of regions, including default and fallback regions
|
||||||
;; The syntax is: Region_<RegionName> = "<flags>"
|
;; The syntax is: Region_<RegionName> = "<flags>"
|
||||||
|
|
|
@ -43,7 +43,7 @@
|
||||||
;AllowHypergridMapSearch = true
|
;AllowHypergridMapSearch = true
|
||||||
|
|
||||||
;; Directory for map tile images of linked regions
|
;; Directory for map tile images of linked regions
|
||||||
; MapTileDirectory = "./"
|
; MapTileDirectory = "./maptiles"
|
||||||
|
|
||||||
[AvatarService]
|
[AvatarService]
|
||||||
;
|
;
|
||||||
|
|
|
@ -70,7 +70,7 @@
|
||||||
; Check4096 = true
|
; Check4096 = true
|
||||||
|
|
||||||
;; Directory for map tile images of remote regions
|
;; Directory for map tile images of remote regions
|
||||||
; MapTileDirectory = "./"
|
; MapTileDirectory = "./maptiles"
|
||||||
|
|
||||||
;; Next, we can specify properties of regions, including default and fallback regions
|
;; Next, we can specify properties of regions, including default and fallback regions
|
||||||
;; The syntax is: Region_<RegioName> = "<flags>"
|
;; The syntax is: Region_<RegioName> = "<flags>"
|
||||||
|
|
Loading…
Reference in New Issue