fn conf_enable_robot { conf_enable_app robot } fn robot_init { if(~ $req_path /){ extraHeaders=$"extraHeaders^'' ll_add handlers_bar_left cat $werc_root^'/apps/robot/controls.htm' } if not if(~ $req_path /robot.js){ echo 'Content-Type: text/plain' echo cat $werc_root^'/apps/robot/robot.js' exit } if not if(~ $req_path /move){ if(~ $REQUEST_METHOD POST) { if(~ $"post_arg_dir u d l f r) echo $"post_arg_dir >> /tmp/move } } if not if(~ $req_path /say){ if(~ $REQUEST_METHOD POST) { if(! ~ x$"post_arg_dir x) { echo $"post_arg_dir | sed 's/[^A-Za-z0-9\ ]//g' >> /tmp/voice } } } }