From e93869c7a785a4f375685ffa33c913033ed1c85a Mon Sep 17 00:00:00 2001 From: Adam Frisby Date: Thu, 21 Jun 2007 17:08:21 +0000 Subject: * Importing Ming's mass test client --- .../Commands/System/SetMasterKeyCommand.cs | 35 ++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 tools/mass test client/Commands/System/SetMasterKeyCommand.cs (limited to 'tools/mass test client/Commands/System/SetMasterKeyCommand.cs') diff --git a/tools/mass test client/Commands/System/SetMasterKeyCommand.cs b/tools/mass test client/Commands/System/SetMasterKeyCommand.cs new file mode 100644 index 0000000..1fa6336 --- /dev/null +++ b/tools/mass test client/Commands/System/SetMasterKeyCommand.cs @@ -0,0 +1,35 @@ +using System; +using System.Collections.Generic; +using System.Text; +using libsecondlife; +using libsecondlife.Packets; + +namespace libsecondlife.TestClient +{ + public class SetMasterKeyCommand : Command + { + public DateTime Created = DateTime.Now; + + public SetMasterKeyCommand(TestClient testClient) + { + Name = "setMasterKey"; + Description = "Sets the key of the master user. The master user can IM to run commands."; + } + + public override string Execute(string[] args, LLUUID fromAgentID) + { + Client.MasterKey = LLUUID.Parse(args[0]); + + foreach (Avatar av in Client.AvatarList.Values) + { + if (av.ID == Client.MasterKey) + { + Client.Self.InstantMessage(av.ID, "You are now my master. IM me with \"help\" for a command list."); + break; + } + } + + return "Master set to " + Client.MasterKey; + } + } +} -- cgit v1.1