Пример #1
0
 def database_update(self):
     '''
     Updates the time and the player's name in the database
     '''
     if self.wins:
         _update_winner(('name', 'timestamp'), (_es.getplayername(
             self.userid), 'strftime("%s","now")'), uniqueid=self.steamid)
Пример #2
0
 def database_update(self):
     '''
     Updates the time and the player's name in the database
     '''
     if self.wins:
         _update_winner(
             ('name', 'timestamp'),
             (_es.getplayername(self.userid), 'strftime("%s","now")'),
             uniqueid=self.steamid)
Пример #3
0
    def _set_wins(self, value):
        """Sets the number wins."""
        # Bots can't win
        if _es.isbot(self.userid):
            return

        # Has won before
        if self.wins:
            _update_winner('wins', value, uniqueid=self.steamid)
        # New entry
        else:
            name = _es.getplayername(self.userid)
            if not name:
                name = "unnamed"
            _insert_winner(name, self.steamid, value)
Пример #4
0
    def _set_wins(self, value):
        """Sets the number wins."""
        # Bots can't win
        if _es.isbot(self.userid):
            return

        # Has won before
        if self.wins:
            _update_winner('wins', value, uniqueid=self.steamid)
        # New entry
        else:
            name = _es.getplayername(self.userid)
            if not name:
                name = "unnamed"
            _insert_winner(name, self.steamid, value)