blob: 1fa6336ebec86271c3bac3b37094333b3f373372 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
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;
}
}
}
|