enhances the console command "kick user" with an optional alert
message which will be dialog-ed to the user just before being kicked.0.6.5-rc1
parent
21d14a7090
commit
0419f29856
|
@ -186,7 +186,7 @@ namespace OpenSim
|
||||||
"Change the scale of a named prim", HandleEditScale);
|
"Change the scale of a named prim", HandleEditScale);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "kick user",
|
m_console.Commands.AddCommand("region", false, "kick user",
|
||||||
"kick user <first> <last>",
|
"kick user <first> <last> [message]",
|
||||||
"Kick a user off the simulator", KickUserCommand);
|
"Kick a user off the simulator", KickUserCommand);
|
||||||
|
|
||||||
m_console.Commands.AddCommand("region", false, "show assets",
|
m_console.Commands.AddCommand("region", false, "show assets",
|
||||||
|
@ -317,6 +317,10 @@ namespace OpenSim
|
||||||
if (cmdparams.Length < 4)
|
if (cmdparams.Length < 4)
|
||||||
return;
|
return;
|
||||||
|
|
||||||
|
string alert = null;
|
||||||
|
if (cmdparams.Length > 4)
|
||||||
|
alert = String.Join(" ", cmdparams, 4, cmdparams.Length - 4);
|
||||||
|
|
||||||
IList agents = m_sceneManager.GetCurrentSceneAvatars();
|
IList agents = m_sceneManager.GetCurrentSceneAvatars();
|
||||||
|
|
||||||
foreach (ScenePresence presence in agents)
|
foreach (ScenePresence presence in agents)
|
||||||
|
@ -326,6 +330,13 @@ namespace OpenSim
|
||||||
if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) &&
|
if (presence.Firstname.ToLower().Contains(cmdparams[2].ToLower()) &&
|
||||||
presence.Lastname.ToLower().Contains(cmdparams[3].ToLower()))
|
presence.Lastname.ToLower().Contains(cmdparams[3].ToLower()))
|
||||||
{
|
{
|
||||||
|
if (alert != null && !presence.IsChildAgent)
|
||||||
|
{
|
||||||
|
IDialogModule dialogModule = presence.Scene.RequestModuleInterface<IDialogModule>();
|
||||||
|
if (dialogModule != null)
|
||||||
|
dialogModule.SendAlertToUser(presence.UUID, alert, true);
|
||||||
|
}
|
||||||
|
|
||||||
m_console.Notice(
|
m_console.Notice(
|
||||||
String.Format(
|
String.Format(
|
||||||
"Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}",
|
"Kicking user: {0,-16}{1,-16}{2,-37} in region: {3,-16}",
|
||||||
|
|
Loading…
Reference in New Issue