Fixed MULTISESSION_MODE = 2
This commit is contained in:
parent
9733468098
commit
b87aa6d039
1 changed files with 3 additions and 4 deletions
|
|
@ -528,6 +528,7 @@ class DefaultObject(ObjectDB):
|
||||||
log_trace()
|
log_trace()
|
||||||
|
|
||||||
# session relay
|
# session relay
|
||||||
|
kwargs['_nomulti'] = kwargs.get('_nomulti', True)
|
||||||
|
|
||||||
if self.player:
|
if self.player:
|
||||||
# for there to be a session there must be a Player.
|
# for there to be a session there must be a Player.
|
||||||
|
|
@ -537,13 +538,11 @@ class DefaultObject(ObjectDB):
|
||||||
if sessions:
|
if sessions:
|
||||||
# this is a special instruction to ignore MULTISESSION_MODE
|
# this is a special instruction to ignore MULTISESSION_MODE
|
||||||
# and only relay to this given session.
|
# and only relay to this given session.
|
||||||
kwargs["_nomulti"] = True
|
|
||||||
for session in make_iter(sessions):
|
for session in make_iter(sessions):
|
||||||
session.msg(text=text, **kwargs)
|
session.msg(text=text, **kwargs)
|
||||||
return
|
return
|
||||||
# we only send to the first of any connected sessions - the sessionhandler
|
# Send to all sessions connected to this object
|
||||||
# will disperse this to the other sessions based on MULTISESSION_MODE.
|
sessions = [self.player.get_session(sessid) for sessid in self.sessid.get()]
|
||||||
sessions = self.player.get_all_sessions()
|
|
||||||
if sessions:
|
if sessions:
|
||||||
sessions[0].msg(text=text, **kwargs)
|
sessions[0].msg(text=text, **kwargs)
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue