commit
2849b615e6
2 changed files with 49 additions and 0 deletions
|
|
@ -22,6 +22,7 @@ namespace BetterSecondBotShared.bottypes
|
|||
protected bool reconnect;
|
||||
public string MyVersion { get { return version; } }
|
||||
public string Name { get { return myconfig.userName; } }
|
||||
public string OwnerName { get { return myconfig.master; } }
|
||||
public string LastStatusMessage { get; set; }
|
||||
|
||||
public bool KillMe { get { return killMe; } }
|
||||
|
|
|
|||
48
Core/Commands/Self/Help.cs
Normal file
48
Core/Commands/Self/Help.cs
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Text;
|
||||
using System.Linq;
|
||||
using OpenMetaverse;
|
||||
|
||||
|
||||
namespace BSB.Commands.Self
|
||||
{
|
||||
public class Help : CoreCommand
|
||||
{
|
||||
|
||||
public override string Helpfile { get { return "Makes the bot turn to face [ARG 1] and point at them (if found)"; } }
|
||||
public override bool CallFunction(string[] args)
|
||||
{
|
||||
if (UUID.TryParse(bot.FindAvatarName2Key(bot.OwnerName), out UUID owner) == true)
|
||||
{
|
||||
string reply = "";
|
||||
int counter = 0;
|
||||
string addon = "";
|
||||
foreach (string a in bot.GetCommandsInterface.GetCommandsList())
|
||||
{
|
||||
reply += addon;
|
||||
reply += a;
|
||||
counter++;
|
||||
if (counter == 5)
|
||||
{
|
||||
reply += "\n";
|
||||
addon = "";
|
||||
counter = 0;
|
||||
}
|
||||
else
|
||||
{
|
||||
addon = " , ";
|
||||
}
|
||||
}
|
||||
|
||||
bot.sendIM(owner, reply);
|
||||
|
||||
return true;
|
||||
}
|
||||
else
|
||||
{
|
||||
return Failed("UUID is not vaild");
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
Loading…
Reference in a new issue