diff --git a/src/commands/default/general.py b/src/commands/default/general.py index 7f11fcc08..09624456b 100644 --- a/src/commands/default/general.py +++ b/src/commands/default/general.py @@ -9,6 +9,8 @@ from src.utils import utils, search, create from src.objects.models import ObjectNick as Nick from src.commands.default.muxcommand import MuxCommand, MuxCommandOOC +from settings import MAX_NR_CHARACTERS + # limit symbol import for API __all__ = ("CmdHome", "CmdLook", "CmdPassword", "CmdNick", "CmdInventory", "CmdGet", "CmdDrop", "CmdGive", "CmdQuit", "CmdWho", @@ -819,7 +821,7 @@ class CmdOOCLook(MuxCommandOOC, CmdLook): characters = player.db._playable_characters sessions = player.get_all_sessions() - sessidstr = sessid and "(session id %i)" % sessid or "" + sessidstr = sessid and " (session id %i)" % sessid or "" string = "You are logged in as {g%s{n%s." % (player.key, sessidstr) string += "\n\nSession(s) connected:" @@ -835,17 +837,18 @@ class CmdOOCLook(MuxCommandOOC, CmdLook): # character is already puppeted sess = player.get_session(csessid) if hasattr(char.locks, "lock_bypass") and char.locks.lock_bypass: - string += "\n - {G%s{n (superuser character) (played by you from session with id %i)" % (char.key, sess.sessid) + string += "\n - {G%s{n [superuser character] (played by you from session with id %i)" % (char.key, sess.sessid) elif sess: - string += "\n - {G%s{n (played by you from session with id %i)" % (char.key, sess.sessid) + string += "\n - {G%s{n [%s] (played by you session id %i)" % (char.key, ", ".join(char.permissions), sess.sessid) else: - string += "\n - {R%s{n (played by someone else)" % char.key + string += "\n - {R%s{n [%s] (played by someone else)" % (char.key, ", ".join(char.permissions)) else: # character is "free to puppet" if player.is_superuser and char.get_attribute("_superuser_character"): - string += "\n - %s (superuser character)" % (char.key) + string += "\n - %s [Superuser character]" % (char.key) else: - string += "\n - %s" % char.key + string += "\n - %s [%s]" % (char.key, ", ".join(char.permissions)) + string = ("-" * 68) + "\n" + string + "\n" + ("-" * 68) self.msg(string) def func(self): @@ -872,8 +875,6 @@ class CmdCharCreate(MuxCommandOOC): locks = "cmd:all()" help_category = "General" - MAX_NR_CHARACTERS = 2 - def func(self): "create the new character" player = self.caller diff --git a/src/settings_default.py b/src/settings_default.py index fe2ee25e6..5a3ec2989 100644 --- a/src/settings_default.py +++ b/src/settings_default.py @@ -62,12 +62,6 @@ SSL_ENABLED = False SSL_PORTS = [4001] # Interface addresses to listen to. If 0.0.0.0, listen to all. SSL_INTERFACES = ['0.0.0.0'] -# Multisession modes allow a player (=account) to connect to the game simultaneously -# with multiple clients (=sessions) in various ways according to the set mode: -# 0 - no multisession - when a new session is connected, the old one is disconnected -# 1 - multiple sessions, one player, one character, each session getting the same data -# 2 - multiple sessions, one player, each session controlling different characters -MULTISESSION_MODE = 0 # The path that contains this settings.py file (no trailing slash). BASE_PATH = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) # Path to the src directory containing the bulk of the codebase's code. @@ -203,6 +197,9 @@ MSSP_META_MODULE = "" # Module holding server-side custom functions for out-of-band protocols to call. # Note that OOB_ENABLED must be True for this to be used. OOB_FUNC_MODULE = "" # Not yet available in Evennia - do not use! +# Tuple of modules implementing lock functions. All callable functions +# inside these modules will be available as lock functions. +LOCK_FUNC_MODULES = ("src.locks.lockfuncs",) ###################################################################### # Default command sets @@ -285,18 +282,23 @@ TIME_MONTH_PER_YEAR = 12 ###################################################################### -# In-Game access +# Default Player setup and access ###################################################################### +# Multisession modes allow a player (=account) to connect to the game simultaneously +# with multiple clients (=sessions) in various ways according to the set mode: +# 0 - no multisession - when a new session is connected, the old one is disconnected +# 1 - multiple sessions, one player, one character, each session getting the same data +# 2 - multiple sessions, one player, each session controlling different characters +MULTISESSION_MODE = 0 +# The maximum number of characters allowed for MULTISESSION_MODE 1 or 2. This is checked +# by the default char-creation commands in this mode. Forced to 1 for MULTISESSION_MODE=0. +MAX_NR_CHARACTERS = 2 # The access hiearchy, in climbing order. A higher permission in the # hierarchy includes access of all levels below it. PERMISSION_HIERARCHY = ("Players","PlayerHelpers","Builders", "Wizards", "Immortals") # The default permission given to all new players PERMISSION_PLAYER_DEFAULT = "Players" -# Tuple of modules implementing lock functions. All callable functions -# inside these modules will be available as lock functions. -LOCK_FUNC_MODULES = ("src.locks.lockfuncs",) - ###################################################################### # In-game Channels created from server start