Fixed an issue with a CmdClock not being a part of the __all__ module handle (this causes ev.py to fail to import it)

This commit is contained in:
Griatch 2013-10-18 15:09:03 +02:00
parent 213be7aec4
commit a1646ec596
2 changed files with 6 additions and 6 deletions

View file

@ -224,11 +224,11 @@ def get_and_merge_cmdsets(caller, session, player, obj, callertype, sessid=None)
# Main command-handler function # Main command-handler function
@inlineCallbacks @inlineCallbacks
def cmdhandler(called_on, raw_string, testing=False, callertype="session", sessid=None): def cmdhandler(called_by, raw_string, testing=False, callertype="session", sessid=None):
""" """
This is the main function to handle any string sent to the engine. This is the main function to handle any string sent to the engine.
called_on - object on which this was called from. This is either a Session, a Player or an Object. called_by - object on which this was called from. This is either a Session, a Player or an Object.
raw_string - the command string given on the command line raw_string - the command string given on the command line
testing - if we should actually execute the command or not. testing - if we should actually execute the command or not.
if True, the command instance will be returned instead. if True, the command instance will be returned instead.
@ -246,16 +246,16 @@ def cmdhandler(called_on, raw_string, testing=False, callertype="session", sessi
""" """
session, player, obj = None, None, None session, player, obj = None, None, None
if callertype == "session": if callertype == "session":
session = called_on session = called_by
player = session.player player = session.player
if player: if player:
obj = yield _GA(player.dbobj, "get_puppet")(session.sessid) obj = yield _GA(player.dbobj, "get_puppet")(session.sessid)
elif callertype == "player": elif callertype == "player":
player = called_on player = called_by
if sessid: if sessid:
obj = yield _GA(player.dbobj, "get_puppet")(sessid) obj = yield _GA(player.dbobj, "get_puppet")(sessid)
elif callertype == "object": elif callertype == "object":
obj = called_on obj = called_by
else: else:
raise RuntimeError("cmdhandler: callertype %s is not valid." % callertype) raise RuntimeError("cmdhandler: callertype %s is not valid." % callertype)

View file

@ -18,7 +18,7 @@ from src.commands.default.muxcommand import MuxCommand, MuxPlayerCommand
# limit symbol import for API # limit symbol import for API
__all__ = ("CmdAddCom", "CmdDelCom", "CmdAllCom", __all__ = ("CmdAddCom", "CmdDelCom", "CmdAllCom",
"CmdChannels", "CmdCdestroy", "CmdCBoot", "CmdCemit", "CmdChannels", "CmdCdestroy", "CmdCBoot", "CmdCemit",
"CmdCWho", "CmdChannelCreate", "CmdCset", "CmdCdesc", "CmdCWho", "CmdChannelCreate", "CmdClock", "CmdCdesc",
"CmdPage", "CmdIRC2Chan", "CmdIMC2Chan", "CmdIMCInfo", "CmdPage", "CmdIRC2Chan", "CmdIMC2Chan", "CmdIMCInfo",
"CmdIMCTell", "CmdRSS2Chan") "CmdIMCTell", "CmdRSS2Chan")