script for distributed lists in chat

more room for improvement, but the basics should be there.
I don't think you have to escape the first # however it does kinda look odd