New command: GroupActiveTitle
Changes the title the bot is using.
This commit is contained in:
parent
0c5f2a8301
commit
450fe8d317
1 changed files with 31 additions and 0 deletions
31
Core/Commands/Group/GroupActiveTitle.cs
Normal file
31
Core/Commands/Group/GroupActiveTitle.cs
Normal 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;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
Loading…
Reference in a new issue