From 35c3778baffa7c840dde1b12cbd48a7f89d22dbf Mon Sep 17 00:00:00 2001 From: Alex King <89047260+Kinglykrab@users.noreply.github.com> Date: Sun, 22 Jan 2023 12:56:36 -0500 Subject: [PATCH] [Commands] Remove #undyeme Command. (#2776) # Notes - Removes redundant `#undyeme` command. - Adds `GetGM()` check to `#undye` so players can't undye other players. --- zone/command.cpp | 2 -- zone/command.h | 1 - zone/gm_commands/undye.cpp | 2 +- zone/gm_commands/undyeme.cpp | 7 ------- 4 files changed, 1 insertion(+), 11 deletions(-) delete mode 100755 zone/gm_commands/undyeme.cpp diff --git a/zone/command.cpp b/zone/command.cpp index 2742f71bb..95783216f 100644 --- a/zone/command.cpp +++ b/zone/command.cpp @@ -333,7 +333,6 @@ int command_init(void) command_add("trapinfo", "Gets infomation about the traps currently spawned in the zone.", AccountStatus::QuestTroupe, command_trapinfo) || command_add("tune", "Calculate statistical values related to combat.", AccountStatus::GMAdmin, command_tune) || command_add("undye", "Remove dye from all of your or your target's armor slots", AccountStatus::GMAdmin, command_undye) || - command_add("undyeme", "Remove dye from all of your armor slots", AccountStatus::Player, command_undyeme) || command_add("unfreeze", "Unfreeze your target", AccountStatus::QuestTroupe, command_unfreeze) || command_add("unmemspell", "[Spell ID] - Unmemorize a Spell by ID for you or your target", AccountStatus::Guide, command_unmemspell) || command_add("unmemspells", " Unmemorize all spells for you or your target", AccountStatus::Guide, command_unmemspells) || @@ -1169,7 +1168,6 @@ void command_bot(Client *c, const Seperator *sep) #include "gm_commands/trapinfo.cpp" #include "gm_commands/tune.cpp" #include "gm_commands/undye.cpp" -#include "gm_commands/undyeme.cpp" #include "gm_commands/unfreeze.cpp" #include "gm_commands/unmemspell.cpp" #include "gm_commands/unmemspells.cpp" diff --git a/zone/command.h b/zone/command.h index c20a4c02c..492027fe8 100644 --- a/zone/command.h +++ b/zone/command.h @@ -284,7 +284,6 @@ void command_traindisc(Client *c, const Seperator *sep); void command_trapinfo(Client *c, const Seperator *sep); void command_tune(Client *c, const Seperator *sep); void command_undye(Client *c, const Seperator *sep); -void command_undyeme(Client *c, const Seperator *sep); void command_unfreeze(Client *c, const Seperator *sep); void command_unlock(Client *c, const Seperator *sep); void command_unmemspell(Client *c, const Seperator *sep); diff --git a/zone/gm_commands/undye.cpp b/zone/gm_commands/undye.cpp index 414ac9ab4..f66cc9185 100755 --- a/zone/gm_commands/undye.cpp +++ b/zone/gm_commands/undye.cpp @@ -3,7 +3,7 @@ void command_undye(Client *c, const Seperator *sep) { auto target = c; - if (c->GetTarget() && c->GetTarget()->IsClient()) { + if (c->GetTarget() && c->GetTarget()->IsClient() && c->GetGM()) { target = c->GetTarget()->CastToClient(); } diff --git a/zone/gm_commands/undyeme.cpp b/zone/gm_commands/undyeme.cpp deleted file mode 100755 index 8bd6924b1..000000000 --- a/zone/gm_commands/undyeme.cpp +++ /dev/null @@ -1,7 +0,0 @@ -#include "../client.h" - -void command_undyeme(Client *c, const Seperator *sep) -{ - c->Undye(); - c->Message(Chat::White, "Undyed armor for yourself."); -}