[Commands] Cleanup #hatelist Command. (#1976)

- Cleanup messages and logic.
This commit is contained in:
Kinglykrab
2022-02-10 16:14:17 -05:00
committed by GitHub
parent 7bf466cf3f
commit 968ae26c99
3 changed files with 51 additions and 15 deletions
+4 -6
View File
@@ -2,14 +2,12 @@
void command_hatelist(Client *c, const Seperator *sep)
{
Mob *target = c->GetTarget();
if (target == nullptr) {
c->Message(Chat::White, "Error: you must have a target.");
if (!c->GetTarget() || !c->GetTarget()->IsNPC()) {
c->Message(Chat::White, "You must target an NPC to use this command.");
return;
}
c->Message(Chat::White, "Display hate list for %s..", target->GetName());
auto target = c->GetTarget();
target->PrintHateListToClient(c);
}