diff --git a/Core/Commands/Animation/addToAnimations.cs b/Core/Commands/Animation/addToAnimations.cs index 316198c..3ee18c4 100644 --- a/Core/Commands/Animation/addToAnimations.cs +++ b/Core/Commands/Animation/addToAnimations.cs @@ -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
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; }