def _fixed_cbLogin(self, xxx_todo_changeme):
 (interface, avatar, logout) = xxx_todo_changeme
 if (not IJellyable.providedBy(avatar)):
  avatar = pb.AsReferenceable(avatar, 'perspective')
 puid = avatar.processUniqueID()
 logout = [logout]
 def maybeLogout():
  if (not logout):
   return
  fn = logout[0]
  del logout[0]
  fn()
 self.broker._localCleanup[puid] = maybeLogout
 self.broker.notifyOnDisconnect(maybeLogout)
 return avatar

def _fixed_cbLogin ( self , xxx_todo_changeme ) : ( interface , avatar , logout ) = xxx_todo_changeme if ( not IJellyable . providedBy ( avatar ) ) : avatar = pb . AsReferenceable ( avatar , 'perspective' ) puid = avatar . processUniqueID ( ) logout = [ logout ] def maybeLogout ( ) : if ( not logout ) : return fn = logout [ 0 ] del logout [ 0 ] fn ( ) self . broker . _localCleanup [ puid ] = maybeLogout self . broker . notifyOnDisconnect ( maybeLogout ) return avatar
ensure that the avatar to be returned to the client is jellyable and set up disconnection notification to call the realms logout object .