Merge commit. Resolvs Issue 273.
This commit is contained in:
commit
f95198fbdb
3 changed files with 6 additions and 4 deletions
1
ev.py
1
ev.py
|
|
@ -194,6 +194,7 @@ class DefaultCmds(object):
|
||||||
self.__dict__.update(dict([(c.__name__, c) for c in cmdlist]))
|
self.__dict__.update(dict([(c.__name__, c) for c in cmdlist]))
|
||||||
|
|
||||||
from src.commands.default import admin, batchprocess, building, comms, general, help, system, unloggedin
|
from src.commands.default import admin, batchprocess, building, comms, general, help, system, unloggedin
|
||||||
|
add_cmds(admin)
|
||||||
add_cmds(building)
|
add_cmds(building)
|
||||||
add_cmds(batchprocess)
|
add_cmds(batchprocess)
|
||||||
add_cmds(building)
|
add_cmds(building)
|
||||||
|
|
|
||||||
|
|
@ -73,11 +73,11 @@ def cmdparser(raw_string, cmdset, caller, match_index=None):
|
||||||
matches = [match for match in matches if match[2].access(caller, 'cmd')]
|
matches = [match for match in matches if match[2].access(caller, 'cmd')]
|
||||||
|
|
||||||
if len(matches) > 1:
|
if len(matches) > 1:
|
||||||
# See if it helps to analyze the match with preserved case but only if
|
# See if it helps to analyze the match with preserved case but only if
|
||||||
# it leaves at least one match.
|
# it leaves at least one match.
|
||||||
trimmed = [match for match in matches if raw_string.startswith(match[0])]
|
trimmed = [match for match in matches if raw_string.startswith(match[0])]
|
||||||
if trimmed:
|
if trimmed:
|
||||||
matches = trimmed
|
matches = trimmed
|
||||||
|
|
||||||
if len(matches) > 1:
|
if len(matches) > 1:
|
||||||
# we still have multiple matches. Sort them by count quality.
|
# we still have multiple matches. Sort them by count quality.
|
||||||
|
|
|
||||||
|
|
@ -192,8 +192,9 @@ class CmdUnconnectedCreate(MuxCommand):
|
||||||
(new_character.id, new_player.id))
|
(new_character.id, new_player.id))
|
||||||
|
|
||||||
|
|
||||||
# set a default description
|
# If no description is set, set a default description
|
||||||
new_character.db.desc = "This is a Player."
|
if not new_character.db.desc:
|
||||||
|
new_character.db.desc = "This is a Player."
|
||||||
|
|
||||||
# tell the caller everything went well.
|
# tell the caller everything went well.
|
||||||
string = "A new account '%s' was created. Welcome!"
|
string = "A new account '%s' was created. Welcome!"
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue