projects
/
mudpy.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Fix punctuation match order and add tests
[mudpy.git]
/
lib
/
mudpy
/
misc.py
diff --git
a/lib/mudpy/misc.py
b/lib/mudpy/misc.py
index
0843586
..
ea18ffb
100644
(file)
--- a/
lib/mudpy/misc.py
+++ b/
lib/mudpy/misc.py
@@
-2043,7
+2043,9
@@
def command_say(actor, parameters):
universe.categories["internal"]["language"].get(
"default_punctuation"))
action = ""
universe.categories["internal"]["language"].get(
"default_punctuation"))
action = ""
- for mark in actions.keys():
+
+ # reverse sort punctuation options so the longest match wins
+ for mark in sorted(actions.keys(), reverse=True):
if not literal and message.endswith(mark):
action = actions[mark]
break
if not literal and message.endswith(mark):
action = actions[mark]
break