code
stringlengths
3
6.57k
a_elo.format_elos(steam_id)
len(formatted_a_elos)
format(formatted_a_elos)
b_elo.format_elos(steam_id)
len(formatted_b_elos)
format(formatted_b_elos)
format_player_name(self, steam_id)
self.resolve_player_name(steam_id)
format(player_name)
format(steam_id)
resolve_player_name(self, steam_id)
self.player(steam_id)
self.remove_trailing_color_code(player.name)
self.db.exists(PLAYER_BASE.format(steam_id)
self.remove_trailing_color_code(self.db[PLAYER_BASE.format(steam_id)
remove_trailing_color_code(self, text)
text.endswith("^7")
cmd_aliases(self, player: minqlx.Player, msg: str, channel: minqlx.AbstractChannel)
len(msg)
self.do_aliases(player, msg[1], channel)
do_aliases(self, player: minqlx.Player, target: str, channel: minqlx.AbstractChannel)
self.find_target_player(target)
len(target_players)
int(target)
self.db.exists(PLAYER_BASE.format(target_steam_id)
player.tell("Sorry, player with steam id {} never played here.".format(target_steam_id)
player.tell("Sorry, but no players matched your tokens: {}.".format(target)
len(target_players)
player.tell("A total of ^6{}^7 players matched for {}:".format(len(target_players)
format(p.id, p.name)
player.tell(out[:-1])
len(target_players)
target_players.pop()
self.reply_func(player, channel)
self.fetch_aliases([target_steam_id])
reply_func("Sorry, no aliases returned for {}".format(target_steam_id)
reply_func("{0}^7".format(self.format_player_aliases(target_steam_id, aliases[target_steam_id])
format_player_aliases(self, steam_id, aliases)
format(self.format_player_name(steam_id)
format("^7, ".join(aliases)
cmd_ratings(self, player, msg, channel)
self.teams()
self.game.map.lower()
format(mapname, TRUSKILLS.name)
channel.reply("^3{}^7 ratings (^3general^7/^3map-based^7)
format(TRUSKILLS.name, TRUSKILLS.url_base.split(':')
strip('/')
channel.reply("^5=================================^7")
channel.reply("^3Elo^7 ratings (^3A elo^7/^3B elo^7)
format(A_ELO.url_base.split(':')
strip('/')
len(team)
primary_rating_provider.rated_steam_ids()
primary_rating_provider.rated_gametypes_for(player.steam_id)
primary_rating_provider.games_for(player.steam_id, gametype)
len(primary_filtered)
secondary_rating_provider.rated_steam_ids()
secondary_rating_provider.rated_gametypes_for(player.steam_id)
secondary_rating_provider.games_for(player.steam_id, gametype)
len(primary_unranked)
secondary_rating_provider.rated_steam_ids()
secondary_rating_provider.rated_gametypes_for(player.steam_id)
secondary_rating_provider.games_for(player.steam_id, gametype)
len(secondary_filtered)
channel.reply(", ".join(rated_player_texts)
cmd_switch_elo_changes_notifications(self, player, msg, channel)
self.wants_to_be_informed(player.steam_id)
self.db.set_flag(player, "balancetwo:rating_changes", not flag)
format(self.get_cvar("qlx_commandPrefix")
format(self.get_cvar("qlx_commandPrefix")
wants_to_be_informed(self, steam_id)
self.db.get_flag(steam_id, "balancetwo:rating_changes", default=False)
cmd_balance(self, player, msg, channel)
player.tell("This game mode is not supported by the balance plugin.")
self.teams()
len(teams["red"] + teams["blue"])
player.tell("The total number of players should be an even number.")
dict([(p.steam_id, gt)
self.callback_balance(players, minqlx.CHAT_CHANNEL)
callback_balance(self, players, channel)
self.teams()
len(current)
self.find_player_to_spec(current)
self.logger.debug("putting {} to spec".format(player_to_spec.clean_name)
player_to_spec.put("spectator")
self.find_balanced_teams()
self.player(steam_id)
self.logger.debug("putting {} to red".format(player.clean_name)
player.put("red")
self.player(steam_id)
self.logger.debug("putting {} to blue".format(player.clean_name)
player.put("blue")
channel.reply("Teams are good! Nothing to balance.")
self.report_teams(red_steam_ids, blue_steam_ids, channel)
find_player_to_spec(self, players)
min([player for player in players], key=lambda _player: self.find_games_here(_player)
find_games_here(self, player)
self.db.exists(completed_key.format(player.steam_id)
int(self.db[completed_key.format(player.steam_id)
find_time(self, player)