switching over to the new flag system

This commit is contained in:
Madpeter 2020-10-26 04:14:57 +00:00
parent 2740bcc613
commit c1341d05a1

View file

@ -1,16 +1,31 @@
namespace BSB.Commands.Animation
using OpenMetaverse;
namespace BSB.Commands.Animation
{
public class AddToAllowAnimations : CoreCommand_1arg
{
public override string[] ArgTypes { get { return new[] { "Text" }; } }
public override string[] ArgHints { get { return new[] { "Avatar name"}; } }
public override string[] ArgTypes { get { return new[] { "Avatar" }; } }
public override string[] ArgHints { get { return new[] { "Avatar UUID or Firstname Lastname" }; } }
public override string Helpfile { get { return "Toggles if animation requests from this avatar (used for remote poseballs) are accepted<br/>Case sensitive also requires Lastname"; } }
public override bool CallFunction(string[] args)
{
if(base.CallFunction(args) == true)
{
bot.ToggleAutoAcceptAnimations(args[0]);
return true;
if(UUID.TryParse(args[0],out UUID avatar) == true)
{
if(bot.Accept_action_from("animation",avatar) == false)
{
bot.Add_action_from("animation", avatar);
InfoBlob = "Granted perm animation";
}
else
{
bot.Remove_action_from("animation", avatar,true);
InfoBlob = "Removed perm animation";
}
return true;
}
return Failed("Invaild avatar for arg 1");
}
return false;
}