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>")
|
self.caller.msg("Usage: whisper <character> = <message>")
|
||||||
return
|
return
|
||||||
|
|
||||||
targets = [self.caller.search(target)
|
targets = split(r" *, *", self.lhs)
|
||||||
for target in split(r" *, *", self.lhs)]
|
chars = [self.caller.search(target) for target in targets]
|
||||||
if targets:
|
for c in chars:
|
||||||
full_speech = f"/Me whispers to you, \"{self.rhs}\""
|
if not c:
|
||||||
send_emote(self.caller, targets, full_speech, msg_type="say",
|
return
|
||||||
anonymous_add=None, quiet=True)
|
|
||||||
|
|
||||||
to_list = [target.get_display_name(self) for target in targets]
|
self.caller.msg(f"Wishering to {chars}")
|
||||||
full_speech = f"You whisper to {iter_to_str(to_list, endsep='and')}, \"{self.rhs}\""
|
full_speech = f"/Me whispers to you, \"{self.rhs}\""
|
||||||
self.caller.msg(full_speech, from_obj=self.caller)
|
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):
|
class CmdSay(MuxCommand):
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue