X-Git-Url: https://plomlompom.com/repos/foo.html?a=blobdiff_plain;f=plomrogue%2Fcommands.py;h=2061fe7b782560f50911753fcee3f1cf9395afac;hb=920a6e5b6e7d355aaaf0ae79ed194eab6e00b999;hp=dc2e6ead099deb9c2a873f93e3309bd327d7d464;hpb=0ec2f3df7ef3b2f7bdbe7c45278e0944e64a56fe;p=plomrogue2
diff --git a/plomrogue/commands.py b/plomrogue/commands.py
index dc2e6ea..2061fe7 100644
--- a/plomrogue/commands.py
+++ b/plomrogue/commands.py
@@ -1,5 +1,5 @@
from plomrogue.misc import quote
-from plomrogue.errors import GameError
+from plomrogue.errors import GameError, ArgError
@@ -151,6 +151,8 @@ def cmd_TURN(game, n):
cmd_TURN.argtypes = 'int:nonneg'
def cmd_ANNOTATE(game, yx, msg, pw, connection_id):
+ if len(msg) > 500:
+ raise ArgError('annotation text must be <= 500 characters')
player = game.get_player(connection_id)
big_yx, little_yx = player.fov_stencil.source_yxyx(yx)
if not player.fov_test(big_yx, little_yx):