mirror of
https://github.com/evennia/evennia.git
synced 2026-04-01 21:47:17 +02:00
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:
parent
213be7aec4
commit
a1646ec596
2 changed files with 6 additions and 6 deletions
|
|
@ -224,11 +224,11 @@ def get_and_merge_cmdsets(caller, session, player, obj, callertype, sessid=None)
|
|||
# Main command-handler function
|
||||
|
||||
@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.
|
||||
|
||||
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
|
||||
testing - if we should actually execute the command or not.
|
||||
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
|
||||
if callertype == "session":
|
||||
session = called_on
|
||||
session = called_by
|
||||
player = session.player
|
||||
if player:
|
||||
obj = yield _GA(player.dbobj, "get_puppet")(session.sessid)
|
||||
elif callertype == "player":
|
||||
player = called_on
|
||||
player = called_by
|
||||
if sessid:
|
||||
obj = yield _GA(player.dbobj, "get_puppet")(sessid)
|
||||
elif callertype == "object":
|
||||
obj = called_on
|
||||
obj = called_by
|
||||
else:
|
||||
raise RuntimeError("cmdhandler: callertype %s is not valid." % callertype)
|
||||
|
||||
|
|
|
|||
|
|
@ -18,7 +18,7 @@ from src.commands.default.muxcommand import MuxCommand, MuxPlayerCommand
|
|||
# limit symbol import for API
|
||||
__all__ = ("CmdAddCom", "CmdDelCom", "CmdAllCom",
|
||||
"CmdChannels", "CmdCdestroy", "CmdCBoot", "CmdCemit",
|
||||
"CmdCWho", "CmdChannelCreate", "CmdCset", "CmdCdesc",
|
||||
"CmdCWho", "CmdChannelCreate", "CmdClock", "CmdCdesc",
|
||||
"CmdPage", "CmdIRC2Chan", "CmdIMC2Chan", "CmdIMCInfo",
|
||||
"CmdIMCTell", "CmdRSS2Chan")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue