I'm adding name.pl, because of error 360 from keepright. Destroying boundaries is mistake.
script rules is based on published rules of xybot. Additionally script corrects some errors having codes 220,360 from keepright.