home · contact · privacy
Fix arg order for passwords.
[plomrogue2] / plomrogue / commands.py
index c2bcc0a4858076568f0f7609a4f69f1efa3528d4..85ec5d31b2d4c3c40ae1bf0ee0a3f9e877e00167 100644 (file)
@@ -72,7 +72,7 @@ def cmd_TURN(game, n):
     game.turn = n
 cmd_TURN.argtypes = 'int:nonneg'
 
-def cmd_ANNOTATE(game, pw, yx, msg, connection_id):
+def cmd_ANNOTATE(game, yx, msg, pw=None, connection_id=None):
     if connection_id and not game.can_do_tile_with_pw(yx, pw):
         raise GameError('wrong password for tile')
     if msg == ' ':
@@ -81,9 +81,9 @@ def cmd_ANNOTATE(game, pw, yx, msg, connection_id):
     else:
         game.annotations[yx] = msg
     game.changed = True
-cmd_ANNOTATE.argtypes = 'string yx_tuple:nonneg string'
+cmd_ANNOTATE.argtypes = 'yx_tuple:nonneg string string'
 
-def cmd_PORTAL(game, pw, yx, msg, connection_id):
+def cmd_PORTAL(game, yx, msg, pw=None, connection_id=None):
     if connection_id and not game.can_do_tile_with_pw(yx, pw):
         raise GameError('wrong password for tile')
     if msg == ' ':
@@ -92,7 +92,7 @@ def cmd_PORTAL(game, pw, yx, msg, connection_id):
     else:
         game.portals[yx] = msg
     game.changed = True
-cmd_PORTAL.argtypes = 'string yx_tuple:nonneg string'
+cmd_PORTAL.argtypes = 'yx_tuple:nonneg string string'
 
 def cmd_GET_ANNOTATION(game, yx, connection_id):
     annotation = '(none)';