diff --git a/Core/Commands/Group/GroupActiveTitle.cs b/Core/Commands/Group/GroupActiveTitle.cs new file mode 100644 index 0000000..e0f37b8 --- /dev/null +++ b/Core/Commands/Group/GroupActiveTitle.cs @@ -0,0 +1,31 @@ +using OpenMetaverse; +using System; +using System.Collections.Generic; +using System.Text; + +namespace BSB.Commands.Group +{ + class GroupActiveTitle : CoreCommand_2arg + { + public override string[] ArgTypes { get { return new[] { "UUID", "UUID"}; } } + public override string[] ArgHints { get { return new[] { "UUID of the group","UUID of the role" }; } } + public override string Helpfile { get { return "Activates the selected title"; } } + public override bool CallFunction(string[] args) + { + if (base.CallFunction(args) == true) + { + if(UUID.TryParse(args[0],out UUID group_uuid) == true) + { + if (UUID.TryParse(args[0], out UUID group_role) == true) + { + bot.GetClient.Groups.ActivateTitle(group_uuid, group_role); + return true; + } + return Failed("Unable to process group Role on arg 1"); + } + return Failed("Unable to process group UUID on arg 1"); + } + return false; + } + } +}