Skip to content

Commit

Permalink
Some security adjustments
Browse files Browse the repository at this point in the history
  • Loading branch information
NoahCxrest authored Jan 2, 2025
1 parent e2f54ab commit 48fe881
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions tasks/iterate_prc_logs.py
Original file line number Diff line number Diff line change
Expand Up @@ -408,15 +408,15 @@ async def check_team_restrictions(bot, settings, guild_id, players):
kick_against.append(plr.username)
bot.team_restrictions_infractions[guild_id][plr.username] = 0
if len(load_against) > 0:
filtered_load = [username for username in load_against if username.strip()]
filtered_load = [username for username in load_against if username.strip() and len(username.strip()) >= 3]
if filtered_load:
cmd = f":load {','.join(filtered_load)}"
try:
await bot.prc_api.run_command(guild_id, cmd)
except:
logging.warning("PRC API Rate limit reached when loading.")
else:
logging.warning("Skipped sending empty load command")
logging.warning("Skipped sending load command - usernames too short or empty")

for message, plrs_to_send in pm_against.items():
try:
Expand Down

0 comments on commit 48fe881

Please sign in to comment.