From: Christian Heller Date: Tue, 10 Nov 2020 10:43:09 +0000 (+0100) Subject: Only force password-crotection on non-god-mode calls. X-Git-Url: https://plomlompom.com/repos/%7B%7Bprefix%7D%7D/static/%7B%7B%20web_path%20%7D%7D/todo?a=commitdiff_plain;h=9a54df0364d718dda3541044febbf01869f94b1d;p=plomrogue2 Only force password-crotection on non-god-mode calls. --- diff --git a/plomrogue/commands.py b/plomrogue/commands.py index f6744ac..c2bcc0a 100644 --- a/plomrogue/commands.py +++ b/plomrogue/commands.py @@ -73,7 +73,7 @@ def cmd_TURN(game, n): cmd_TURN.argtypes = 'int:nonneg' def cmd_ANNOTATE(game, pw, yx, msg, connection_id): - if not game.can_do_tile_with_pw(yx, pw): + if connection_id and not game.can_do_tile_with_pw(yx, pw): raise GameError('wrong password for tile') if msg == ' ': if yx in game.annotations: @@ -84,7 +84,7 @@ def cmd_ANNOTATE(game, pw, yx, msg, connection_id): cmd_ANNOTATE.argtypes = 'string yx_tuple:nonneg string' def cmd_PORTAL(game, pw, yx, msg, connection_id): - if not game.can_do_tile_with_pw(yx, pw): + if connection_id and not game.can_do_tile_with_pw(yx, pw): raise GameError('wrong password for tile') if msg == ' ': if yx in game.portals: