diff --git a/commands/everyone.py b/commands/everyone.py index 35fab3e..4e479bf 100755 --- a/commands/everyone.py +++ b/commands/everyone.py @@ -235,16 +235,20 @@ class CmdWhisper(MuxCommand): self.caller.msg("Usage: whisper = ") return - targets = [self.caller.search(target) - for target in split(r" *, *", self.lhs)] - if targets: - full_speech = f"/Me whispers to you, \"{self.rhs}\"" - send_emote(self.caller, targets, full_speech, msg_type="say", - anonymous_add=None, quiet=True) + targets = split(r" *, *", self.lhs) + chars = [self.caller.search(target) for target in targets] + for c in chars: + if not c: + return - to_list = [target.get_display_name(self) for target in targets] - full_speech = f"You whisper to {iter_to_str(to_list, endsep='and')}, \"{self.rhs}\"" - self.caller.msg(full_speech, from_obj=self.caller) + self.caller.msg(f"Wishering to {chars}") + full_speech = f"/Me whispers to you, \"{self.rhs}\"" + send_emote(self.caller, chars, full_speech, msg_type="say", + anonymous_add=None, quiet=True) + + to_list = [target.get_display_name(self) for target in chars] + full_speech = f"You whisper to {iter_to_str(to_list, endsep='and')}, \"{self.rhs}\"" + self.caller.msg(full_speech, from_obj=self.caller) class CmdSay(MuxCommand):