Added the ability to save protocol options on the player level. Implements #957.
This commit is contained in:
parent
20403e356b
commit
79f5a4a93a
4 changed files with 77 additions and 12 deletions
|
|
@ -329,6 +329,24 @@ class ServerSession(Session):
|
|||
# Player-visible idle time, not used in idle timeout calcs.
|
||||
self.cmd_last_visible = self.cmd_last
|
||||
|
||||
def update_flags(self, **kwargs):
|
||||
"""
|
||||
Update the protocol_flags and sync them with Portal.
|
||||
|
||||
Kwargs:
|
||||
key, value - A key:value pair to set in the
|
||||
protocol_flags dictionary.
|
||||
|
||||
Notes:
|
||||
Since protocols can vary, no checking is done
|
||||
as to the existene of the flag or not. The input
|
||||
data should have been validated before this call.
|
||||
|
||||
"""
|
||||
if kwargs:
|
||||
self.protocol_flags.update(kwargs)
|
||||
self.sessionhandler.session_portal_sync(self)
|
||||
|
||||
|
||||
def data_out(self, **kwargs):
|
||||
"""
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue