mirror of
https://github.com/evennia/evennia.git
synced 2026-04-02 05:57:16 +02:00
rpsystem.py minor fixes to CmdEmote
+Escape curly braces in emote +Check for ? as ending punctuation before adding full-stop
This commit is contained in:
parent
d5c8db4c82
commit
dd840ba05b
1 changed files with 4 additions and 3 deletions
|
|
@ -796,10 +796,11 @@ class CmdEmote(RPCommand): # replaces the main emote
|
|||
self.caller.msg("What do you want to do?")
|
||||
else:
|
||||
# we also include ourselves here.
|
||||
emote = self.args
|
||||
emote = self.args.replace('{', '{{') # Escape open curly brace in later formatting.
|
||||
emote = emote.replace('}', '}}') # Also escape close curly brace.
|
||||
targets = self.caller.location.contents
|
||||
if not emote.endswith((".", "!")):
|
||||
emote = "%s." % emote
|
||||
if not emote.endswith((".", "?", "!")): # If emote is not punctuated,
|
||||
emote = "%s." % emote # add a full-stop for good measure.
|
||||
send_emote(self.caller, targets, emote, anonymous_add='first')
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue