+def cmd_THING_PROTECTION(game, thing_id, protection_char, connection_id):
+ player = game.get_player(connection_id)
+ if not player:
+ raise GameError('need to be logged in for this')
+ if not game.sessions[connection_id]['status'] == 'admin':
+ raise GameError('need to be admin for this')
+ t = game.get_thing(thing_id)
+ if not t:
+ raise GameError('thing of ID %s not found' % thing_id)
+ t.protection = protection_char
+ game.changed = True
+cmd_THING_PROTECTION.argtypes = 'int:pos char'
+