Kinglykrab 35044becc1
[Commands] Cleanup #freeze and #unfreeze Commands. (#2102)
- Cleanup messages and logic.
- Remove the ability to #freeze yourself.
2022-05-03 23:05:09 -04:00

17 lines
374 B
C++
Executable File

#include "../client.h"
void command_freeze(Client *c, const Seperator *sep)
{
if (c->GetTarget()) {
auto target = c->GetTarget();
if (target != c) {
target->SendAppearancePacket(AT_Anim, ANIM_FREEZE);
} else {
c->Message(Chat::White, "You cannot freeze yourself.");
}
} else {
c->Message(Chat::White, "You must have a target to use this command.");
}
}