script for distributed lists in chat

more room for improvement, but the basics should be there.