new command: SimMessage
This commit is contained in:
parent
b01aeff43f
commit
d1af896a65
1 changed files with 34 additions and 0 deletions
34
Core/Commands/Estate/SimMessage.cs
Normal file
34
Core/Commands/Estate/SimMessage.cs
Normal file
|
|
@ -0,0 +1,34 @@
|
||||||
|
using System;
|
||||||
|
using System.Collections.Generic;
|
||||||
|
using System.Text;
|
||||||
|
using BetterSecondBotShared.logs;
|
||||||
|
using BetterSecondBotShared.Static;
|
||||||
|
using OpenMetaverse;
|
||||||
|
|
||||||
|
namespace BSB.Commands.Estate
|
||||||
|
{
|
||||||
|
public class SimMessage : CoreCommand
|
||||||
|
{
|
||||||
|
public override string[] ArgTypes { get { return new[] { "Text" }; } }
|
||||||
|
public override string[] ArgHints { get { return new[] { "Message to send" }; } }
|
||||||
|
public override int MinArgs { get { return 1; } }
|
||||||
|
public override string Helpfile { get { return "Sends the message [ARG 1] to the current sim"; } }
|
||||||
|
|
||||||
|
public override bool CallFunction(string[] args)
|
||||||
|
{
|
||||||
|
if (base.CallFunction(args) == true)
|
||||||
|
{
|
||||||
|
if (bot.GetClient.Network.CurrentSim.IsEstateManager == true)
|
||||||
|
{
|
||||||
|
bot.GetClient.Estate.SimulatorMessage(args[0]);
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
return Failed("Not an estate manager here");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue