2006-11-18 18:23:14 +00:00
|
|
|
using System;
|
|
|
|
|
using System.Collections.Generic;
|
|
|
|
|
using System.Text;
|
|
|
|
|
using libsecondlife;
|
|
|
|
|
using libsecondlife.Packets;
|
|
|
|
|
|
|
|
|
|
namespace TestBot
|
|
|
|
|
{
|
|
|
|
|
public class SetMasterCommand: Command
|
|
|
|
|
{
|
|
|
|
|
public DateTime Created = DateTime.Now;
|
|
|
|
|
|
|
|
|
|
public SetMasterCommand()
|
|
|
|
|
{
|
|
|
|
|
Name = "setMaster";
|
2006-11-18 23:13:46 +00:00
|
|
|
Description = "Sets the user name of the master of this bot. Bot always obeys master.";
|
2006-11-18 18:23:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
|
|
public override string Execute(string[] args, LLUUID fromAgentID)
|
|
|
|
|
{
|
|
|
|
|
string masterName = String.Empty;
|
|
|
|
|
for (int ct = 0; ct < args.Length;ct++)
|
|
|
|
|
masterName = masterName + args[ct] + " ";
|
|
|
|
|
Bot.Master = masterName.TrimEnd();
|
|
|
|
|
|
|
|
|
|
return "Master set to " + masterName;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
}
|