def process_message(self, peer, message):
        if peer:
            # disabled for now
            return
        if peer[0] not in self.peers:
            self.peers[peer[0]] = SCORES.copy()

        try:
            if message == 100:
                self.peers[peer[0]][RECONNECTIONS] += 1
                if self.peers[peer[0]][RECONNECTIONS] > 10:
                    self.ban(peer, RECONNECTIONS)
                return
            elif message == 110:
                self.peers[peer[0]][MALFORMATED] += 1
                if self.peers[peer[0]][MALFORMATED] > 10:
                    self.ban(peer, MALFORMATED)
                return
            if message.command == PING:
                self.peers[peer[0]][PING] += 0.5
                if self.peers[peer[0]][PING] > 10:
                    self.ban(peer, PING)
            elif message.command == STUN:
                self.peers[peer[0]][STUN] += 1
                if self.peers[peer[0]][STUN] > 1:
                    self.ban(peer, STUN)
            elif message.command == STORE:
                args = tuple(message.arguments)
                for arg in args:
                    self.peers[peer[0]][STORE] += len(arg)
                if self.peers[peer[0]][STORE] > 1000000:
                    self.ban(peer, STORE)
            elif message.command == INV:
                self.peers[peer[0]][INV] += 30
                if self.peers[peer[0]][INV] > 150:
                    self.ban(peer, INV)
            elif message.command == VALUES:
                self.peers[peer[0]][VALUES] += 30
                if self.peers[peer[0]][VALUES] > 150:
                    self.ban(peer, VALUES)
            elif message.command == GET_LISTINGS:
                self.peers[peer[0]][GET_LISTINGS] += 5
                if self.peers[peer[0]][GET_LISTINGS] > 250:
                    self.ban(peer, GET_LISTINGS)
            elif message.command == FOLLOW:
                self.peers[peer[0]][FOLLOW] += 1
                if self.peers[peer[0]][FOLLOW] > 3:
                    self.ban(peer, FOLLOW)
            elif message.command == UNFOLLOW:
                self.peers[peer[0]][UNFOLLOW] += 1
                if self.peers[peer[0]][UNFOLLOW] > 3:
                    self.ban(peer, UNFOLLOW)

        except Exception:
            self.log.warning("Exception processing banscore")
dataset/ETHPy150Open OpenBazaar/OpenBazaar-Server/net/dos.py/BanScore.process_message/original