The players themselves should have authority over their own character. Is it? If so let player character execute the code.