Fix a stacktrace when trying to whisper... really this time
This commit is contained in:
parent
13a3a91a65
commit
dcab25c5ce
1 changed files with 13 additions and 9 deletions
|
|
@ -235,16 +235,20 @@ class CmdWhisper(MuxCommand):
|
|||
self.caller.msg("Usage: whisper <character> = <message>")
|
||||
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):
|
||||
|
|
|
|||
Loading…
Reference in a new issue