Corrected command.msg function to work with the changes introducted with MULTISESSION_MODE=3, e.g. the replacement of session id (int) for a session handler object.
This commit is contained in:
parent
50b072170f
commit
48f145031b
1 changed files with 10 additions and 1 deletions
|
|
@ -241,7 +241,16 @@ class Command(object):
|
|||
if not sessid:
|
||||
if hasattr(to_obj, "sessid"):
|
||||
# this is the case when to_obj is e.g. a Character
|
||||
sessid = all_sessions and None or to_obj.sessid
|
||||
toobj_sessions = to_obj.sessid.get()
|
||||
|
||||
# If to_obj has more than one session MULTISESSION_MODE=3
|
||||
# we need to send to every session.
|
||||
#(setting it to None, does it)
|
||||
if len(toobj_sessions)>1:
|
||||
session_tosend=None
|
||||
else:
|
||||
session_tosend=toobj_sessions[0]
|
||||
sessid = all_sessions and None or session_tosend
|
||||
elif to_obj == self.caller:
|
||||
# this is the case if to_obj is the calling Player
|
||||
sessid = all_sessions and None or self.sessid
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue