From 9a54df0364d718dda3541044febbf01869f94b1d Mon Sep 17 00:00:00 2001
From: Christian Heller <c.heller@plomlompom.de>
Date: Tue, 10 Nov 2020 11:43:09 +0100
Subject: [PATCH] Only force password-crotection on non-god-mode calls.

---
 plomrogue/commands.py | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

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:
-- 
2.30.2