Stateserver set owner

This commit is contained in:
bobbybee 2014-08-14 21:06:36 -04:00
parent 1905086ad1
commit 9b1ae61632
1 changed files with 12 additions and 1 deletions

View File

@ -433,7 +433,7 @@ class AstronInternalRepository(ConnectionRepository):
dg.add_uint64(aiChannel)
self.send(dg)
def eject(self, clientChannel, reasonCode, reason):
def eject(self, clientChannel, reasonCode, reason):
"""
Kicks the client residing at the specified clientChannel, using the specifed reasoning.
"""
@ -465,4 +465,15 @@ class AstronInternalRepository(ConnectionRepository):
dg = PyDatagram()
dg.addServerHeader(clientChannel, self.ourChannel, CLIENTAGENT_ADD_SESSION_OBJECT)
dg.add_uint32(doId)
self.send(dg)
def setOwner(self, doId, newOwner):
"""
Sets the owner of a DistributedObject. This will enable the new owner to send "ownsend" fields,
and will generate an OwnerView.
"""
dg = PyDatagram()
dg.addServerHeader(doId, self.ourChannel, STATESERVER_OBJECT_SET_OWNER)
dg.add_uint64(newOwner)
self.send(dg)