Alex King 35c3778baf
[Commands] Remove #undyeme Command. (#2776)
# Notes
- Removes redundant `#undyeme` command.
- Adds `GetGM()` check to `#undye` so players can't undye other players.
2023-01-22 12:56:36 -05:00

19 lines
351 B
C++
Executable File

#include "../client.h"
void command_undye(Client *c, const Seperator *sep)
{
auto target = c;
if (c->GetTarget() && c->GetTarget()->IsClient() && c->GetGM()) {
target = c->GetTarget()->CastToClient();
}
target->Undye();
c->Message(
Chat::White,
fmt::format(
"Undyed armor for {}.",
c->GetTargetDescription(target)
).c_str()
);
}