New command: GroupActiveTitle

Changes the title the bot is using.
This commit is contained in:
Madpeter 2020-05-07 12:51:42 +01:00
parent 0c5f2a8301
commit 450fe8d317

View file

@ -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;
}
}
}