[Commands] Cleanup #flags Command. (#1783)

- Cleanup message and logic.
This commit is contained in:
Kinglykrab
2021-11-21 10:03:08 -05:00
committed by GitHub
parent dfe43ce189
commit 7154d5b841
2 changed files with 51 additions and 19 deletions
+8 -7
View File
@@ -2,15 +2,16 @@
void command_flags(Client *c, const Seperator *sep)
{
Client *t = c;
Client *target = c;
if (c->Admin() >= minStatusToSeeOthersZoneFlags) {
Mob *tgt = c->GetTarget();
if (tgt != nullptr && tgt->IsClient()) {
t = tgt->CastToClient();
}
if (
c->GetTarget() &&
c->GetTarget()->IsClient() &&
c->Admin() >= minStatusToSeeOthersZoneFlags
) {
target = c->GetTarget()->CastToClient();
}
t->SendZoneFlagInfo(c);
target->SendZoneFlagInfo(c);
}