Added in some nice improvements from https://github.com/reticulatingspline/Supybot-Pastebin

(with a few changes)