Previously, the global command table was being filled with entries from other tables due to some funky globalization of the ctable instance variable. Fixed that and yanked the conditionals on a few of the logged out commands that check for logged in status.

This commit is contained in:
Greg Taylor 2009-01-12 18:01:35 +00:00
parent 0b533b984d
commit e6d3d9395d
2 changed files with 6 additions and 12 deletions

View file

@ -23,7 +23,11 @@ class CommandTable(object):
""" """
Stores command tables and performs lookups. Stores command tables and performs lookups.
""" """
ctable = {} ctable = None
def __init__(self):
# This ensures there are no leftovers when the class is instantiated.
self.ctable = {}
def add_command(self, command_string, function, priv_tuple=None): def add_command(self, command_string, function, priv_tuple=None):
""" """

View file

@ -15,11 +15,6 @@ def cmd_connect(command):
session = command.session session = command.session
# Check whether command is being issued in-game.
if str(session.get_pobject()) != 'None':
session.msg("Connect command unavailable in-game")
return
# Argument check. # Argument check.
# Fail gracefully if no argument is provided # Fail gracefully if no argument is provided
if not command.command_argument: if not command.command_argument:
@ -56,11 +51,6 @@ def cmd_create(command):
""" """
session = command.session session = command.session
# Check whether command is being issued ingame.
if str(session.get_pobject()) != 'None':
session.msg("Create command unavailable in-game")
return
# Argument check. # Argument check.
# Fail gracefully if no argument is provided # Fail gracefully if no argument is provided
if not command.command_argument: if not command.command_argument: