From 6ad82e99e62d5b11b818e48be8846c84bd36a718 Mon Sep 17 00:00:00 2001 From: Sakimori Date: Tue, 9 Mar 2021 12:55:47 -0500 Subject: [PATCH] fixes #227: applied character limit to add and replaceplayer --- the_prestige.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/the_prestige.py b/the_prestige.py index 3da20fe..4c9a42c 100644 --- a/the_prestige.py +++ b/the_prestige.py @@ -413,6 +413,9 @@ class AddPlayerCommand(Command): try: team_name = command.split("\n")[1].strip() player_name = command.split("\n")[2].strip() + if len(player_name) > 70: + await msg.channel.send("70 characters per player, boss. Quit being sneaky.") + return team, owner_id = games.get_team_and_owner(team_name) if owner_id != msg.author.id and msg.author.id not in config()["owners"]: await msg.channel.send("You're not authorized to mess with this team. Sorry, boss.") @@ -478,6 +481,9 @@ class ReplacePlayerCommand(Command): team_name = command.split("\n")[1].strip() remove_name = command.split("\n")[2].strip() add_name = command.split("\n")[3].strip() + if len(add_name) > 70: + await msg.channel.send("70 characters per player, boss. Quit being sneaky.") + return team, owner_id = games.get_team_and_owner(team_name) if owner_id != msg.author.id and msg.author.id not in config()["owners"]: await msg.channel.send("You're not authorized to mess with this team. Sorry, boss.")