Removed single quote parsing from player 'connect' and 'create' command parsers.
This commit is contained in:
parent
cd04ea4c62
commit
89c3a1f846
2 changed files with 11 additions and 11 deletions
|
|
@ -15,7 +15,7 @@ DEFAULT_SCREEN = \
|
||||||
If you need to create an account, type (without the <>'s):
|
If you need to create an account, type (without the <>'s):
|
||||||
{wcreate <username> <password>{n
|
{wcreate <username> <password>{n
|
||||||
|
|
||||||
If you have spaces in your username, enclose it in quotes.
|
If you have spaces in your username, enclose it in double quotes.
|
||||||
Enter {whelp{n for more info. {wlook{n will re-show this screen.
|
Enter {whelp{n for more info. {wlook{n will re-show this screen.
|
||||||
{b=============================================================={n""" \
|
{b=============================================================={n""" \
|
||||||
% (settings.SERVERNAME, utils.get_evennia_version())
|
% (settings.SERVERNAME, utils.get_evennia_version())
|
||||||
|
|
|
||||||
|
|
@ -188,7 +188,7 @@ class CmdUnconnectedConnect(COMMAND_DEFAULT_CLASS):
|
||||||
|
|
||||||
Use the create command to first create an account before logging in.
|
Use the create command to first create an account before logging in.
|
||||||
|
|
||||||
If you have spaces in your name, enclose it in quotes.
|
If you have spaces in your name, enclose it in double quotes.
|
||||||
"""
|
"""
|
||||||
key = "connect"
|
key = "connect"
|
||||||
aliases = ["conn", "con", "co"]
|
aliases = ["conn", "con", "co"]
|
||||||
|
|
@ -212,10 +212,10 @@ class CmdUnconnectedConnect(COMMAND_DEFAULT_CLASS):
|
||||||
return
|
return
|
||||||
|
|
||||||
args = self.args
|
args = self.args
|
||||||
# extract quoted parts
|
# extract double quote parts
|
||||||
parts = [part.strip() for part in re.split(r"\"|\'", args) if part.strip()]
|
parts = [part.strip() for part in re.split(r"\"", args) if part.strip()]
|
||||||
if len(parts) == 1:
|
if len(parts) == 1:
|
||||||
# this was (hopefully) due to no quotes being found, or a guest login
|
# this was (hopefully) due to no double quotes being found, or a guest login
|
||||||
parts = parts[0].split(None, 1)
|
parts = parts[0].split(None, 1)
|
||||||
# Guest login
|
# Guest login
|
||||||
if len(parts) == 1 and parts[0].lower() == "guest":
|
if len(parts) == 1 and parts[0].lower() == "guest":
|
||||||
|
|
@ -251,7 +251,7 @@ class CmdUnconnectedCreate(COMMAND_DEFAULT_CLASS):
|
||||||
|
|
||||||
This creates a new player account.
|
This creates a new player account.
|
||||||
|
|
||||||
If you have spaces in your name, enclose it in quotes.
|
If you have spaces in your name, enclose it in double quotes.
|
||||||
"""
|
"""
|
||||||
key = "create"
|
key = "create"
|
||||||
aliases = ["cre", "cr"]
|
aliases = ["cre", "cr"]
|
||||||
|
|
@ -264,14 +264,14 @@ class CmdUnconnectedCreate(COMMAND_DEFAULT_CLASS):
|
||||||
session = self.caller
|
session = self.caller
|
||||||
args = self.args.strip()
|
args = self.args.strip()
|
||||||
|
|
||||||
# extract quoted parts
|
# extract double quoted parts
|
||||||
parts = [part.strip() for part in re.split(r"\"|\'", args) if part.strip()]
|
parts = [part.strip() for part in re.split(r"\"", args) if part.strip()]
|
||||||
if len(parts) == 1:
|
if len(parts) == 1:
|
||||||
# this was (hopefully) due to no quotes being found
|
# this was (hopefully) due to no quotes being found
|
||||||
parts = parts[0].split(None, 1)
|
parts = parts[0].split(None, 1)
|
||||||
if len(parts) != 2:
|
if len(parts) != 2:
|
||||||
string = "\n Usage (without <>): create <name> <password>" \
|
string = "\n Usage (without <>): create <name> <password>" \
|
||||||
"\nIf <name> or <password> contains spaces, enclose it in quotes."
|
"\nIf <name> or <password> contains spaces, enclose it in double quotes."
|
||||||
session.msg(string)
|
session.msg(string)
|
||||||
return
|
return
|
||||||
playername, password = parts
|
playername, password = parts
|
||||||
|
|
@ -298,7 +298,7 @@ class CmdUnconnectedCreate(COMMAND_DEFAULT_CLASS):
|
||||||
if not re.findall('^[\w. @+-]+$', password) or not (3 < len(password)):
|
if not re.findall('^[\w. @+-]+$', password) or not (3 < len(password)):
|
||||||
string = "\n\r Password should be longer than 3 characers. Letters, spaces, digits and @\.\+\-\_ only." \
|
string = "\n\r Password should be longer than 3 characers. Letters, spaces, digits and @\.\+\-\_ only." \
|
||||||
"\nFor best security, make it longer than 8 characters. You can also use a phrase of" \
|
"\nFor best security, make it longer than 8 characters. You can also use a phrase of" \
|
||||||
"\nmany words if you enclose the password in quotes."
|
"\nmany words if you enclose the password in double quotes."
|
||||||
session.msg(string)
|
session.msg(string)
|
||||||
return
|
return
|
||||||
|
|
||||||
|
|
@ -415,7 +415,7 @@ You are not yet logged into the game. Commands available at this point:
|
||||||
{wquit{n - abort the connection
|
{wquit{n - abort the connection
|
||||||
|
|
||||||
First create an account e.g. with {wcreate Anna c67jHL8p{n
|
First create an account e.g. with {wcreate Anna c67jHL8p{n
|
||||||
(If you have spaces in your name, use quotes: {wcreate "Anna the Barbarian" c67jHL8p{n
|
(If you have spaces in your name, use double quotes: {wcreate "Anna the Barbarian" c67jHL8p{n
|
||||||
Next you can connect to the game: {wconnect Anna c67jHL8p{n
|
Next you can connect to the game: {wconnect Anna c67jHL8p{n
|
||||||
|
|
||||||
You can use the {wlook{n command if you want to see the connect screen again.
|
You can use the {wlook{n command if you want to see the connect screen again.
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue