home · contact · privacy
Fix weird BECOME_ADMIN code.
[plomrogue2] / plomrogue / commands.py
index 3a727ad4885333527e114f0a019b57d5abc5c9e6..ca5c37c60ab635056cfd0bbdd11b662cc87232b7 100644 (file)
@@ -68,7 +68,7 @@ def cmd_LOGIN(game, nick, connection_id):
 cmd_LOGIN.argtypes = 'string'
 
 def cmd_BECOME_ADMIN(game, password, connection_id):
-    player = game.thing_types['Player'](game)
+    player = game.get_player(connection_id)
     if not player:
         raise GameError('need to be logged in for this')
     if password in game.admin_passwords:
@@ -287,9 +287,7 @@ def cmd_THING_DOOR_CLOSED(game, thing_id):
         raise GameError('thing of ID %s not found' % thing_id)
     if not t.type_ == 'Door':
         raise GameError('thing of ID %s not door' % thing_id)
-    t.blocking = True
-    t.portable = False
-    t.thing_char = '#'
+    t.close()
 cmd_THING_DOOR_CLOSED.argtypes = 'int:pos'
 
 def cmd_THING_MUSICPLAYER_SETTINGS(game, thing_id, playing, index, repeat):