Merge pull request #3 from Tikuf42/master

More stuff
This commit is contained in:
Madpeterz 2020-04-26 02:52:33 +01:00 committed by GitHub
commit 2849b615e6
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 49 additions and 0 deletions

View file

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

View 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");
}
}
}
}