From 6760f18fa632fbcc9feb7adab4c2d7b18fdfe9f0 Mon Sep 17 00:00:00 2001 From: Madpeter Date: Thu, 7 May 2020 12:49:34 +0100 Subject: [PATCH] Removes unneeded smartreply test --- Core/Commands/Group/getGroupRoles.cs | 13 +++--------- Core/Commands/Parcel/ParcelPrimCountAvatar.cs | 21 +++++++------------ Core/Commands/Parcel/ParcelPrimCountTotal.cs | 21 +++++++------------ 3 files changed, 17 insertions(+), 38 deletions(-) diff --git a/Core/Commands/Group/getGroupRoles.cs b/Core/Commands/Group/getGroupRoles.cs index 9f70da8..d03b5ab 100644 --- a/Core/Commands/Group/getGroupRoles.cs +++ b/Core/Commands/Group/getGroupRoles.cs @@ -14,20 +14,13 @@ namespace BSB.Commands.Group { if (UUID.TryParse(args[1], out _) == true) { - if (bot.GetCommandsInterface.SmartCommandReply(args[0], "Vaildate", CommandName, true) == true) + if (bot.CreateAwaitEventReply("grouproles", this, args) == true) { - if (bot.CreateAwaitEventReply("grouproles", this, args) == true) - { - return true; - } - else - { - return Failed("Unable to await reply"); - } + return true; } else { - return Failed("Smart reply [ARG 1] is not vaild"); + return Failed("Unable to await reply"); } } else diff --git a/Core/Commands/Parcel/ParcelPrimCountAvatar.cs b/Core/Commands/Parcel/ParcelPrimCountAvatar.cs index 8e1b9f0..b2e711c 100644 --- a/Core/Commands/Parcel/ParcelPrimCountAvatar.cs +++ b/Core/Commands/Parcel/ParcelPrimCountAvatar.cs @@ -60,29 +60,22 @@ namespace BSB.Commands.CMD_Parcel { if (base.CallFunction(args) == true) { - if (bot.GetCommandsInterface.SmartCommandReply(args[0], "Vaildate", CommandName, true) == true) + if (UUID.TryParse(args[1], out _) == true) { - if (UUID.TryParse(args[1], out _) == true) + int localid = bot.GetClient.Parcels.GetParcelLocalID(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimPosition); + if (bot.CreateAwaitEventReply("parcelobjectowners", this, args) == true) { - int localid = bot.GetClient.Parcels.GetParcelLocalID(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimPosition); - if (bot.CreateAwaitEventReply("parcelobjectowners", this, args) == true) - { - bot.GetClient.Parcels.RequestObjectOwners(bot.GetClient.Network.CurrentSim, localid); - return true; - } - else - { - return Failed("Unable to await reply"); - } + bot.GetClient.Parcels.RequestObjectOwners(bot.GetClient.Network.CurrentSim, localid); + return true; } else { - return Failed("Arg 2 is not a vaild avatar"); + return Failed("Unable to await reply"); } } else { - return Failed("Arg 1 is not a vaild smart target"); + return Failed("Arg 2 is not a vaild avatar"); } } return false; diff --git a/Core/Commands/Parcel/ParcelPrimCountTotal.cs b/Core/Commands/Parcel/ParcelPrimCountTotal.cs index acdca2b..ca7d2d6 100644 --- a/Core/Commands/Parcel/ParcelPrimCountTotal.cs +++ b/Core/Commands/Parcel/ParcelPrimCountTotal.cs @@ -33,29 +33,22 @@ namespace BSB.Commands.CMD_Parcel { if (base.CallFunction(args) == true) { - if (bot.GetCommandsInterface.SmartCommandReply(args[0], "Vaildate", CommandName, true) == true) + int localid = bot.GetClient.Parcels.GetParcelLocalID(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimPosition); + if (bot.GetClient.Network.CurrentSim.Parcels.ContainsKey(localid) == true) { - int localid = bot.GetClient.Parcels.GetParcelLocalID(bot.GetClient.Network.CurrentSim, bot.GetClient.Self.SimPosition); - if (bot.GetClient.Network.CurrentSim.Parcels.ContainsKey(localid) == true) + if (bot.CreateAwaitEventReply("parcelobjectowners", this, args) == true) { - if (bot.CreateAwaitEventReply("parcelobjectowners", this, args) == true) - { - bot.GetClient.Parcels.RequestObjectOwners(bot.GetClient.Network.CurrentSim, localid); - return true; - } - else - { - return Failed("Unable to await reply"); - } + bot.GetClient.Parcels.RequestObjectOwners(bot.GetClient.Network.CurrentSim, localid); + return true; } else { - return Failed("Unable to find parcel in memory, please wait and try again"); + return Failed("Unable to await reply"); } } else { - return Failed("Arg 1 is not a vaild smart target"); + return Failed("Unable to find parcel in memory, please wait and try again"); } } return false;