mirror of
https://github.com/opensim/opensim.git
synced 2026-08-05 00:46:02 +08:00
kick npcs the right way
This commit is contained in:
@@ -524,11 +524,20 @@ namespace OpenSim
|
||||
presence.Lastname.ToLower().Equals(mainParams[3].ToLower()))
|
||||
{
|
||||
MainConsole.Instance.Output(
|
||||
String.Format(
|
||||
"Kicking user: {0,-16} {1,-16} {2,-37} in region: {3,-16}",
|
||||
presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName));
|
||||
presence.Firstname, presence.Lastname, presence.UUID, regionInfo.RegionName);
|
||||
|
||||
// kick client...
|
||||
if (presence.IsNPC)
|
||||
{
|
||||
INPCModule npcmodule = presence.Scene.RequestModuleInterface<INPCModule>();
|
||||
if (npcmodule != null)
|
||||
{
|
||||
npcmodule.DeleteNPC(presence.UUID, presence.Scene);
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
||||
// kick client...
|
||||
if (alert != null)
|
||||
presence.ControllingClient.Kick(alert);
|
||||
else
|
||||
|
||||
Reference in New Issue
Block a user