public DetectBotCommand(TestClient testClient) { Name = "detectbot"; Description = "Runs in the background, reporting any potential bots"; testClient.Network.RegisterCallback(PacketType.AvatarAppearance, new NetworkManager.PacketCallback(AvatarAppearanceHandler)); }
public GroupsCommand(TestClient testClient) { testClient.Groups.OnCurrentGroups += new GroupManager.CurrentGroupsCallback(Groups_OnCurrentGroups); Name = "groups"; Description = "List avatar groups. Usage: groups"; }
public ParcelVoiceInfoCommand(TestClient testClient) { Name = "voiceparcel"; Description = "obtain parcel voice info. Usage: voiceparcel"; Client = testClient; }
public VoiceAccountCommand(TestClient testClient) { Name = "voiceaccount"; Description = "obtain voice account info. Usage: voiceaccount"; Client = testClient; }
public DetectBotCommand(TestClient testClient) { Name = "detectbot"; Description = "Runs in the background, reporting any potential bots"; testClient.Avatars.OnAvatarAppearance += new AvatarManager.AvatarAppearanceCallback(Avatars_OnAvatarAppearance); }
public GridLayerCommand(TestClient testClient) { Name = "gridlayer"; Description = "Downloads all of the layer chunks for the grid object map"; testClient.Grid.OnGridLayer += new GridManager.GridLayerCallback(Grid_OnGridLayer); }
public ImCommand(TestClient testClient) { testClient.Avatars.OnAvatarNameSearch += new AvatarManager.AvatarNameSearchCallback(Avatars_OnAvatarNameSearch); Name = "im"; Description = "Instant message someone. Usage: im [firstname] [lastname] [message]"; }
public ChangePermsCommand(TestClient testClient) { testClient.Objects.OnObjectProperties += new ObjectManager.ObjectPropertiesCallback(Objects_OnObjectProperties); Name = "changeperms"; Description = "Recursively changes all of the permissions for child and task inventory objects. Usage prim-uuid [copy] [mod] [xfer]"; }
public ImportCommand(TestClient testClient) { Name = "import"; Description = "Import prims from an exported xml file. Usage: import inputfile.xml"; primDone = new AutoResetEvent(false); registeredCreateEvent = false; }
/// <summary> /// Constructor for FriendsCommand class /// </summary> /// <param name="testClient">A reference to the TestClient object</param> public FriendsCommand(TestClient testClient) { // The name of the command Name = "friends"; // A short description of the command with usage instructions Description = "List avatar friends. Usage: friends"; }
public ParcelInfoCommand(TestClient testClient) { Name = "parcelinfo"; Description = "Prints out info about all the parcels in this simulator"; testClient.Network.OnDisconnected += new NetworkManager.DisconnectedCallback(Network_OnDisconnected); }
public FollowCommand(TestClient testClient) { Name = "follow"; Description = "Follow another avatar. (usage: follow [FirstName LastName]) If no target is set then will follow master."; testClient.Network.RegisterCallback(PacketType.AlertMessage, new NetworkManager.PacketCallback(AlertMessageHandler)); }
public ImportCommand(TestClient testClient) { Name = "import"; Description = "Import prims from an exported xml file. Usage: import inputfile.xml [usegroup]"; testClient.Objects.OnNewPrim += new ObjectManager.NewPrimCallback(Objects_OnNewPrim); }
public SayCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "say"; Description = "Say something. (usage: say (optional channel) whatever)"; }
public ExportOutfitCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "exportoutfit"; Description = "Exports an avatars outfit to an xml file. Usage: exportoutfit avataruuid outputfile.xml"; }
public LocationCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "location"; Description = "Show the location."; }
public WhisperCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "whisper"; Description = "Whisper something."; }
public SetAppearanceCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "setapp"; Description = "Set appearance to what's stored in the DB."; }
public QuitCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "quit"; Description = "Log all avatars out and shut down"; }
public FindObjectsCommand(TestClient testClient) { testClient.Objects.OnObjectProperties += new ObjectManager.ObjectPropertiesCallback(Objects_OnObjectProperties); Name = "findobjects"; Description = "Finds all objects, which name contains search-string. " + "Usage: findobjects [radius] <search-string>"; }
public LogoutCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "logout"; Description = "Log this avatar out"; }
public JumpCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "jump"; Description = "Teleports to the specified height. (e.g. \"jump 1000\")"; }
public LoadCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "load"; Description = "Loads commands from a dll. (Usage: load AssemblyNameWithoutExtension)"; }
public FindSimCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "findsim"; Description = "Searches for a simulator and returns information about it. Usage: findsim [Simulator Name]"; }
public UptimeCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "uptime"; Description = "Shows the login name, login time and length of time logged on."; }
public PrimCountCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "primCount"; Description = "Shows the number of prims that have been received."; }
public PacketLogCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "packetlog"; Description = "Logs a given number of packets to an xml file. Usage: packetlog 10 tenpackets.xml"; }
public SitCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "sit"; Description = "Attempt to sit on the closest prim"; }
public ImportOutfitCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "importoutfit"; Description = "Imports an appearance from an xml file. Usage: importoutfit inputfile.xml"; }
public FollowCommand(TestClient testClient) { TestClient = testClient; Client = (SecondLife)TestClient; Name = "follow"; Description = "Follow another avatar. (usage: follow [FirstName LastName]) If no target is set then will follow master."; }
public ActivateGroupCommand(TestClient testClient) { Name = "activategroup"; Description = "Set a group as active. Usage: activategroup GroupName"; }
public GridMapCommand(TestClient testClient) { Name = "gridmap"; Description = "Downloads all visible information about the grid map"; }
public FlyCommand(TestClient testClient) { Name = "fly"; Description = "Starts or stops flying. Usage: fly [start/stop]"; }
public SetMasterKeyCommand(TestClient testClient) { Name = "setMasterKey"; Description = "Sets the key of the master user. The master user can IM to run commands."; }
/// <summary> /// /// </summary> /// <param name="client"></param> public void Logout(TestClient client) { Clients.Remove(client.Self.AgentID); client.Network.Logout(); }
public AppearanceCommand(TestClient testClient) { Name = "appearance"; Description = "Set your current appearance to your last saved appearance"; }
public CreateNotecardCommand(TestClient testClient) { Name = "createnotecard"; Description = "Creates a notecard from a local text file."; }
public BalanceCommand(TestClient testClient) { Name = "balance"; Description = "Shows the amount of L$."; }
/// <summary> /// /// </summary> /// <param name="account"></param> /// <returns></returns> public TestClient Login(LoginDetails account) { // Check if this client is already logged in foreach (TestClient c in Clients.Values) { if (c.Self.FirstName == account.FirstName && c.Self.LastName == account.LastName) { Logout(c); break; } } TestClient client = new TestClient(this); // Optimize the throttle client.Throttle.Wind = 0; client.Throttle.Cloud = 0; client.Throttle.Land = 1000000; client.Throttle.Task = 1000000; client.GroupCommands = account.GroupCommands; client.MasterName = account.MasterName; client.MasterKey = account.MasterKey; LoginParams loginParams = client.Network.DefaultLoginParams( account.FirstName, account.LastName, account.Password, "TestClient", version); if (!String.IsNullOrEmpty(account.StartLocation)) { loginParams.Start = account.StartLocation; } if (!String.IsNullOrEmpty(account.URI)) { loginParams.URI = account.URI; } if (client.Network.Login(loginParams)) { if (account.MasterKey == LLUUID.Zero && !String.IsNullOrEmpty(account.MasterName)) { // To prevent security issues, we must resolve the specified master name to a key. ManualResetEvent keyResolution = new ManualResetEvent(false); List <DirectoryManager.AgentSearchData> masterMatches = new List <DirectoryManager.AgentSearchData>(); // Set up the callback that handles the search results: DirectoryManager.DirPeopleReplyCallback callback = delegate(LLUUID queryID, List <DirectoryManager.AgentSearchData> matches) { // This may be called several times with additional search results. if (matches.Count > 0) { lock (masterMatches) { masterMatches.AddRange(matches); } } else { // No results to show. keyResolution.Set(); } }; // Find master's key from name Console.WriteLine("Resolving {0}'s UUID", account.MasterName); client.Directory.OnDirPeopleReply += callback; client.Directory.StartPeopleSearch(DirectoryManager.DirFindFlags.People, account.MasterName, 0); keyResolution.WaitOne(TimeSpan.FromSeconds(30), false); client.Directory.OnDirPeopleReply -= callback; LLUUID masterKey = LLUUID.Zero; string masterName = account.MasterName; lock (masterMatches) { if (masterMatches.Count == 1) { masterKey = masterMatches[0].AgentID; masterName = masterMatches[0].FirstName + " " + masterMatches[0].LastName; } else if (masterMatches.Count > 0) { // Print out numbered list of masters: Console.WriteLine("Possible masters:"); for (int i = 0; i < masterMatches.Count; ++i) { Console.WriteLine("{0}: {1}", i, masterMatches[i].FirstName + " " + masterMatches[i].LastName); } Console.Write("Ambiguous master, choose one: "); // Read number from the console: string read = null; do { read = Console.ReadLine(); int choice = 0; if (int.TryParse(read, out choice)) { if (choice == -1) { break; } else if (choice < masterMatches.Count) { masterKey = masterMatches[choice].AgentID; masterName = masterMatches[choice].FirstName + " " + masterMatches[choice].LastName; break; } else { Console.WriteLine("Please type a number from the above list, -1 to cancel."); } } else { Console.WriteLine("You didn't type a number."); Console.WriteLine("Please type a number from the above list, -1 to cancel."); } } while (read != null); // Do it until the user selects a master. } } if (masterKey != LLUUID.Zero) { Console.WriteLine("\"{0}\" resolved to {1} ({2})", account.MasterName, masterName, masterKey); account.MasterName = masterName; account.MasterKey = masterKey; } else { Console.WriteLine("Unable to obtain UUID for \"{0}\". No master will be used. Try specifying a key with --masterkey.", account.MasterName); } } client.MasterKey = account.MasterKey; Clients[client.Self.AgentID] = client; Console.WriteLine("Logged in " + client.ToString()); } else { Console.WriteLine("Failed to login " + account.FirstName + " " + account.LastName + ": " + client.Network.LoginMessage); } return(client); }
public PrimInfoCommand(TestClient testClient) { Name = "priminfo"; Description = "Dumps information about a specified prim. " + "Usage: priminfo [prim-uuid]"; }
public MapFriendCommand(TestClient testClient) { Name = "mapfriend"; Description = "Show a friends location. Usage: mapfriend UUID"; }
public TouchCommand(TestClient testClient) { Name = "touch"; Description = "Attempt to touch a prim with specified UUID"; }
public HelpCommand(TestClient testClient) { Name = "help"; Description = "Lists available commands."; }
public QuitCommand(TestClient testClient) { Name = "quit"; Description = "Log all avatars out and shut down"; }
public LoadCommand(TestClient testClient) { Name = "load"; Description = "Loads commands from a dll. (Usage: load AssemblyNameWithoutExtension)"; }
public UptimeCommand(TestClient testClient) { Name = "uptime"; Description = "Shows the login name, login time and length of time logged on."; }
public FindTextureCommand(TestClient testClient) { Name = "findtexture"; Description = "Checks if a specified texture is currently visible on a specified face. " + "Usage: findtexture [face-index] [texture-uuid]"; }
public LogoutCommand(TestClient testClient) { Name = "logout"; Description = "Log this avatar out"; }
public PacketLogCommand(TestClient testClient) { Name = "packetlog"; Description = "Logs a given number of packets to an xml file. Usage: packetlog 10 tenpackets.xml"; }
public JumpCommand(TestClient testClient) { Name = "jump"; Description = "Jumps or flies up"; }
public GiveAllCommand(TestClient testClient) { Name = "giveAll"; Description = "Gives you all it's money."; }
public StatsCommand(TestClient testClient) { Name = "stats"; Description = "Provide connection figures and statistics"; }
public TtsCommand(TestClient testClient) { Name = "tts"; Description = "Text To Speech. When activated, client will echo all recieved chat messages out thru the computer's speakers."; }
public ObjectInventoryCommand(TestClient testClient) { Name = "objectinventory"; Description = "Retrieves a listing of items inside an object (task inventory). Usage: objectinventory [objectID]"; }
public SitCommand(TestClient testClient) { Name = "sit"; Description = "Attempt to sit on the closest prim"; }
public BackupCommand(TestClient testClient) { Name = "backuptext"; Description = "Backup inventory to a folder on your hard drive. Usage: " + Name + " [to <directory>] | [abort] | [status]"; testClient.Assets.OnAssetReceived += new AssetManager.AssetReceivedCallback(Assets_OnAssetReceived); }
public RegionInfoCommand(TestClient testClient) { Name = "regioninfo"; Description = "Prints out info about all the current region"; }
public TreeCommand(TestClient testClient) { Name = "tree"; Description = "Rez a tree."; }
public UploadImageCommand(TestClient testClient) { Name = "uploadimage"; Description = "Upload an image to your inventory. Usage: uploadimage [inventoryname] [timeout] [filename]"; }
public EchoMasterCommand(TestClient testClient) { Name = "echoMaster"; Description = "Repeat everything that master says."; }