Ejemplo n.º 1
0
    def on_connect_success(self, data):
        try:
            connection_parameters = connect_success().parse(data.data)

            self.protocol.player.client_id = connection_parameters.client_id
            self.protocol.player.logged_in = True
            self.protocol.player.party_id = ''
            self.logger.info('Player %s (UUID: %s, IP: %s) logged in',
                             self.protocol.player.name,
                             self.protocol.player.uuid,
                             self.protocol.transport.getPeer().host)
        except:
            self.logger.exception('Exception in on_connect_success, '
                                  'player info may not have been logged.')
        finally:
            return True
Ejemplo n.º 2
0
 def on_connect_success(self, data):
     try:
         connection_parameters = connect_success().parse(data.data)
         #if not connection_parameters.success:
         #    self.protocol.transport.loseConnection()
         #else:
         self.protocol.player.client_id = connection_parameters.client_id
         self.protocol.player.logged_in = True
         self.protocol.player.party_id = ""
         self.logger.info("Player %s (UUID: %s, IP: %s) logged in" % (
             self.protocol.player.name, self.protocol.player.uuid,
             self.protocol.transport.getPeer().host))
     except:
         self.logger.exception("Exception in on_connect_success, player info may not have been logged.")
     finally:
         return True
Ejemplo n.º 3
0
    def on_connect_success(self, data):
        try:
            connection_parameters = connect_success().parse(data.data)

            self.protocol.player.client_id = connection_parameters.client_id
            self.protocol.player.logged_in = True
            self.protocol.player.party_id = ''
            self.logger.info(
                'Player %s (UUID: %s, IP: %s) logged in',
                self.protocol.player.name,
                self.protocol.player.uuid,
                self.protocol.transport.getPeer().host
            )
        except:
            self.logger.exception(
                'Exception in on_connect_success, '
                'player info may not have been logged.'
            )
        finally:
            return True
Ejemplo n.º 4
0
 def after_connect_success(self, data):
     c = connect_success().parse(data.data)
     self.factory.broadcast(self.protocol.player.colored_name(self.config.colors) + " logged in.", 0, "Announcer")